From 89e56bfa51017a55aea9fe865e41a4cdd84250bf Mon Sep 17 00:00:00 2001 From: Bastien Maureille Date: Mon, 11 May 2026 14:59:26 +0200 Subject: [PATCH] Update win target to MSVC v145 and enable all possible Release optimizations --- .github/workflows/build.yml | 34 +++++++++++++++++----------------- hl.vcxproj | 12 ++++++++++-- libhl.vcxproj | 12 ++++++++++-- libs/directx/directx.vcxproj | 12 ++++++++++-- libs/directx/dx12.vcxproj | 12 ++++++++++-- libs/directx/dx12debug.vcxproj | 12 ++++++++++-- libs/fmt/fmt.vcxproj | 12 ++++++++++-- libs/heaps/heaps.vcxproj | 12 ++++++++++-- libs/mysql/mysql.vcxproj | 12 ++++++++++-- libs/openal/openal.vcxproj | 12 ++++++++++-- libs/sdl/sdl.vcxproj | 12 ++++++++++-- libs/sqlite/sqlite.vcxproj | 12 ++++++++++-- libs/ssl/ssl.vcxproj | 12 ++++++++++-- libs/ui/ui.vcxproj | 12 ++++++++++-- libs/uv/uv.vcxproj | 14 +++++++++++--- libs/uv/uv.vcxproj.filters | 5 +---- libs/video/video.vcxproj | 12 ++++++------ other/haxelib/Run.hx | 12 +++++++++--- 18 files changed, 174 insertions(+), 59 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e9da8106..9c2d998ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: matrix: target: [linux, darwin, windows] architecture: [32, 64, arm64] - build_system: [make, cmake, cmake-mingw, cmake-clang-cl, vs2019, makegcc14] + build_system: [make, cmake, cmake-mingw, cmake-clang-cl, vs2026, makegcc14] include: - target: linux @@ -59,25 +59,25 @@ jobs: - build_system: cmake-clang-cl cmake_configuration: RelWithDebInfo - - build_system: vs2019 + - build_system: vs2026 msbuild_configuration: Release - target: windows - runner: windows-2022 # has VS 2022 preinstalled which supports PlatformToolset <= v142, WindowsTargetPlatformVersion 10 + runner: windows-2025-vs2026 # has VS 2026 preinstalled which supports PlatformToolset <= v145, WindowsTargetPlatformVersion 10 haxe_nightly_dir: windows64 archive_ext: zip - target: windows build_system: cmake - cmake_generator: Visual Studio 17 2022 + cmake_generator: Visual Studio 18 2026 - target: windows - runner: windows-2025 + runner: windows-latest build_system: cmake-mingw - target: windows build_system: cmake-clang-cl - cmake_generator: Visual Studio 17 2022 + cmake_generator: Visual Studio 18 2026 - target: windows architecture: 32 @@ -91,10 +91,10 @@ jobs: exclude: - target: linux - build_system: vs2019 + build_system: vs2026 - target: darwin - build_system: vs2019 + build_system: vs2026 - target: darwin architecture: 32 @@ -128,8 +128,8 @@ jobs: uses: actions/checkout@v6 - name: "Add msbuild to PATH" - if: matrix.build_system == 'vs2019' - uses: microsoft/setup-msbuild@v2 + if: matrix.build_system == 'vs2026' + uses: microsoft/setup-msbuild@v3 - name: "Mac homebrew workaround" if: matrix.target == 'darwin' @@ -276,7 +276,7 @@ jobs: BUILD_FOLDER=build/bin ;; - vs2019) + vs2026) MSBuild.exe hl.sln //nologo //m //clp:ErrorsOnly \ //p:Configuration=${{ matrix.msbuild_configuration }} \ //p:Platform=${{ matrix.architecture_string }} @@ -322,7 +322,7 @@ jobs: esac cd build && ctest --verbose --build-config ${{ matrix.cmake_configuration }} ;; - vs2019) + vs2026) ${{ env.WINDOWS_BUILD_FOLDER }}/hl.exe --version ;; make*) @@ -455,7 +455,7 @@ jobs: runner: macos-latest - os: windows - runner: windows-latest + runner: windows-2025-vs2026 exclude: - os: darwin @@ -471,7 +471,7 @@ jobs: uses: actions/download-artifact@v8 with: name: | - ${{ matrix.os }}-${{ matrix.os == 'windows' && 'vs2019' || 'make' }}-${{ + ${{ matrix.os }}-${{ matrix.os == 'windows' && 'vs2026' || 'make' }}-${{ matrix.architecture == 'arm64' && 'arm64' || matrix.architecture == 'x86_64' && '64' || matrix.architecture == 'x86_32' && '32' @@ -498,7 +498,7 @@ jobs: brew install libpng jpeg-turbo libvorbis sqlite mbedtls - name: Install msbuild - uses: microsoft/setup-msbuild@v2 + uses: microsoft/setup-msbuild@v3 if: matrix.os == 'windows' with: msbuild-architecture: ${{ matrix.architecture == 'x86_64' && 'x64' || 'x86' }} @@ -590,6 +590,6 @@ jobs: "linux-make-32/hashlink-${short_commit}-linux-i386.tar.gz#hashlink-latest-linux-i386.tar.gz" \ "linux-make-64/hashlink-${short_commit}-linux-amd64.tar.gz#hashlink-latest-linux-amd64.tar.gz" \ "linux-make-arm64/hashlink-${short_commit}-linux-arm64.tar.gz#hashlink-latest-linux-arm64.tar.gz" \ - "windows-vs2019-32/hashlink-${short_commit}-win32.zip#hashlink-latest-win32.zip" \ - "windows-vs2019-64/hashlink-${short_commit}-win64.zip#hashlink-latest-win64.zip" \ + "windows-vs2026-32/hashlink-${short_commit}-win32.zip#hashlink-latest-win32.zip" \ + "windows-vs2026-64/hashlink-${short_commit}-win64.zip#hashlink-latest-win64.zip" \ "windows-cmake-mingw-64/hashlink-${short_commit}-win64-cmake-mingw.zip#hashlink-latest-win64-mingw.zip" diff --git a/hl.vcxproj b/hl.vcxproj index 88e95b28b..f3456705b 100644 --- a/hl.vcxproj +++ b/hl.vcxproj @@ -58,7 +58,7 @@ false true Unicode - v142 + v145 Application @@ -79,7 +79,7 @@ false true Unicode - v142 + v145 Application @@ -215,6 +215,10 @@ false true stdc11 + AnySuitable + Speed + true + true Console @@ -295,6 +299,10 @@ false true stdc11 + AnySuitable + Speed + true + true Console diff --git a/libhl.vcxproj b/libhl.vcxproj index 40f1a2eff..6d4db9191 100644 --- a/libhl.vcxproj +++ b/libhl.vcxproj @@ -42,7 +42,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -62,7 +62,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -172,6 +172,10 @@ false true stdc11 + AnySuitable + Speed + true + true Windows @@ -216,6 +220,10 @@ false true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/directx/directx.vcxproj b/libs/directx/directx.vcxproj index eaf396d51..979be0976 100644 --- a/libs/directx/directx.vcxproj +++ b/libs/directx/directx.vcxproj @@ -47,7 +47,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -67,7 +67,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -182,6 +182,10 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;DIRECTX_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -224,6 +228,10 @@ NDEBUG;_WINDOWS;_USRDLL;DIRECTX_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/directx/dx12.vcxproj b/libs/directx/dx12.vcxproj index 3a88ec8b2..f320b5ff4 100644 --- a/libs/directx/dx12.vcxproj +++ b/libs/directx/dx12.vcxproj @@ -37,7 +37,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -50,7 +50,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -144,6 +144,10 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;DIRECTX_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -165,6 +169,10 @@ NDEBUG;_WINDOWS;_USRDLL;DIRECTX_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/directx/dx12debug.vcxproj b/libs/directx/dx12debug.vcxproj index 266535f32..de4a7c0ff 100644 --- a/libs/directx/dx12debug.vcxproj +++ b/libs/directx/dx12debug.vcxproj @@ -37,7 +37,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -50,7 +50,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -144,6 +144,10 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;DIRECTX_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -165,6 +169,10 @@ NDEBUG;_WINDOWS;_USRDLL;DIRECTX_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/fmt/fmt.vcxproj b/libs/fmt/fmt.vcxproj index 1c4457932..583b85890 100644 --- a/libs/fmt/fmt.vcxproj +++ b/libs/fmt/fmt.vcxproj @@ -189,7 +189,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -209,7 +209,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -328,6 +328,10 @@ /wd4996 %(AdditionalOptions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -374,6 +378,10 @@ /wd4996 %(AdditionalOptions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/heaps/heaps.vcxproj b/libs/heaps/heaps.vcxproj index affbf196a..9a470e98e 100644 --- a/libs/heaps/heaps.vcxproj +++ b/libs/heaps/heaps.vcxproj @@ -68,7 +68,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -81,7 +81,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -156,6 +156,10 @@ NotUsing pch.h stdc11 + AnySuitable + Speed + true + true Windows @@ -193,6 +197,10 @@ NotUsing pch.h stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/mysql/mysql.vcxproj b/libs/mysql/mysql.vcxproj index 8c71576fc..51bafe6c9 100644 --- a/libs/mysql/mysql.vcxproj +++ b/libs/mysql/mysql.vcxproj @@ -55,7 +55,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -75,7 +75,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -191,6 +191,10 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;MYSQL_EXPORTS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS true stdc11 + AnySuitable + Speed + true + true Windows @@ -235,6 +239,10 @@ NDEBUG;_WINDOWS;_USRDLL;MYSQL_EXPORTS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/openal/openal.vcxproj b/libs/openal/openal.vcxproj index bb15d7406..9244fa5c7 100644 --- a/libs/openal/openal.vcxproj +++ b/libs/openal/openal.vcxproj @@ -42,7 +42,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -62,7 +62,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -178,6 +178,10 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;OPENAL_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -222,6 +226,10 @@ NDEBUG;_WINDOWS;_USRDLL;OPENAL_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/sdl/sdl.vcxproj b/libs/sdl/sdl.vcxproj index 8036fd5bf..b3412073b 100644 --- a/libs/sdl/sdl.vcxproj +++ b/libs/sdl/sdl.vcxproj @@ -42,7 +42,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -62,7 +62,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -178,6 +178,10 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;SDL_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -222,6 +226,10 @@ NDEBUG;_WINDOWS;_USRDLL;SDL_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/sqlite/sqlite.vcxproj b/libs/sqlite/sqlite.vcxproj index bec023758..29db4a894 100644 --- a/libs/sqlite/sqlite.vcxproj +++ b/libs/sqlite/sqlite.vcxproj @@ -42,7 +42,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -62,7 +62,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -179,6 +179,10 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -221,6 +225,10 @@ NDEBUG;_WINDOWS;_USRDLL;SQLITE_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/ssl/ssl.vcxproj b/libs/ssl/ssl.vcxproj index 3e2c48778..24cad5687 100644 --- a/libs/ssl/ssl.vcxproj +++ b/libs/ssl/ssl.vcxproj @@ -153,7 +153,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -173,7 +173,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -288,6 +288,10 @@ MBEDTLS_USER_CONFIG_FILE="mbedtls_user_config.h";_WINDOWS;_USRDLL;WIN32;NDEBUG;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -330,6 +334,10 @@ MBEDTLS_USER_CONFIG_FILE="mbedtls_user_config.h";_WINDOWS;_USRDLL;NDEBUG;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/ui/ui.vcxproj b/libs/ui/ui.vcxproj index 2facedb0e..6e0665679 100644 --- a/libs/ui/ui.vcxproj +++ b/libs/ui/ui.vcxproj @@ -42,7 +42,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -62,7 +62,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -177,6 +177,10 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;UI_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -219,6 +223,10 @@ NDEBUG;_WINDOWS;_USRDLL;UI_EXPORTS;%(PreprocessorDefinitions) true stdc11 + AnySuitable + Speed + true + true Windows diff --git a/libs/uv/uv.vcxproj b/libs/uv/uv.vcxproj index b3d4eec6e..5b216de0c 100644 --- a/libs/uv/uv.vcxproj +++ b/libs/uv/uv.vcxproj @@ -42,7 +42,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -62,7 +62,7 @@ DynamicLibrary false - v142 + v145 true Unicode @@ -181,6 +181,10 @@ /wd4267 /wd4244 /wd4996 %(AdditionalOptions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -227,6 +231,10 @@ /wd4267 /wd4244 /wd4996 %(AdditionalOptions) true stdc11 + AnySuitable + Speed + true + true Windows @@ -310,4 +318,4 @@ - + \ No newline at end of file diff --git a/libs/uv/uv.vcxproj.filters b/libs/uv/uv.vcxproj.filters index 7d5fc351a..c7b556d25 100644 --- a/libs/uv/uv.vcxproj.filters +++ b/libs/uv/uv.vcxproj.filters @@ -126,9 +126,6 @@ libuv - - libuv - libuv @@ -148,4 +145,4 @@ libuv - + \ No newline at end of file diff --git a/libs/video/video.vcxproj b/libs/video/video.vcxproj index cb2671496..bb034fd1a 100644 --- a/libs/video/video.vcxproj +++ b/libs/video/video.vcxproj @@ -39,40 +39,40 @@ DynamicLibrary true - v140 + v145 Unicode DynamicLibrary false - v140 + v145 true Unicode StaticLibrary false - v140 + v145 true Unicode DynamicLibrary true - v140 + v145 Unicode DynamicLibrary false - v140 + v145 true Unicode DynamicLibrary false - v140 + v145 true Unicode diff --git a/other/haxelib/Run.hx b/other/haxelib/Run.hx index 6ac46a46a..b01cef0bb 100644 --- a/other/haxelib/Run.hx +++ b/other/haxelib/Run.hx @@ -30,7 +30,7 @@ class Build { } static function getDefaultTemplate() { - return (Sys.systemName() == "Windows") ? "vs2022" : "make"; + return (Sys.systemName() == "Windows") ? "vs2026" : "make"; } public function generate() { @@ -58,9 +58,15 @@ class Build { case _: []; }; Sys.command("haxelib", ["--cwd", targetDir, "run", "hxcpp", "Build.xml"].concat(config.defines.exists("debug") ? ["-Ddebug"] : []).concat(platformArgs)); - case "vs2019", "vs2022": + case "vs2019", "vs2022", "vs2026": + var version = switch (tpl) { + case "vs2019": "[16.0,17.0]"; + case "vs2022": "[17.0,18.0]"; + case "vs2026": "[18.0,19.0]"; + default: null; + } var vswhereProc = new sys.io.Process("C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vswhere.exe", ["-requires", "Microsoft.Component.MSBuild", "-find", "MSBuild", - "-version", tpl == "vs2019" ? "[16.0,17.0]" : "[17.0,18.0]" + "-version", version ]); var code = 0; if( vswhereProc.exitCode() == 0 ) {