Skip to content

Commit 09e9227

Browse files
Fea #64, 基于msvcr14为MD/MDd提供一致性的体验
1 parent 3ab7387 commit 09e9227

14 files changed

+487
-512
lines changed

.github/workflows/Build&Test.yml

+10-22
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ jobs:
3737
# Procdump工具,用于单元测试崩溃诊断
3838
Invoke-WebRequest -Uri https://download.sysinternals.com/files/Procdump.zip -OutFile Tools\Procdump.zip
3939
&7z e Tools\Procdump.zip "-o$Env:GITHUB_WORKSPACE\Tools"
40-
40+
41+
Invoke-WebRequest -Uri https://github.com/Chuyu-Team/msvcr14x/releases/latest/download/VC-LTL.Redist.Dlls.zip -OutFile VC-LTL.Redist.Dlls.zip
42+
Invoke-WebRequest -Uri https://github.com/Chuyu-Team/msvcr14x/releases/latest/download/VC-LTL.Redist.PDBs.zip -OutFile VC-LTL.Redist.PDBs.zip
4143
4244
$ProgramFiles = ${env:ProgramFiles(x86)}
4345
@@ -86,6 +88,9 @@ jobs:
8688
$BuildVersion = $env:GITHUB_REF.Remove(0, 11);
8789
echo "BuildVersion=$BuildVersion" >> $env:GITHUB_ENV
8890
91+
$Prerelease = $BuildVersion.contains("-");
92+
echo "Prerelease=$Prerelease" >> $env:GITHUB_ENV
93+
8994
# github的内置版本有Bug,此行必须添加,否则无法获得内容
9095
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
9196
@@ -172,11 +177,6 @@ jobs:
172177
::生成二进制包
173178
msbuild Build.proj -p:TagVersion=${{env.BuildVersion}} -t:Pack
174179
if %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL%
175-
176-
:: 打包Redist
177-
if "${{env.BuildVersion}}" NEQ "" (
178-
msbuild Build.proj -p:TagVersion=${{env.BuildVersion}} -t:PackRedist
179-
)
180180
181181
if %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL%
182182
@@ -188,26 +188,12 @@ jobs:
188188
189189
if %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL%
190190
191-
- name: 匹配Redist缓存
192-
if: contains(github.ref, 'tags/')
193-
id: ltlRedistCache
194-
uses: actions/cache@v4
195-
with:
196-
path: VC-LTL*-Redist.7z
197-
key: ltl_Redist_${{ hashFiles('Redist/**/*.dll') }}
198-
199-
- name: 文件清理
200-
if: steps.ltlRedistCache.outputs.cache-hit == 'true'
201-
working-directory: ${{github.workspace}}
202-
shell: cmd
203-
run: |
204-
del VC-LTL-${{env.BuildVersion}}-Redist.7z /Q /F
205-
206191
- uses: actions/upload-artifact@v4
207192
with:
208193
path: |
209194
*.nupkg
210195
*.7z
196+
VC-LTL.Redist.*.zip
211197
212198
# 失败时我们收集一些信息,用于诊断
213199
- uses: actions/upload-artifact@v4
@@ -222,16 +208,18 @@ jobs:
222208
Static\*.log
223209
UnitTest/SymbolBuildTest/.test/**/Build.log
224210
*.7z
211+
VC-LTL.Redist.*.zip
225212
226213
- uses: xresloader/upload-to-github-release@v1
227214
if: contains(github.ref, 'tags/')
228215
env:
229216
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
230217
with:
231-
file: "VC-LTL-*.7z"
218+
file: "VC-LTL-*.7z;VC-LTL.Redist.*.zip"
232219
overwrite: true
233220
tags: true
234221
draft: false
222+
prerelease: ${{env.Prerelease}}
235223

236224
- uses: actions-rs/toolchain@v1
237225
with:

Build.proj

+2-99
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
<Import Project="$(VCInstallDir)\Auxiliary\Build\Microsoft.VCToolsVersion.default.props" />
4242

43-
<Target Name="DownloadTools" BeforeTargets="Build;PackRedist">
43+
<Target Name="DownloadTools" BeforeTargets="Build">
4444
<!--下载LibMaker-->
4545
<DownloadFile
4646
Condition="!Exists('$(MSBuildThisFileDirectory)Tools\LibMaker.exe')"
@@ -90,108 +90,11 @@
9090

9191
<Target Name="Pack">
9292
<PropertyGroup>
93-
<ZipFileName Condition="'$(TagVersion)' == ''">VC-LTL-Binary.7z</ZipFileName>
94-
<ZipFileName Condition="'$(TagVersion)' != ''">VC-LTL-$(TagVersion)-Binary.7z</ZipFileName>
93+
<ZipFileName>VC-LTL-Binary.7z</ZipFileName>
9594
</PropertyGroup>
9695
<Delete Files="$(MSBuildThisFileDirectory)$(ZipFileName)"/>
9796
<Exec Command="7z.exe a $(ZipFileName) config _msvcrt.h %22VC-LTL helper for *%22 TargetPlatform Readme.md Readme.osc.md Install.cmd -xr!*.objs.lib -xr!*.idb" WorkingDirectory="$(MSBuildThisFileDirectory)"/>
9897
</Target>
99-
100-
<Target Name="PackRedist">
101-
<PropertyGroup>
102-
<ZipFileName Condition="'$(TagVersion)' == ''">VC-LTL-Redist.7z</ZipFileName>
103-
<ZipFileName Condition="'$(TagVersion)' != ''">VC-LTL-$(TagVersion)-Redist.7z</ZipFileName>
104-
</PropertyGroup>
105-
106-
<!--生成Redist相关文件-->
107-
<PropertyGroup>
108-
<ExcludeCRT2>**\vccorlib140.dll;**\vcruntime140.dll</ExcludeCRT2>
109-
</PropertyGroup>
110-
<!--生成移除了API Set的CRT DLL-->
111-
<RemoveDir Directories="$(SolutionDir)Redist" Condition="Exists('$(SolutionDir)Redist')"/>
112-
<MakeDir Directories="$(SolutionDir)Redist" />
113-
114-
<Copy SourceFiles="$(UniversalCRTSdkDir)Redist\$(WindowsTargetPlatformVersion)\ucrt\DLLs\x86\ucrtbase.dll" DestinationFiles="$(SolutionDir)Redist\x86\CRT\ucrtbase.dll" />
115-
<Copy SourceFiles="$(UniversalCRTSdkDir)Redist\$(WindowsTargetPlatformVersion)\ucrt\DLLs\x64\ucrtbase.dll" DestinationFiles="$(SolutionDir)Redist\x64\CRT\ucrtbase.dll" />
116-
<!--<Copy SourceFiles="$(UniversalCRTSdkDir)Redist\$(WindowsTargetPlatformVersion)\ucrt\DLLs\arm\ucrtbase.dll" DestinationFiles="$(SolutionDir)Redist\arm\CRT\ucrtbase.dll" Condition="Exists('$(UniversalCRTSdkDir)Redist\$(WindowsTargetPlatformVersion)\ucrt\DLLs\arm\ucrtbase.dll')"/>-->
117-
<Copy SourceFiles="$(UniversalCRTSdkDir)Redist\$(WindowsTargetPlatformVersion)\ucrt\DLLs\arm64\ucrtbase.dll" DestinationFiles="$(SolutionDir)Redist\arm64\CRT\ucrtbase.dll" Condition="Exists('$(UniversalCRTSdkDir)Redist\$(WindowsTargetPlatformVersion)\ucrt\DLLs\arm64\ucrtbase.dll')"/>
118-
119-
<ItemGroup>
120-
<CRTExcludeList Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\*\Microsoft.VC*.CRT\vcruntime*.dll"/>
121-
<CRTExcludeList Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\*\Microsoft.VC*.CRT\vccorlib*.dll"/>
122-
123-
<CRTx86 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x86\Microsoft.VC*.CRT\*.dll" Exclude="@(CRTExcludeList)"/>
124-
<CRTx64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x64\Microsoft.VC*.CRT\*.dll" Exclude="@(CRTExcludeList)"/>
125-
<CRTarm Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm\Microsoft.VC*.CRT\*.dll" Exclude="@(CRTExcludeList)"/>
126-
<CRTarm64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm64\Microsoft.VC*.CRT\*.dll" Exclude="@(CRTExcludeList)"/>
127-
</ItemGroup>
128-
129-
<Copy SourceFiles="@(CRTx86)" DestinationFolder="$(SolutionDir)Redist\x86\CRT"/>
130-
<Copy SourceFiles="@(CRTx64)" DestinationFolder="$(SolutionDir)Redist\x64\CRT"/>
131-
<!--<Copy SourceFiles="@(CRTarm)" DestinationFolder="$(SolutionDir)Redist\arm\CRT"/>-->
132-
<Copy SourceFiles="@(CRTarm64)" DestinationFolder="$(SolutionDir)Redist\arm64\CRT"/>
133-
134-
<ItemGroup>
135-
<CXXAMPx86 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x86\Microsoft.VC*.CXXAMP\*.dll" />
136-
<CXXAMPx64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x64\Microsoft.VC*.CXXAMP\*.dll" />
137-
<CXXAMParm Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm\Microsoft.VC*.CXXAMP\*.dll" />
138-
<CXXAMParm64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm64\Microsoft.VC*.CXXAMP\*.dll" />
139-
</ItemGroup>
140-
141-
<Copy SourceFiles="@(CXXAMPx86)" DestinationFolder="$(SolutionDir)Redist\x86\CXXAMP" />
142-
<Copy SourceFiles="@(CXXAMPx64)" DestinationFolder="$(SolutionDir)Redist\x64\CXXAMP" />
143-
<!--<Copy SourceFiles="@(CXXAMParm)" DestinationFolder="$(SolutionDir)Redist\arm\CXXAMP" />-->
144-
<Copy SourceFiles="@(CXXAMParm64)" DestinationFolder="$(SolutionDir)Redist\arm64\CXXAMP" />
145-
146-
147-
<ItemGroup>
148-
<OPENMPx86 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x86\Microsoft.VC*.OPENMP\*.dll" />
149-
<OPENMPx64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x64\Microsoft.VC*.OPENMP\*.dll" />
150-
<OPENMParm Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm\Microsoft.VC*.OPENMP\*.dll" />
151-
<OPENMParm64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm64\Microsoft.VC*.OPENMP\*.dll" />
152-
</ItemGroup>
153-
154-
<Copy SourceFiles="@(OPENMPx86)" DestinationFolder="$(SolutionDir)Redist\x86\OPENMP" />
155-
<Copy SourceFiles="@(OPENMPx64)" DestinationFolder="$(SolutionDir)Redist\x64\OPENMP" />
156-
<!--<Copy SourceFiles="@(OPENMParm)" DestinationFolder="$(SolutionDir)Redist\arm\OPENMP" />-->
157-
<Copy SourceFiles="@(OPENMParm64)" DestinationFolder="$(SolutionDir)Redist\arm64\OPENMP" />
158-
159-
160-
<ItemGroup>
161-
<MFCx86 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x86\Microsoft.VC*.MFC\*.dll" />
162-
<MFCx64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x64\Microsoft.VC*.MFC\*.dll" />
163-
<MFCarm Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm\Microsoft.VC*.MFC\*.dll" />
164-
<MFCarm64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm64\Microsoft.VC*.MFC\*.dll" />
165-
</ItemGroup>
166-
167-
<Copy SourceFiles="@(MFCx86)" DestinationFolder="$(SolutionDir)Redist\x86\MFC" />
168-
<Copy SourceFiles="@(MFCx64)" DestinationFolder="$(SolutionDir)Redist\x64\MFC" />
169-
<!--<Copy SourceFiles="@(MFCarm)" DestinationFolder="$(SolutionDir)Redist\arm\MFC" />-->
170-
<Copy SourceFiles="@(MFCarm64)" DestinationFolder="$(SolutionDir)Redist\arm64\MFC" />
171-
172-
<ItemGroup>
173-
<MFCLOCx86 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x86\Microsoft.VC*.MFCLOC\*.dll" />
174-
<MFCLOCx64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\x64\Microsoft.VC*.MFCLOC\*.dll" />
175-
<MFCLOCarm Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm\Microsoft.VC*.MFCLOC\*.dll" />
176-
<MFCLOCarm64 Include="$(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\arm64\Microsoft.VC*.MFCLOC\*.dll" />
177-
</ItemGroup>
178-
179-
<Copy SourceFiles="@(MFCLOCx86)" DestinationFolder="$(SolutionDir)Redist\x86\MFCLOC" />
180-
<Copy SourceFiles="@(MFCLOCx64)" DestinationFolder="$(SolutionDir)Redist\x64\MFCLOC" />
181-
<!--<Copy SourceFiles="@(MFCLOCarm)" DestinationFolder="$(SolutionDir)Redist\arm\MFCLOC" />-->
182-
<Copy SourceFiles="@(MFCLOCarm64)" DestinationFolder="$(SolutionDir)Redist\arm64\MFCLOC" />
183-
184-
185-
<!--移除APISet-->
186-
<ItemGroup>
187-
<RedistFiles Include="$(SolutionDir)Redist\**\*.dll"/>
188-
</ItemGroup>
189-
<Exec Command="%22$(MSBuildThisFileDirectory)Tools\LibMaker.exe%22 RemoveAPISet %22%(RedistFiles.identity)%22 %22$(MSBuildThisFileDirectory)Tools\ApiSetMap.txt%22" WorkingDirectory="$(MSBuildThisFileDirectory)"/>
190-
191-
192-
<Delete Files="$(MSBuildThisFileDirectory)$(ZipFileName)"/>
193-
<Exec Command="7z.exe a $(ZipFileName) Redist" WorkingDirectory="$(MSBuildThisFileDirectory)"/>
194-
</Target>
19598

19699
<Target Name="_GetProjectAllConfiguration" Returns="@(AllProjectReferenceConfigurations)">
197100
<!--故意过滤Debug配置 与 ARM配置,因为ARM的人实在是太少了。-->

VC-LTL helper for Visual Studio.props

+13-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,19 @@ VC-LTL默认搜索顺序
2828

2929
<!--#####################################################################VC-LTL设置#####################################################################-->
3030
<PropertyGroup>
31-
<!--控制TargetPlatform版本,目前可用版本为 5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0-->
32-
<!--<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>-->
31+
<!--
32+
控制最小兼容系统版本,目前可用版本为 5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
33+
注意:VC-LTL依赖YY-Thunks,否则可能无法兼容早期系统。如果需要支持Windows XP,该值必须为5.1.2600.0。-->
34+
<!--<WindowsTargetPlatformMinVersion>5.1.2600.0</WindowsTargetPlatformMinVersion>-->
35+
36+
<!--
37+
VC-LTL使用的CRT模式,SupportLTL可能值为:
38+
* false:禁用VC_LTL
39+
* true:默认值,让VC-LTL自动适应。当最小兼容版本>=10.0时使用ucrt模式,其他系统使用msvcrt模式。
40+
* msvcrt:使用msvcrt.dll作为CRT。注意:msvcrt模式可能不完全支持所有ucrt的新功能。比如setloacl不支持UTF8。
41+
* ucrt:使用ucrtbase.dll作为CRT。注意:早期系统可能需要下载VC-LTL.Redist.Dlls.zip,感谢msvcr14x项目提供兼容XP系统的ucrtbase.dll。
42+
如果需要兼容XP时也使用ucrt,请指定 SupportLTL=ucrt。-->
43+
<!--<SupportLTL>ucrt</SupportLTL>-->
3344
</PropertyGroup>
3445
<!--####################################################################################################################################################-->
3546

VC-LTL helper for cmake.cmake

+11-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,17 @@
2424

2525
#####################################################################VC-LTL设置#####################################################################
2626

27-
#控制TargetPlatform版本,目前可用版本为5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
28-
#set(WindowsTargetPlatformMinVersion "10.0.10240.0")
27+
#控制最小兼容系统版本,目前可用版本为5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
28+
#注意:VC-LTL依赖YY-Thunks,否则可能无法兼容早期系统。如果需要支持Windows XP,该值必须为5.1.2600.0。
29+
#set(WindowsTargetPlatformMinVersion "5.1.2600.0")
30+
31+
#VC-LTL使用的CRT模式,SupportLTL可能值为:
32+
# * false:禁用VC_LTL
33+
# * true:默认值,让VC-LTL自动适应。当最小兼容版本>=10.0时使用ucrt模式,其他系统使用msvcrt模式。
34+
# * msvcrt:使用msvcrt.dll作为CRT。注意:msvcrt模式可能不完全支持所有ucrt的新功能。比如setloacl不支持UTF8。
35+
# * ucrt:使用ucrtbase.dll作为CRT。注意:早期系统可能需要下载VC-LTL.Redist.Dlls.zip,感谢msvcr14x项目提供兼容XP系统的ucrtbase.dll。
36+
#如果需要兼容XP时也使用ucrt,请指定SupportLTL=ucrt。
37+
#set(SupportLTL "ucrt")
2938

3039
#(PR#70 引入),默认关,开启后将使用cmake `INTERFACE`能力,然后单独`target_link_directories(工程名称 VC_LTL)` 即可引用
3140
#option(VC_LTL_EnableCMakeInterface "VC_LTL_EnableCMakeInterface" on)

VC-LTL helper for nmake.cmd

+11-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,17 @@
2626

2727
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::VC-LTL设置::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2828

29-
::控制TargetPlatform版本,目前可用版本为 5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
30-
::set WindowsTargetPlatformMinVersion=10.0.10240.0
29+
::控制最小兼容系统版本,目前可用版本为 5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
30+
::注意:VC-LTL依赖YY-Thunks,否则可能无法兼容早期系统。如果需要支持Windows XP,该值必须为5.1.2600.0。
31+
::set WindowsTargetPlatformMinVersion=5.1.2600.0
32+
33+
::VC-LTL使用的CRT模式,SupportLTL可能值为:
34+
:: * false:禁用VC_LTL
35+
:: * true:默认值,让VC-LTL自动适应。当最小兼容版本>=10.0时使用ucrt模式,其他系统使用msvcrt模式。
36+
:: * msvcrt:使用msvcrt.dll作为CRT。注意:msvcrt模式可能不完全支持所有ucrt的新功能。比如setloacl不支持UTF8。
37+
:: * ucrt:使用ucrtbase.dll作为CRT。注意:早期系统可能需要下载VC-LTL.Redist.Dlls.zip,感谢msvcr14x项目提供兼容XP系统的ucrtbase.dll。
38+
::如果需要兼容XP时也使用ucrt,请指定 SupportLTL=ucrt。
39+
::set SupportLTL=ucrt
3140

3241
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
3342

VC-LTL helper for nmake.ps1

+11-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,17 @@
2626
#
2727
###########################################################VC-LTL设置###########################################################
2828

29-
# 控制TargetPlatform版本,目前可用版本为 5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
30-
# $env:WindowsTargetPlatformMinVersion="10.0.10240.0"
29+
# 控制最小兼容系统版本,目前可用版本为 5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
30+
# 注意:VC-LTL依赖YY-Thunks,否则可能无法兼容早期系统。如果需要支持Windows XP,该值必须为5.1.2600.0。
31+
# $env:WindowsTargetPlatformMinVersion="5.1.2600.0"
32+
33+
# VC-LTL使用的CRT模式,SupportLTL可能值为:
34+
# * false:禁用VC_LTL
35+
# * true:默认值,让VC-LTL自动适应。当最小兼容版本>=10.0时使用ucrt模式,其他系统使用msvcrt模式。
36+
# * msvcrt:使用msvcrt.dll作为CRT。注意:msvcrt模式可能不完全支持所有ucrt的新功能。比如setloacl不支持UTF8。
37+
# * ucrt:使用ucrtbase.dll作为CRT。注意:早期系统可能需要下载VC-LTL.Redist.Dlls.zip,感谢msvcr14x项目提供兼容XP系统的ucrtbase.dll。
38+
# 如果需要兼容XP时也使用ucrt,请指定 SupportLTL=ucrt。
39+
# $env:SupportLTL="ucrt"
3140

3241
################################################################################################################################
3342

VC-LTL helper for qmake.pri

+10-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,18 @@
2727

2828
# ---------------------------------------------------------------------VC-LTL设置---------------------------------------------------------------------
2929

30-
# 控制TargetPlatform版本,目前可用版本为 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
30+
# 控制最小兼容系统版本,目前可用版本为 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
31+
# 注意:VC-LTL依赖YY-Thunks,否则可能无法兼容早期系统。如果需要支持Windows XP,该值必须为5.1.2600.0。
3132
# WindowsTargetPlatformMinVersion = 10.0.10240.0
3233

34+
# VC-LTL使用的CRT模式,SupportLTL可能值为:
35+
# * false:禁用VC_LTL
36+
# * true:默认值,让VC-LTL自动适应。当最小兼容版本>=10.0时使用ucrt模式,其他系统使用msvcrt模式。
37+
# * msvcrt:使用msvcrt.dll作为CRT。注意:msvcrt模式可能不完全支持所有ucrt的新功能。比如setloacl不支持UTF8。
38+
# * ucrt:使用ucrtbase.dll作为CRT。注意:早期系统可能需要下载VC-LTL.Redist.Dlls.zip,感谢msvcr14x项目提供兼容XP系统的ucrtbase.dll。
39+
# 如果需要兼容XP时也使用ucrt,请指定 SupportLTL=ucrt。
40+
# SupportLTL=ucrt
41+
3342
# -----------------------------------------------------------------------------------------------------------------------------------------------------
3443

3544

config/1033/VC-LTL-Options.xml

+11-28
Original file line numberDiff line numberDiff line change
@@ -26,43 +26,26 @@
2626
HasConfigurationCondition="true"/>
2727
</Rule.DataSource>
2828

29-
<BoolProperty
30-
Name="DisableAdvancedSupport"
31-
Category="VC_LTL"
32-
DisplayName="Enable VC-LTL Light Mode"
33-
Description="Turn on VC-LTL Light Mode, which is more conducive to reducing the size of the program. If you need to be highly compatible with Microsoft UCRT, please do not turn on this option!!!" />
34-
35-
<BoolProperty
29+
<EnumProperty
3630
Name="SupportLTL"
3731
Category="VC_LTL"
3832
DisplayName="Enable VC-LTL"
39-
Description="Allow the current project to enable VC-LTL."/>
40-
41-
<EnumProperty
42-
Name="WindowsTargetPlatformMinVersion"
43-
Category="VC_LTL"
44-
DisplayName="Target CRT version"
45-
Description="Select the link target, optimized to msvcrt 6.0.6000.0 by default.">
33+
Description="The ucrt mode is smaller then msvcrt, but it depends on ucrtbase.dll, earlier platforms may not have ucrtbase.">
4634
<EnumValue
47-
Name="5.1.2600.0"
48-
DisplayName="msvcrt 5.1.2600.0 (support Windows XP/2003 or leater)"/>
49-
50-
<EnumValue
51-
Name="6.0.6000.0"
52-
DisplayName="msvcrt 6.0.6000.0 (support Windows Vista/2008 or leater)"/>
53-
35+
Name="false"
36+
DisplayName="Disable"/>
37+
5438
<EnumValue
55-
Name="6.2.9200.0"
56-
DisplayName="msvcrt 6.2.9600.0 (support Windows 8/RT/2012 or leater)"/>
39+
Name="true"
40+
DisplayName="auto(Default)"/>
5741

5842
<EnumValue
59-
Name="10.0.10240.0"
60-
DisplayName="UCRT 10.0.10240.0 (support Windows 10 10240 or leater)"/>
43+
Name="msvcrt"
44+
DisplayName="msvcrt"/>
6145

6246
<EnumValue
63-
Name="10.0.19041.0"
64-
DisplayName="UCRT 10.0.19041.0 (support Windows 10 19041 or leater)"/>
47+
Name="ucrt"
48+
DisplayName="ucrt"/>
6549
</EnumProperty>
66-
6750
</Rule>
6851
</ProjectSchemaDefinitions>

0 commit comments

Comments
 (0)