mirror of
https://github.com/libretro/scummvm.git
synced 2025-05-13 17:46:22 +00:00
CREATE_PROJECT: Set MSVC default subsystem to CONSOLE
MSVC builds now use the CONSOLE subsystem by default, just like all our other Windows builds. --use-windows-subsystem is now available to generate projects with the WINDOWS subsystem.
This commit is contained in:
parent
61cca4f30e
commit
335f90b136
@ -303,6 +303,8 @@ int main(int argc, char *argv[]) {
|
|||||||
setup.useWindowsUnicode = true;
|
setup.useWindowsUnicode = true;
|
||||||
} else if (!std::strcmp(argv[i], "--use-windows-ansi")) {
|
} else if (!std::strcmp(argv[i], "--use-windows-ansi")) {
|
||||||
setup.useWindowsUnicode = false;
|
setup.useWindowsUnicode = false;
|
||||||
|
} else if (!std::strcmp(argv[i], "--use-windows-subsystem")) {
|
||||||
|
setup.useWindowsSubsystem = true;
|
||||||
} else if (!std::strcmp(argv[i], "--use-xcframework")) {
|
} else if (!std::strcmp(argv[i], "--use-xcframework")) {
|
||||||
setup.useXCFramework = true;
|
setup.useXCFramework = true;
|
||||||
} else if (!std::strcmp(argv[i], "--vcpkg")) {
|
} else if (!std::strcmp(argv[i], "--vcpkg")) {
|
||||||
@ -753,6 +755,7 @@ void displayHelp(const char *exe) {
|
|||||||
" (default: true)\n"
|
" (default: true)\n"
|
||||||
" --use-windows-ansi Use Windows ANSI APIs\n"
|
" --use-windows-ansi Use Windows ANSI APIs\n"
|
||||||
" (default: false)\n"
|
" (default: false)\n"
|
||||||
|
" --use-windows-subsystem Use Windows subsystem instead of Console\n"
|
||||||
" --libs-path path Specify the path of pre-built libraries instead of using the\n"
|
" --libs-path path Specify the path of pre-built libraries instead of using the\n"
|
||||||
" " LIBS_DEFINE " environment variable\n "
|
" " LIBS_DEFINE " environment variable\n "
|
||||||
" --vcpkg Use vcpkg-provided libraries instead of pre-built libraries\n"
|
" --vcpkg Use vcpkg-provided libraries instead of pre-built libraries\n"
|
||||||
|
@ -248,6 +248,7 @@ struct BuildSetup {
|
|||||||
bool useSDL2; ///< Whether to use SDL2 or not.
|
bool useSDL2; ///< Whether to use SDL2 or not.
|
||||||
bool useStaticDetection; ///< Whether to link detection features inside the executable or not.
|
bool useStaticDetection; ///< Whether to link detection features inside the executable or not.
|
||||||
bool useWindowsUnicode; ///< Whether to use Windows Unicode APIs or ANSI APIs.
|
bool useWindowsUnicode; ///< Whether to use Windows Unicode APIs or ANSI APIs.
|
||||||
|
bool useWindowsSubsystem; ///< Whether to use Windows subsystem or Console subsystem (default: Console)
|
||||||
bool useXCFramework; ///< Whether to use Apple XCFrameworks instead of static libraries
|
bool useXCFramework; ///< Whether to use Apple XCFrameworks instead of static libraries
|
||||||
bool useVcpkg; ///< Whether to load libraries from vcpkg or SCUMMVM_LIBS
|
bool useVcpkg; ///< Whether to load libraries from vcpkg or SCUMMVM_LIBS
|
||||||
|
|
||||||
@ -259,6 +260,7 @@ struct BuildSetup {
|
|||||||
useSDL2 = true;
|
useSDL2 = true;
|
||||||
useStaticDetection = true;
|
useStaticDetection = true;
|
||||||
useWindowsUnicode = true;
|
useWindowsUnicode = true;
|
||||||
|
useWindowsSubsystem = false;
|
||||||
useXCFramework = false;
|
useXCFramework = false;
|
||||||
useVcpkg = false;
|
useVcpkg = false;
|
||||||
}
|
}
|
||||||
|
@ -416,10 +416,11 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
|
|||||||
<< "\t\t</ClCompile>\n"
|
<< "\t\t</ClCompile>\n"
|
||||||
<< "\t\t<Link>\n"
|
<< "\t\t<Link>\n"
|
||||||
<< "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n";
|
<< "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n";
|
||||||
if (!setup.featureEnabled("text-console") && !setup.devTools && !setup.tests) {
|
// console subsystem is required for text-console, tools, and tests
|
||||||
properties << "\t\t\t<SubSystem>Windows</SubSystem>\n";
|
if (!setup.useWindowsSubsystem || setup.featureEnabled("text-console") || setup.devTools || setup.tests) {
|
||||||
} else {
|
|
||||||
properties << "\t\t\t<SubSystem>Console</SubSystem>\n";
|
properties << "\t\t\t<SubSystem>Console</SubSystem>\n";
|
||||||
|
} else {
|
||||||
|
properties << "\t\t\t<SubSystem>Windows</SubSystem>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!setup.devTools && !setup.tests)
|
if (!setup.devTools && !setup.tests)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user