diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 52ec240..2d86a94 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -19,9 +19,22 @@ 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' \ No newline at end of file + + - 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/*" | sort) + + 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 "$files" | xargs clang-format-17 --verbose --dry-run -Werror --style=file --fallback-style=Microsoft diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7839ab9..34a3592 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,9 +40,42 @@ 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 = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0" + 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@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/init@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -53,11 +87,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 acb4be1..15decbd 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 1921376..61932b6 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -13,13 +13,25 @@ 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: + fail-fast: false matrix: configuration: [ 'Release', 'Debug', 'Release_Unicode', 'Debug_Unicode' ] - platform: [ 'Win32', 'x64' ] + platform: [ 'Win32', 'x64', 'ARM64', 'ARM64EC' ] + exclude: + # ARM64/ARM64EC only need Unicode builds + - platform: ARM64 + configuration: Release + - platform: ARM64 + configuration: Debug + - platform: ARM64EC + configuration: Release + - platform: ARM64EC + configuration: Debug steps: - name: Harden Runner @@ -32,6 +44,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 = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0" + 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: | @@ -63,4 +108,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 d82db1a..a98a641 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 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..5859a4d --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,38 @@ + + + + + v145 + + + 10.0.22621.0 + + + + Spectre + false + Guard + true + + + + + + + Level4 + true + true + stdcpplatest + + + true + + + + + + + false + + + diff --git a/mapistub.sln b/mapistub.sln index 0551dde..c3692f9 100644 --- a/mapistub.sln +++ b/mapistub.sln @@ -1,7 +1,6 @@ - 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 @@ -15,10 +14,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 +40,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 1a0a120..f6eda9c 100644 --- a/mapistub.vcxproj +++ b/mapistub.vcxproj @@ -1,4 +1,4 @@ - + @@ -20,14 +20,6 @@ Debug x64 - - Fuzz - ARM64 - - - Fuzz - ARM64EC - Fuzz Win32 @@ -36,22 +28,6 @@ Fuzz x64 - - Prefast_Unicode - Win32 - - - Prefast_Unicode - x64 - - - Prefast - Win32 - - - Prefast - x64 - Release_Unicode Win32 @@ -84,22 +60,6 @@ Debug ARM64EC - - Prefast_Unicode - ARM64 - - - Prefast_Unicode - ARM64EC - - - Prefast - ARM64 - - - Prefast - ARM64EC - Release_Unicode ARM64 @@ -120,55 +80,30 @@ {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 +111,31 @@ 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,125 +143,55 @@ 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 - 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 - StaticLibrary MultiByte - v143 false - Spectre true @@ -366,12 +205,6 @@ - - - - - - @@ -387,12 +220,6 @@ - - - - - - @@ -408,18 +235,9 @@ - - - - - - - - - @@ -429,18 +247,9 @@ - - - - - - - - - @@ -460,14 +269,6 @@ true - - 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 - @@ -477,14 +278,6 @@ true - - 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 - @@ -497,14 +290,6 @@ true - - 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 - @@ -513,14 +298,6 @@ true - - 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 +310,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -564,15 +337,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -594,15 +363,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -625,15 +390,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -656,15 +417,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -686,15 +443,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -716,73 +469,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest - Guard - - - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - Level4 - true - ProgramDatabase - true - true - true - false - false - stdcpplatest - Guard - - - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - Level4 - true - ProgramDatabase - true - true - true - false - false - stdcpplatest Guard @@ -803,71 +494,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - Level4 - true - ProgramDatabase - true - true - true - false - false - stdcpplatest - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - Level4 - true - ProgramDatabase - true - true - true - false - false - stdcpplatest Guard @@ -887,15 +518,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -916,15 +543,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -944,15 +567,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -975,15 +594,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1005,46 +620,11 @@ true MultiThreaded true - Level4 - true - ProgramDatabase - true - true - true - Default - true - stdcpplatest - Guard - - - _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - true - true - - - - - MaxSpeed - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) - true - MultiThreaded - true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1067,45 +647,11 @@ true MultiThreaded true - Level4 - true - ProgramDatabase - true - true - true - Default - true - stdcpplatest - Guard - - - _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - true - true - - - - - MaxSpeed - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) - true - MultiThreaded - true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1127,73 +673,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - Level4 - true - ProgramDatabase - true - true - true - false - false - stdcpplatest - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - Level4 - true - ProgramDatabase - true - true - true - false - false - stdcpplatest Guard @@ -1214,71 +698,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - Level4 - true - ProgramDatabase - true - true - true - false - false - stdcpplatest - Guard - - - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - - - - - Disabled - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - Level4 - true - ProgramDatabase - true - true - true - false - false - stdcpplatest Guard @@ -1298,15 +722,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -1327,15 +747,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard diff --git a/package.json b/package.json index 0ea5e08..dcdcdb7 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\\\" @args\"", + + "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"