Skip to content

Commit

Permalink
use VS2022 and corresponding toolset v143
Browse files Browse the repository at this point in the history
  • Loading branch information
chcg committed Sep 13, 2023
1 parent ddb71c1 commit 1e14190
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

runs-on: windows-latest
strategy:
max-parallel: 6
fail-fast: false
matrix:
build_configuration: [Release, Debug]
build_platform: [x64, Win32, ARM64]
Expand All @@ -21,7 +21,7 @@ jobs:

- name: MSBuild of plugin dll
working-directory: HexEditor\projects\2003\
run: msbuild HexEditor.vcxproj /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v142"
run: msbuild HexEditor.vcxproj /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v143"

- name: Archive artifacts for x64
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: windows-2019
runs-on: windows-latest

steps:
- name: Checkout repository
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:

- name: MSBuild of plugin dll
working-directory: HexEditor\projects\2003\
run: msbuild HexEditor.vcxproj /m /p:configuration="Debug" /p:platform="x64" /p:PlatformToolset="v142"
run: msbuild HexEditor.vcxproj /m /p:configuration="Debug" /p:platform="x64" /p:PlatformToolset="v143"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
24 changes: 18 additions & 6 deletions HexEditor/projects/2003/HexEditor.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,32 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
Expand Down Expand Up @@ -121,6 +121,8 @@
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FunctionLevelLinking>false</FunctionLevelLinking>
<LanguageStandard>stdcpp14</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand All @@ -144,6 +146,8 @@
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FunctionLevelLinking>false</FunctionLevelLinking>
<LanguageStandard>stdcpp14</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand All @@ -166,6 +170,8 @@
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FunctionLevelLinking>false</FunctionLevelLinking>
<LanguageStandard>stdcpp14</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand Down Expand Up @@ -193,6 +199,8 @@
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<LanguageStandard>stdcpp14</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand Down Expand Up @@ -225,6 +233,8 @@
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<LanguageStandard>stdcpp14</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand Down Expand Up @@ -256,6 +266,8 @@
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<LanguageStandard>stdcpp14</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand Down
2 changes: 1 addition & 1 deletion HexEditor/src/HEXDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4601,7 +4601,7 @@ void HexEdit::CopyBinary(void)
size_t selectionStart = execute(SCI_GETSELECTIONSTART);
size_t selectionEnd = execute(SCI_GETSELECTIONEND);

int32_t strLen = static_cast<int32_t>(selectionEnd - selectionStart);
int32_t selectionLen = static_cast<int32_t>(selectionEnd - selectionStart);
hSciTgt = (HWND)::SendMessage(_hParent, NPPM_CREATESCINTILLAHANDLE, 0, (LPARAM)_hSelf);

GetSelection(&posBeg, &posEnd);
Expand Down
9 changes: 5 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 0.9.12.{build}
image: Visual Studio 2019
image: Visual Studio 2022


environment:
matrix:
- PlatformToolset: v142
- PlatformToolset: v143

platform:
- x64
Expand All @@ -26,6 +26,7 @@ install:
- if "%platform%"=="arm64" set platform_input=arm64

- if "%PlatformToolset%"=="v142" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v143" call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%


build_script:
Expand All @@ -38,7 +39,7 @@ after_build:
Push-AppveyorArtifact "HexEditor\projects\2003\$env:PLATFORM_INPUT\$env:CONFIGURATION\HexEditor.dll" -FileName HexEditor.dll
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORMTOOLSET -eq "v142") {
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORMTOOLSET -eq "v143") {
$ZipFileName = "HexEditor_$($env:APPVEYOR_REPO_TAG_NAME)_$($env:PLATFORM_INPUT).zip"
7z a $ZipFileName "$($env:APPVEYOR_BUILD_FOLDER)\HexEditor\projects\2003\$env:PLATFORM_INPUT\$env:CONFIGURATION\*.dll"
}
Expand All @@ -57,5 +58,5 @@ deploy:
force_update: true
on:
appveyor_repo_tag: true
PlatformToolset: v142
PlatformToolset: v143
configuration: Release

0 comments on commit 1e14190

Please sign in to comment.