diff --git a/BeefLibs/Beefy2D/src/widgets/KeyCode.bf b/BeefLibs/Beefy2D/src/widgets/KeyCode.bf index 400b1c03..4369d2a3 100644 --- a/BeefLibs/Beefy2D/src/widgets/KeyCode.bf +++ b/BeefLibs/Beefy2D/src/widgets/KeyCode.bf @@ -106,6 +106,24 @@ namespace Beefy.widgets extension KeyCode { + public bool IsModifier + { + get + { + switch (this) + { + case .LWin, + .RWin, + .Alt, + .Control, + .Command: + return true; + default: + return false; + } + } + } + public static Result Parse(StringView str) { if (str.Length == 1) diff --git a/IDE/src/BuildContext.bf b/IDE/src/BuildContext.bf index ffbbfa23..571ccaeb 100644 --- a/IDE/src/BuildContext.bf +++ b/IDE/src/BuildContext.bf @@ -874,9 +874,9 @@ namespace IDE minRTModName.Insert(0, "_"); if (!is64Bit) - linkLine.Append("-libpath:\"", gApp.mInstallDir, "lib\\x86\" ", gApp.mInstallDir, "lib\\x86\\msvcrt.lib Beef", IDEApp.sRTVersionStr,"MinRT32", minRTModName, ".lib "); + linkLine.Append("-libpath:\"", gApp.mInstallDir, "lib\\x86\" \"", gApp.mInstallDir, "lib\\x86\\msvcrt.lib\" Beef", IDEApp.sRTVersionStr,"MinRT32", minRTModName, ".lib "); else - linkLine.Append("-libpath:\"", gApp.mInstallDir, "lib\\x64\" ", gApp.mInstallDir, "lib\\x64\\msvcrt.lib Beef", IDEApp.sRTVersionStr,"MinRT64", minRTModName, ".lib "); + linkLine.Append("-libpath:\"", gApp.mInstallDir, "lib\\x64\" \"", gApp.mInstallDir, "lib\\x64\\msvcrt.lib\" Beef", IDEApp.sRTVersionStr,"MinRT64", minRTModName, ".lib "); linkLine.Append("ntdll.lib user32.lib kernel32.lib gdi32.lib winmm.lib shell32.lib ole32.lib rpcrt4.lib version.lib comdlg32.lib -ignore:4049 -ignore:4217 "); } @@ -1062,17 +1062,8 @@ namespace IDE IDEUtils.AppendWithOptionalQuotes(linkLine, resOutPath); } - - let binPath = (!is64Bit) ? gApp.mSettings.mVSSettings.mBin32Path : gApp.mSettings.mVSSettings.mBin64Path; - if (binPath.IsWhiteSpace) - { - gApp.OutputErrorLine("Visual Studio tool path not configured. Check Visual Studio configuration in File\\Preferences\\Settings."); - return false; - } String linkerPath = scope String(); - linkerPath.Append(binPath); - linkerPath.Append("/link.exe"); if (workspaceOptions.mToolsetType == .LLVM) { linkerPath.Clear(); @@ -1097,6 +1088,17 @@ namespace IDE if ((mPlatformType == .Windows) && (!is64Bit)) linkLine.Append(" /safeseh:no"); } + else + { + let binPath = (!is64Bit) ? gApp.mSettings.mVSSettings.mBin32Path : gApp.mSettings.mVSSettings.mBin64Path; + if (binPath.IsWhiteSpace) + { + gApp.OutputErrorLine("Visual Studio tool path not configured. Check Visual Studio configuration in File\\Preferences\\Settings."); + return false; + } + linkerPath.Append(binPath); + linkerPath.Append("/link.exe"); + } if (options.mBuildOptions.mBeefLibType != .DynamicDebug) { diff --git a/IDE/src/IDEApp.bf b/IDE/src/IDEApp.bf index 9b9855c8..fadb8c6a 100644 --- a/IDE/src/IDEApp.bf +++ b/IDE/src/IDEApp.bf @@ -7497,7 +7497,7 @@ namespace IDE } } } - else + else if (!evt.mKeyCode.IsModifier) { // Not found if (hadChordState) @@ -10411,6 +10411,36 @@ namespace IDE #endif } + public bool IsVisualStudioRequired + { + get + { + if (Workspace.PlatformType.GetFromName(mPlatformName) != .Windows) + return false; + var workspaceOptions = GetCurWorkspaceOptions(); + if (workspaceOptions.mToolsetType != .LLVM) + return true; + + for (var project in mWorkspace.mProjects) + { + if ((project.mGeneralOptions.mTargetType != .BeefConsoleApplication) && + (project.mGeneralOptions.mTargetType != .BeefGUIApplication) && + (project.mGeneralOptions.mTargetType != .BeefApplication_DynamicLib) && + (project.mGeneralOptions.mTargetType != .BeefApplication_StaticLib)) + { + continue; + } + + var options = GetCurProjectOptions(project); + if (options == null) + continue; + if (options.mBuildOptions.mCLibType != .SystemMSVCRT) + return true; + } + return false; + } + } + protected bool Compile(CompileKind compileKind = .Normal, Project hotProject = null) { Debug.Assert(mBuildContext == null); @@ -10585,7 +10615,7 @@ namespace IDE } } - if (Workspace.PlatformType.GetFromName(mPlatformName) == .Windows) + if ((Workspace.PlatformType.GetFromName(mPlatformName) == .Windows) && (IsVisualStudioRequired)) { if (!mSettings.mVSSettings.IsConfigured()) mSettings.mVSSettings.SetDefaults();