From c39ab11553f29ed42e0ceefe63b8cfb41af7a654 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Fri, 6 Feb 2026 13:22:27 -0500 Subject: [PATCH 01/20] Upgrade to Visual Studio 2026 (v145 toolset) - Create Directory.Build.props for centralized build configuration - Update solution file to VS 18 format - Update .vsconfig to require Windows 11 SDK (10.0.22621.0) - Remove PlatformToolset and WindowsTargetPlatformVersion from mapistub.vcxproj - Remove Guardian .gdn ruleset references (CI-only dependency) Breaking change: Requires Visual Studio 2026 --- .vsconfig | 2 +- Directory.Build.props | 25 ++++++ mapistub.sln | 4 +- mapistub.vcxproj | 177 ------------------------------------------ 4 files changed, 28 insertions(+), 180 deletions(-) create mode 100644 Directory.Build.props diff --git a/.vsconfig b/.vsconfig index 77f62a5..da07a9d 100644 --- a/.vsconfig +++ b/.vsconfig @@ -29,7 +29,7 @@ "Microsoft.VisualStudio.Component.VC.Tools.ARM64", "Microsoft.VisualStudio.Component.VC.Tools.ARM64EC", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", - "Microsoft.VisualStudio.Component.Windows10SDK.18362", + "Microsoft.VisualStudio.Component.Windows11SDK.22621", "Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native", "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core", "Microsoft.VisualStudio.Workload.CoreEditor", diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..273c79f --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + v145 + + + 10.0.22621.0 + + + Spectre + Guard + true + + + + + + Level4 + true + true + stdcpplatest + + + diff --git a/mapistub.sln b/mapistub.sln index 0551dde..13a02ef 100644 --- a/mapistub.sln +++ b/mapistub.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.779 +# Visual Studio Version 18 +VisualStudioVersion = 18.0.0.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapistub", "mapistub.vcxproj", "{ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}" EndProject diff --git a/mapistub.vcxproj b/mapistub.vcxproj index 1a0a120..8d6a8a9 100644 --- a/mapistub.vcxproj +++ b/mapistub.vcxproj @@ -120,55 +120,42 @@ {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C} mapistub - 10.0 StaticLibrary Unicode - v143 true - Spectre false StaticLibrary MultiByte - v143 true - Spectre false StaticLibrary MultiByte - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre true StaticLibrary Unicode - v143 false - Spectre true true true @@ -176,57 +163,43 @@ StaticLibrary MultiByte - v143 false - Spectre true StaticLibrary Unicode - v143 true - Spectre false StaticLibrary MultiByte - v143 true - Spectre false StaticLibrary MultiByte - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre true StaticLibrary Unicode - v143 false - Spectre true true true @@ -234,57 +207,43 @@ StaticLibrary MultiByte - v143 false - Spectre true StaticLibrary Unicode - v143 true - Spectre false StaticLibrary MultiByte - v143 true - Spectre false StaticLibrary MultiByte - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre true StaticLibrary Unicode - v143 false - Spectre true true true @@ -292,57 +251,43 @@ StaticLibrary MultiByte - v143 false - Spectre true StaticLibrary Unicode - v143 true - Spectre false StaticLibrary MultiByte - v143 true - Spectre false StaticLibrary MultiByte - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre true StaticLibrary Unicode - v143 false - Spectre true true true @@ -350,9 +295,7 @@ StaticLibrary MultiByte - v143 false - Spectre true @@ -462,11 +405,9 @@ true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset @@ -479,11 +420,9 @@ true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset @@ -499,11 +438,9 @@ true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset @@ -515,11 +452,9 @@ true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset @@ -533,15 +468,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -564,15 +495,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -594,15 +521,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -625,15 +548,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -656,15 +575,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -686,15 +601,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -716,15 +627,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -745,15 +652,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -774,15 +677,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -803,15 +702,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -831,15 +726,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -859,15 +750,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -887,15 +774,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -916,15 +799,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -944,15 +823,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -975,15 +850,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1005,15 +876,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1036,15 +903,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1067,15 +930,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1097,15 +956,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1127,15 +982,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -1156,15 +1007,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -1185,15 +1032,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -1214,15 +1057,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -1242,15 +1081,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -1270,15 +1105,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -1298,15 +1129,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -1327,15 +1154,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard From 397ed259b457a3e2739a749b67865d5e696fed60 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Fri, 6 Feb 2026 15:42:47 -0500 Subject: [PATCH 02/20] ensure config --- .github/workflows/codeql.yml | 12 +++++++++++- .github/workflows/github-ci.yml | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c08e6ee..90e0db7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -15,7 +15,8 @@ permissions: jobs: analyze: name: Analyze (${{ matrix.language }}) - runs-on: windows-latest + # Use VS 2026 preview runner (GA May 4, 2026, then switch to windows-2025) + runs-on: windows-2025-vs2026 permissions: packages: read actions: read @@ -39,6 +40,15 @@ jobs: with: submodules: 'recursive' + - name: Install required VS components from .vsconfig + shell: pwsh + run: | + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + $installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe" + Write-Host "Installing components from .vsconfig..." + & $installer modify --installPath $vsPath --config "${{ github.workspace }}\.vsconfig" --quiet --norestart --wait + Write-Host "VS components installation complete" + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 425a67b..96c4ffa 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -13,7 +13,8 @@ permissions: jobs: build: - runs-on: windows-latest + # Use VS 2026 preview runner (GA May 4, 2026, then switch to windows-2025) + runs-on: windows-2025-vs2026 permissions: security-events: write strategy: @@ -32,6 +33,15 @@ jobs: with: submodules: 'recursive' + - name: Install required VS components from .vsconfig + shell: pwsh + run: | + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + $installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe" + Write-Host "Installing components from .vsconfig..." + & $installer modify --installPath $vsPath --config "${{ github.workspace }}\.vsconfig" --quiet --norestart --wait + Write-Host "VS components installation complete" + - name: "Build" shell: pwsh run: | From 7a8ec30e5cb07001de606ac07138a59fd83d2904 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Fri, 6 Feb 2026 15:47:10 -0500 Subject: [PATCH 03/20] install sdk --- .github/workflows/codeql.yml | 26 ++++++++++++++++++++------ .github/workflows/github-ci.yml | 26 ++++++++++++++++++++------ 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 90e0db7..dba2a31 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -40,14 +40,28 @@ jobs: with: submodules: 'recursive' - - name: Install required VS components from .vsconfig + - name: Install Windows 11 SDK (10.0.22621.0) shell: pwsh run: | - $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath - $installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe" - Write-Host "Installing components from .vsconfig..." - & $installer modify --installPath $vsPath --config "${{ github.workspace }}\.vsconfig" --quiet --norestart --wait - Write-Host "VS components installation complete" + $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 already installed" + exit 0 + } + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + $installer = "$env:TEMP\winsdksetup.exe" + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + Write-Host "Installing SDK (this may take a few minutes)..." + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + Write-Host "Installer exit code: $($proc.ExitCode)" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + } else { + Write-Host "SDK install log:" + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed - path not found: $sdkPath" + exit 1 + } # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 96c4ffa..8197f19 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -33,14 +33,28 @@ jobs: with: submodules: 'recursive' - - name: Install required VS components from .vsconfig + - name: Install Windows 11 SDK (10.0.22621.0) shell: pwsh run: | - $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath - $installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe" - Write-Host "Installing components from .vsconfig..." - & $installer modify --installPath $vsPath --config "${{ github.workspace }}\.vsconfig" --quiet --norestart --wait - Write-Host "VS components installation complete" + $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 already installed" + exit 0 + } + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + $installer = "$env:TEMP\winsdksetup.exe" + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + Write-Host "Installing SDK (this may take a few minutes)..." + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + Write-Host "Installer exit code: $($proc.ExitCode)" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + } else { + Write-Host "SDK install log:" + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed - path not found: $sdkPath" + exit 1 + } - name: "Build" shell: pwsh From f8efc98aac16244962fbe43406e56569af20c9d1 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Fri, 6 Feb 2026 15:57:29 -0500 Subject: [PATCH 04/20] update codeql --- .github/workflows/clang.yml | 2 +- .github/workflows/codeql.yml | 6 +++--- .github/workflows/devskim.yml | 4 ++-- .github/workflows/github-ci.yml | 2 +- .github/workflows/scorecards.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index ed49e20..4c40cf6 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -24,4 +24,4 @@ jobs: with: clang-format-version: '17' exclude-regex: 'include/*' - fallback-style: 'Microsoft' \ No newline at end of file + fallback-style: 'Microsoft' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index dba2a31..f7da21d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -65,7 +65,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/init@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -77,11 +77,11 @@ jobs: # queries: security-extended,security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/autobuild@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 - name: Perform CodeQL Analysis id: analyze - uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/analyze@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml index 798fe2e..b650e33 100644 --- a/.github/workflows/devskim.yml +++ b/.github/workflows/devskim.yml @@ -29,11 +29,11 @@ jobs: uses: microsoft/DevSkim-Action@4b5047945a44163b94642a1cecc0d93a3f428cc6 # v1.0.16 - name: Upload DevSkim scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/upload-sarif@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: sarif_file: devskim-results.sarif - name: Upload DevSkim scan results as an artifact uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: - path: devskim-results.sarif \ No newline at end of file + path: devskim-results.sarif diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 8197f19..eceb64e 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -87,4 +87,4 @@ jobs: - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0 with: - files: "artifacts/**/*.trx" \ No newline at end of file + files: "artifacts/**/*.trx" diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 5d28141..454041f 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -71,6 +71,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/upload-sarif@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: sarif_file: results.sarif From 2405bc043c470259a3c30a51dbda4db33ae24be6 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Fri, 6 Feb 2026 18:14:05 -0500 Subject: [PATCH 05/20] add arm builds --- Directory.Build.props | 14 ++++++- mapistub.vcxproj | 87 +------------------------------------------ 2 files changed, 15 insertions(+), 86 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 273c79f..77d0167 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,9 +8,14 @@ 10.0.22621.0 - Spectre + + Spectre + false Guard true + + + @@ -22,4 +27,11 @@ stdcpplatest + + + + + false + + diff --git a/mapistub.vcxproj b/mapistub.vcxproj index 8d6a8a9..9bbe91b 100644 --- a/mapistub.vcxproj +++ b/mapistub.vcxproj @@ -20,14 +20,6 @@ Debug x64 - - Fuzz - ARM64 - - - Fuzz - ARM64EC - Fuzz Win32 @@ -157,7 +149,7 @@ Unicode false true - true + true true @@ -201,7 +193,7 @@ Unicode false true - true + true true @@ -240,14 +232,6 @@ false true - - StaticLibrary - Unicode - false - true - true - true - StaticLibrary MultiByte @@ -284,14 +268,6 @@ false true - - StaticLibrary - Unicode - false - true - true - true - StaticLibrary MultiByte @@ -360,9 +336,6 @@ - - - @@ -381,9 +354,6 @@ - - - @@ -895,33 +865,6 @@ true - - - MaxSpeed - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) - true - MultiThreaded - true - ProgramDatabase - true - true - Default - true - Guard - - - _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - true - true - - MaxSpeed @@ -948,32 +891,6 @@ true - - - MaxSpeed - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) - true - MultiThreaded - true - ProgramDatabase - true - true - Default - true - Guard - - - _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - true - true - - Disabled From 8e457ffb77cab84eb4b5949d0fb9704d54cedaca Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Mon, 9 Feb 2026 12:38:03 -0500 Subject: [PATCH 06/20] update ci for arm --- .github/workflows/github-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 55fc0ab..9ef72a7 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -18,9 +18,16 @@ jobs: permissions: security-events: write strategy: + fail-fast: false matrix: configuration: [ 'Release', 'Debug', 'Release_Unicode', 'Debug_Unicode' ] - platform: [ 'Win32', 'x64' ] + platform: [ 'Win32', 'x64', 'ARM64EC' ] + exclude: + # ARM64EC only needs Unicode builds + - platform: ARM64EC + configuration: Release + - platform: ARM64EC + configuration: Debug steps: - name: Harden Runner @@ -45,7 +52,7 @@ jobs: $installer = "$env:TEMP\winsdksetup.exe" Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer Write-Host "Installing SDK (this may take a few minutes)..." - $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru Write-Host "Installer exit code: $($proc.ExitCode)" if (Test-Path $sdkPath) { Write-Host "Windows SDK 10.0.22621.0 installed successfully" From 8c7b20df062c2be284375a9958e0cc9e55951f25 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Tue, 17 Feb 2026 17:05:29 -0500 Subject: [PATCH 07/20] Remove Prefast configurations from mapistub Prefast analysis now enabled on-demand via MSBuild property (/p:EnablePREfast=true) instead of separate build configurations. --- mapistub.sln | 14 +- mapistub.vcxproj | 326 +---------------------------------------------- 2 files changed, 2 insertions(+), 338 deletions(-) diff --git a/mapistub.sln b/mapistub.sln index 13a02ef..2feaa23 100644 --- a/mapistub.sln +++ b/mapistub.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 18 VisualStudioVersion = 18.0.0.0 @@ -15,10 +15,6 @@ Global Debug|Win32 = Debug|Win32 Debug|ARM64 = Debug|ARM64 Debug|ARM64EC = Debug|ARM64EC - Prefast|x64 = Prefast|x64 - Prefast|Win32 = Prefast|Win32 - Prefast|ARM64 = Prefast|ARM64 - Prefast|ARM64EC = Prefast|ARM64EC Release_Unicode|x64 = Release_Unicode|x64 Release_Unicode|Win32 = Release_Unicode|Win32 Release_Unicode|ARM64 = Release_Unicode|ARM64 @@ -45,14 +41,6 @@ Global {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|ARM64.Build.0 = Debug|ARM64 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|ARM64EC.Build.0 = Debug|ARM64EC - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|x64.ActiveCfg = Prefast|x64 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|x64.Build.0 = Prefast|x64 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|Win32.ActiveCfg = Prefast|Win32 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|Win32.Build.0 = Prefast|Win32 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|ARM64.ActiveCfg = Prefast|ARM64 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|ARM64.Build.0 = Prefast|ARM64 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|ARM64EC.ActiveCfg = Prefast|ARM64EC - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|ARM64EC.Build.0 = Prefast|ARM64EC {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|x64.ActiveCfg = Release_Unicode|x64 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|x64.Build.0 = Release_Unicode|x64 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 diff --git a/mapistub.vcxproj b/mapistub.vcxproj index 9bbe91b..55894f1 100644 --- a/mapistub.vcxproj +++ b/mapistub.vcxproj @@ -1,4 +1,4 @@ - + @@ -28,22 +28,6 @@ Fuzz x64 - - Prefast_Unicode - Win32 - - - Prefast_Unicode - x64 - - - Prefast - Win32 - - - Prefast - x64 - Release_Unicode Win32 @@ -76,22 +60,6 @@ Debug ARM64EC - - Prefast_Unicode - ARM64 - - - Prefast_Unicode - ARM64EC - - - Prefast - ARM64 - - - Prefast - ARM64EC - Release_Unicode ARM64 @@ -126,18 +94,6 @@ true false - - StaticLibrary - MultiByte - false - false - - - StaticLibrary - Unicode - false - false - StaticLibrary Unicode @@ -170,18 +126,6 @@ true false - - StaticLibrary - MultiByte - false - false - - - StaticLibrary - Unicode - false - false - StaticLibrary Unicode @@ -214,18 +158,6 @@ true false - - StaticLibrary - MultiByte - false - false - - - StaticLibrary - Unicode - false - false - StaticLibrary Unicode @@ -250,18 +182,6 @@ true false - - StaticLibrary - MultiByte - false - false - - - StaticLibrary - Unicode - false - false - StaticLibrary Unicode @@ -285,12 +205,6 @@ - - - - - - @@ -306,12 +220,6 @@ - - - - - - @@ -327,12 +235,6 @@ - - - - - - @@ -345,12 +247,6 @@ - - - - - - @@ -373,12 +269,6 @@ true - - true - - - true - @@ -388,12 +278,6 @@ true - - true - - - true - @@ -406,12 +290,6 @@ true - - true - - - true - @@ -420,12 +298,6 @@ true - - true - - - true - @@ -614,56 +486,6 @@ true - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - ProgramDatabase - true - true - false - false - Guard - - - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - ProgramDatabase - true - true - false - false - Guard - - - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - - Disabled @@ -688,54 +510,6 @@ true - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - ProgramDatabase - true - true - false - false - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - ProgramDatabase - true - true - false - false - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - - Disabled @@ -916,56 +690,6 @@ true - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - ProgramDatabase - true - true - false - false - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - ProgramDatabase - true - true - false - false - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - - Disabled @@ -990,54 +714,6 @@ true - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - ProgramDatabase - true - true - false - false - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - ProgramDatabase - true - true - false - false - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - - Disabled From bba20d7b783e5deb350c45145cd8341551714189 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Tue, 17 Feb 2026 17:21:17 -0500 Subject: [PATCH 08/20] replace broken clang action --- .github/workflows/clang.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index c29a69a..7729380 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -19,9 +19,23 @@ jobs: egress-policy: audit - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run clang-format style check for C/C++ programs. - uses: jidicula/clang-format-action@6cd220de46c89139a0365edae93eee8eb30ca8fe # v4.16.0 - with: - clang-format-version: '17' - exclude-regex: 'include/*' - fallback-style: 'Microsoft' + + - name: Install clang-format + run: | + sudo apt-get update + sudo apt-get install -y clang-format-17 + + - name: Run clang-format style check + run: | + # Find all C/C++ files, excluding include directory + files=$(find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) \ + ! -path "./include/*" ! -path "./.git/*") + + if [ -z "$files" ]; then + echo "No C/C++ files found" + exit 0 + fi + + # Check formatting (--dry-run -Werror exits non-zero if changes needed) + echo "Checking formatting..." + echo "$files" | xargs clang-format-17 --dry-run -Werror --style=file --fallback-style=Microsoft From 14f70be0177b1f343a029012d9ef313a172efd67 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Tue, 17 Feb 2026 17:25:49 -0500 Subject: [PATCH 09/20] update clang action --- .github/workflows/clang.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 7729380..2d86a94 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -29,7 +29,7 @@ jobs: run: | # Find all C/C++ files, excluding include directory files=$(find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) \ - ! -path "./include/*" ! -path "./.git/*") + ! -path "./include/*" ! -path "./.git/*" | sort) if [ -z "$files" ]; then echo "No C/C++ files found" @@ -37,5 +37,4 @@ jobs: fi # Check formatting (--dry-run -Werror exits non-zero if changes needed) - echo "Checking formatting..." - echo "$files" | xargs clang-format-17 --dry-run -Werror --style=file --fallback-style=Microsoft + echo "$files" | xargs clang-format-17 --verbose --dry-run -Werror --style=file --fallback-style=Microsoft From 0f6a5a411c1ab0957d742d5ae0a86e5ef76ff301 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Tue, 17 Feb 2026 17:48:50 -0500 Subject: [PATCH 10/20] Update .github/workflows/codeql.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/codeql.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 10da5b0..2ecb15c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -51,6 +51,13 @@ jobs: Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." $installer = "$env:TEMP\winsdksetup.exe" Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + Write-Host "Verifying Authenticode signature for downloaded SDK installer..." + $signature = Get-AuthenticodeSignature -FilePath $installer + if ($null -eq $signature -or $signature.Status -ne 'Valid' -or $null -eq $signature.SignerCertificate -or $signature.SignerCertificate.Subject -notlike '*Microsoft*') { + Write-Error ("Downloaded SDK installer failed Authenticode validation. " + + "Status: {0}. Subject: {1}" -f $signature.Status, $signature.SignerCertificate.Subject) + exit 1 + } Write-Host "Installing SDK (this may take a few minutes)..." $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru Write-Host "Installer exit code: $($proc.ExitCode)" From a0109fbbdf24c4b9cb9d3a1b7aad9d40226a2880 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Tue, 17 Feb 2026 17:49:12 -0500 Subject: [PATCH 11/20] Update .github/workflows/codeql.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/codeql.yml | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2ecb15c..f31d194 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,25 +50,7 @@ jobs: } Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." $installer = "$env:TEMP\winsdksetup.exe" - Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer - Write-Host "Verifying Authenticode signature for downloaded SDK installer..." - $signature = Get-AuthenticodeSignature -FilePath $installer - if ($null -eq $signature -or $signature.Status -ne 'Valid' -or $null -eq $signature.SignerCertificate -or $signature.SignerCertificate.Subject -notlike '*Microsoft*') { - Write-Error ("Downloaded SDK installer failed Authenticode validation. " + - "Status: {0}. Subject: {1}" -f $signature.Status, $signature.SignerCertificate.Subject) - exit 1 - } - Write-Host "Installing SDK (this may take a few minutes)..." - $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru - Write-Host "Installer exit code: $($proc.ExitCode)" - if (Test-Path $sdkPath) { - Write-Host "Windows SDK 10.0.22621.0 installed successfully" - } else { - Write-Host "SDK install log:" - Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 - Write-Error "Windows SDK installation failed - path not found: $sdkPath" - exit 1 - } + & "${{ github.workspace }}\scripts\install-winsdk.ps1" # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 41863487428c7b2aaa13699b6f36f232f6bf2236 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Tue, 17 Feb 2026 17:49:24 -0500 Subject: [PATCH 12/20] Update mapistub.sln Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- mapistub.sln | 1 - 1 file changed, 1 deletion(-) diff --git a/mapistub.sln b/mapistub.sln index 2feaa23..c3692f9 100644 --- a/mapistub.sln +++ b/mapistub.sln @@ -1,4 +1,3 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 18 VisualStudioVersion = 18.0.0.0 From eda817597f8e648481936dd08b70fec9139af0f9 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Tue, 17 Feb 2026 17:49:45 -0500 Subject: [PATCH 13/20] Update .github/workflows/github-ci.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/github-ci.yml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 9ef72a7..b62d29e 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -48,21 +48,10 @@ jobs: Write-Host "Windows SDK 10.0.22621.0 already installed" exit 0 } - Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." - $installer = "$env:TEMP\winsdksetup.exe" - Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer - Write-Host "Installing SDK (this may take a few minutes)..." - $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru - Write-Host "Installer exit code: $($proc.ExitCode)" - if (Test-Path $sdkPath) { - Write-Host "Windows SDK 10.0.22621.0 installed successfully" - } else { - Write-Host "SDK install log:" - Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 - Write-Error "Windows SDK installation failed - path not found: $sdkPath" - exit 1 - } + Write-Error "Required Windows SDK 10.0.22621.0 was not found at path: $sdkPath" + Write-Error "Please ensure the GitHub Actions runner image includes this SDK (or add a prior, verified installation step) instead of downloading and executing an installer at workflow runtime." + exit 1 - name: "Build" shell: pwsh run: | From 3c74dae4759b33ab8f695efa067080ae16580770 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Tue, 17 Feb 2026 17:52:31 -0500 Subject: [PATCH 14/20] fix sdk installer --- .github/workflows/github-ci.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index b62d29e..9ef72a7 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -48,10 +48,21 @@ jobs: Write-Host "Windows SDK 10.0.22621.0 already installed" exit 0 } + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + $installer = "$env:TEMP\winsdksetup.exe" + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + Write-Host "Installing SDK (this may take a few minutes)..." + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + Write-Host "Installer exit code: $($proc.ExitCode)" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + } else { + Write-Host "SDK install log:" + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed - path not found: $sdkPath" + exit 1 + } - Write-Error "Required Windows SDK 10.0.22621.0 was not found at path: $sdkPath" - Write-Error "Please ensure the GitHub Actions runner image includes this SDK (or add a prior, verified installation step) instead of downloading and executing an installer at workflow runtime." - exit 1 - name: "Build" shell: pwsh run: | From 096a611cc0f015320d6a4d4604e98f0ea9db076b Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Wed, 18 Feb 2026 10:52:01 -0500 Subject: [PATCH 15/20] better handling of sdk dependency --- .github/dependabot.yml | 5 +++++ .github/workflows/codeql.yml | 12 ------------ .github/workflows/github-ci.yml | 23 ----------------------- .gitignore | 2 +- Directory.Build.props | 8 ++++++++ 5 files changed, 14 insertions(+), 36 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bb85b6f..c6465f7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,8 @@ updates: directory: / schedule: interval: daily + + - package-ecosystem: nuget + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f31d194..5289594 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -40,18 +40,6 @@ jobs: with: submodules: 'recursive' - - name: Install Windows 11 SDK (10.0.22621.0) - shell: pwsh - run: | - $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" - if (Test-Path $sdkPath) { - Write-Host "Windows SDK 10.0.22621.0 already installed" - exit 0 - } - Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." - $installer = "$env:TEMP\winsdksetup.exe" - & "${{ github.workspace }}\scripts\install-winsdk.ps1" - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 9ef72a7..cc18fa5 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -40,29 +40,6 @@ jobs: with: submodules: 'recursive' - - name: Install Windows 11 SDK (10.0.22621.0) - shell: pwsh - run: | - $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" - if (Test-Path $sdkPath) { - Write-Host "Windows SDK 10.0.22621.0 already installed" - exit 0 - } - Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." - $installer = "$env:TEMP\winsdksetup.exe" - Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer - Write-Host "Installing SDK (this may take a few minutes)..." - $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru - Write-Host "Installer exit code: $($proc.ExitCode)" - if (Test-Path $sdkPath) { - Write-Host "Windows SDK 10.0.22621.0 installed successfully" - } else { - Write-Host "SDK install log:" - Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 - Write-Error "Windows SDK installation failed - path not found: $sdkPath" - exit 1 - } - - name: "Build" shell: pwsh run: | diff --git a/.gitignore b/.gitignore index 6aef5ea..5ed30d1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ /.vs /bin -/obj +**/obj/ /packages /build /node_modules diff --git a/Directory.Build.props b/Directory.Build.props index 77d0167..b981874 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -34,4 +34,12 @@ false + + + + + + + + From 8862bc8c8efd78bd2571d24538db94bdfbc87220 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Wed, 18 Feb 2026 11:05:47 -0500 Subject: [PATCH 16/20] alternate attempt at sdk --- .github/dependabot.yml | 5 ----- .github/workflows/codeql.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/github-ci.yml | 33 +++++++++++++++++++++++++++++++++ .gitignore | 2 +- Directory.Build.props | 8 -------- 5 files changed, 67 insertions(+), 14 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c6465f7..bb85b6f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,8 +9,3 @@ updates: directory: / schedule: interval: daily - - - package-ecosystem: nuget - directory: / - schedule: - interval: weekly diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5289594..96371d5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -40,6 +40,39 @@ jobs: with: submodules: 'recursive' + - name: Install Windows 11 SDK (10.0.22621.0) + shell: pwsh + run: | + $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 already installed" + exit 0 + } + + # Download and verify installer + $installer = "$env:TEMP\winsdksetup.exe" + $expectedHash = "E9EB8CC489860F1F66B22B371A8413B5BEB2D2DA7B1E156DD65D1E65D37D1D79" + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + + # Verify SHA256 hash + $actualHash = (Get-FileHash -Path $installer -Algorithm SHA256).Hash + if ($actualHash -ne $expectedHash) { + Write-Error "SHA256 hash mismatch! Expected: $expectedHash, Got: $actualHash" + exit 1 + } + Write-Host "SHA256 verified: $actualHash" + + # Install SDK + Write-Host "Installing SDK (this may take a few minutes)..." + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + if (!(Test-Path $sdkPath)) { + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed" + exit 1 + } + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index cc18fa5..d33c770 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -40,6 +40,39 @@ jobs: with: submodules: 'recursive' + - name: Install Windows 11 SDK (10.0.22621.0) + shell: pwsh + run: | + $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 already installed" + exit 0 + } + + # Download and verify installer + $installer = "$env:TEMP\winsdksetup.exe" + $expectedHash = "E9EB8CC489860F1F66B22B371A8413B5BEB2D2DA7B1E156DD65D1E65D37D1D79" + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + + # Verify SHA256 hash + $actualHash = (Get-FileHash -Path $installer -Algorithm SHA256).Hash + if ($actualHash -ne $expectedHash) { + Write-Error "SHA256 hash mismatch! Expected: $expectedHash, Got: $actualHash" + exit 1 + } + Write-Host "SHA256 verified: $actualHash" + + # Install SDK + Write-Host "Installing SDK (this may take a few minutes)..." + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + if (!(Test-Path $sdkPath)) { + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed" + exit 1 + } + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + - name: "Build" shell: pwsh run: | diff --git a/.gitignore b/.gitignore index 5ed30d1..6aef5ea 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ /.vs /bin -**/obj/ +/obj /packages /build /node_modules diff --git a/Directory.Build.props b/Directory.Build.props index b981874..77d0167 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -34,12 +34,4 @@ false - - - - - - - - From 874634154641381d17a688161105dbfca49ee7c8 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Wed, 18 Feb 2026 11:09:17 -0500 Subject: [PATCH 17/20] better hash --- .github/workflows/codeql.yml | 2 +- .github/workflows/github-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 96371d5..34a3592 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -51,7 +51,7 @@ jobs: # Download and verify installer $installer = "$env:TEMP\winsdksetup.exe" - $expectedHash = "E9EB8CC489860F1F66B22B371A8413B5BEB2D2DA7B1E156DD65D1E65D37D1D79" + $expectedHash = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0" Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index d33c770..1c4bd53 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -51,7 +51,7 @@ jobs: # Download and verify installer $installer = "$env:TEMP\winsdksetup.exe" - $expectedHash = "E9EB8CC489860F1F66B22B371A8413B5BEB2D2DA7B1E156DD65D1E65D37D1D79" + $expectedHash = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0" Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer From d7186a2374fafe84d0b8d4442804e31578f56815 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Wed, 18 Feb 2026 11:38:45 -0500 Subject: [PATCH 18/20] clean up project --- Directory.Build.props | 7 ++++--- mapistub.vcxproj | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 77d0167..74f6c39 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -13,12 +13,10 @@ false Guard true - - - + Level4 @@ -26,6 +24,9 @@ true stdcpplatest + + true + diff --git a/mapistub.vcxproj b/mapistub.vcxproj index 55894f1..f6eda9c 100644 --- a/mapistub.vcxproj +++ b/mapistub.vcxproj @@ -105,7 +105,7 @@ Unicode false true - true + true true @@ -137,7 +137,7 @@ Unicode false true - true + true true From b41fde262b70a1b84397742d23495cf51b60280b Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Wed, 18 Feb 2026 15:55:36 -0500 Subject: [PATCH 19/20] add arm builds --- .github/workflows/github-ci.yml | 8 ++++-- Directory.Build.props | 12 ++++----- package.json | 47 ++++++++++++++++++++++++++++----- 3 files changed, 52 insertions(+), 15 deletions(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 1c4bd53..61932b6 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -21,9 +21,13 @@ jobs: fail-fast: false matrix: configuration: [ 'Release', 'Debug', 'Release_Unicode', 'Debug_Unicode' ] - platform: [ 'Win32', 'x64', 'ARM64EC' ] + platform: [ 'Win32', 'x64', 'ARM64', 'ARM64EC' ] exclude: - # ARM64EC only needs Unicode builds + # ARM64/ARM64EC only need Unicode builds + - platform: ARM64 + configuration: Release + - platform: ARM64 + configuration: Debug - platform: ARM64EC configuration: Release - platform: ARM64EC diff --git a/Directory.Build.props b/Directory.Build.props index 74f6c39..5859a4d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,15 +8,15 @@ 10.0.22621.0 - - Spectre - false + + Spectre + false Guard true - + Level4 @@ -29,8 +29,8 @@ - - + + false diff --git a/package.json b/package.json index 0ea5e08..2d6d07b 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,46 @@ "version": "1.0.0", "description": "MAPI Stub Library for 32 and 64 bit applications", "scripts": { - "build": "node-gyp rebuild", - "build:x64": "node-gyp configure --arch=x64 && node-gyp build --arch=x64", - "build:x86": "node-gyp configure --arch=ia32 && node-gyp build --arch=ia32", - "build:arm64": "node-gyp configure --arch=arm64 && node-gyp build --arch=arm64", - "build:all": "npm run build:x64 && npm run build:x86 && npm run build:arm64", - "clean": "node-gyp clean", - "clean:all": "node-gyp clean && rmdir /s /q build 2>nul || true" + "msbuild": "powershell -Command \"$vs = & \\\"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\\\" -latest -property installationPath; & \\\"$vs\\MSBuild\\Current\\Bin\\amd64\\msbuild.exe\\\"\"", + + "build": "npm run build:debug:x64", + "build:debug": "npm run build:debug:x64", + "build:debug:x64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=x64", + "build:debug:x86": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=Win32", + "build:release": "npm run build:release:x64", + "build:release:x64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=x64", + "build:release:x86": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=Win32", + + "build:debug:ansi": "npm run build:debug:ansi:x64", + "build:debug:ansi:x64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=x64", + "build:debug:ansi:x86": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=Win32", + "build:release:ansi": "npm run build:release:ansi:x64", + "build:release:ansi:x64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=x64", + "build:release:ansi:x86": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=Win32", + + "build:all": "npm run build:all:x64 && npm run build:all:x86", + "build:all:x64": "npm run build:debug:x64 && npm run build:release:x64 && npm run build:debug:ansi:x64 && npm run build:release:ansi:x64", + "build:all:x86": "npm run build:debug:x86 && npm run build:release:x86 && npm run build:debug:ansi:x86 && npm run build:release:ansi:x86", + + "build:debug:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64", + "build:release:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64", + "build:debug:ansi:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=ARM64", + "build:release:ansi:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64", + "build:all:arm64": "npm run build:debug:arm64 && npm run build:release:arm64 && npm run build:debug:ansi:arm64 && npm run build:release:ansi:arm64", + + "build:debug:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64EC", + "build:release:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64EC", + "build:debug:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=ARM64EC", + "build:release:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64EC", + "build:all:arm64ec": "npm run build:debug:arm64ec && npm run build:release:arm64ec && npm run build:debug:ansi:arm64ec && npm run build:release:ansi:arm64ec", + + "clean": "npm run msbuild -- mapistub.sln /t:Clean", + + "gyp:build": "node-gyp rebuild", + "gyp:build:x64": "node-gyp configure --arch=x64 && node-gyp build --arch=x64", + "gyp:build:x86": "node-gyp configure --arch=ia32 && node-gyp build --arch=ia32", + "gyp:build:arm64": "node-gyp configure --arch=arm64 && node-gyp build --arch=arm64", + "gyp:clean": "node-gyp clean" }, "devDependencies": { "clang-format": "^1.8.0" From a5125bb39296942af2e3fa86036ef2460e74002b Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Wed, 18 Feb 2026 16:30:36 -0500 Subject: [PATCH 20/20] fix args --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2d6d07b..dcdcdb7 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "MAPI Stub Library for 32 and 64 bit applications", "scripts": { - "msbuild": "powershell -Command \"$vs = & \\\"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\\\" -latest -property installationPath; & \\\"$vs\\MSBuild\\Current\\Bin\\amd64\\msbuild.exe\\\"\"", + "msbuild": "powershell -Command \"$vs = & \\\"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\\\" -latest -property installationPath; & \\\"$vs\\MSBuild\\Current\\Bin\\amd64\\msbuild.exe\\\" @args\"", "build": "npm run build:debug:x64", "build:debug": "npm run build:debug:x64",