Skip to content

Commit 29cdb4e

Browse files
committed
fixed:build error on newer vcpkg
1 parent ab3e2cd commit 29cdb4e

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/msbuild.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
configuration: [Debug ,Release]
20-
platform: [x86 ,x64]
20+
platform: [x64]
2121

2222
runs-on: windows-latest # 最新的 Windows 环境
2323

@@ -78,9 +78,10 @@ jobs:
7878
# 配置 MSBuild 的路径,准备构建 VC++ 项目
7979
- name: Setup MSBuild
8080
uses: microsoft/setup-msbuild@v2
81+
8182
#编译
8283
- name: Build Solution
83-
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:AdditionalOptions="/utf-8"
84+
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
8485
#测试
8586
- name: Conditional Step for x86 Release
8687
if: matrix.configuration == 'Release' && matrix.platform == 'x86'

XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,22 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>$(XEngine_Include);D:\vcpkg\installed\x86-windows\include\opencv4;$(IncludePath)</IncludePath>
75+
<IncludePath>$(XEngine_Include);$(vcpkgroot)\installed\x86-windows\include\opencv4;$(IncludePath)</IncludePath>
7676
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7777
</PropertyGroup>
7878
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
7979
<LinkIncremental>false</LinkIncremental>
80-
<IncludePath>$(XEngine_Include);../XEngine_ThirdPart/opencc/include;$(IncludePath)</IncludePath>
80+
<IncludePath>$(XEngine_Include);$(vcpkgroot)\installed\x86-windows\include\opencv4;$(IncludePath)</IncludePath>
8181
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
8282
</PropertyGroup>
8383
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
8484
<LinkIncremental>true</LinkIncremental>
85-
<IncludePath>$(XEngine_Include);..\XEngine_ModuleHelp;D:\vcpkg\installed\x64-windows\include\opencv4;$(IncludePath)</IncludePath>
85+
<IncludePath>$(XEngine_Include);..\XEngine_ModuleHelp;$(vcpkgroot)\installed\x64-windows\include\opencv4;$(IncludePath)</IncludePath>
8686
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
8787
</PropertyGroup>
8888
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
8989
<LinkIncremental>false</LinkIncremental>
90-
<IncludePath>$(XEngine_Include);../XEngine_ThirdPart/opencc/include;$(IncludePath)</IncludePath>
90+
<IncludePath>$(XEngine_Include);$(vcpkgroot)\installed\x64-windows\include\opencv4;$(IncludePath)</IncludePath>
9191
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
9292
</PropertyGroup>
9393
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ int main(int argc, char** argv)
132132
WSAStartup(MAKEWORD(2, 2), &st_WSAData);
133133

134134
SetUnhandledExceptionFilter(Coredump_ExceptionFilter);
135+
SetConsoleOutputCP(CP_UTF8);
135136
#endif
136137
bIsRun = true;
137138
int nRet = -1;

0 commit comments

Comments
 (0)