This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
新增[Fea 71](#71), MSBuild以及cmd方式添加多国语言支持。
- Loading branch information
1 parent
b5f7e95
commit 7aa9e05
Showing
15 changed files
with
346 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
| ||
/* | ||
实现一些额外的安全检查,多一层安全保障。 | ||
*/ | ||
|
||
#ifdef _DEBUG | ||
#error Debug cannot use VC-LTL, please switch to Release and recompile! | ||
#endif | ||
|
||
#ifdef _DLL | ||
_LTL_PushWarning(1004, "Starting from VC-LTL 4.0, MD mode will use the DLL provided by VC-LTL. If you need to compile statically (only dependent on msvcrt.dll), please switch to MT.") | ||
#endif | ||
|
||
|
||
#ifndef _VC_LTL_Include | ||
#error Cannot find the VC header file (VC\X.XX.XXXXX\include), please make sure that the VC-LTL helper for Visual Studio.props property sheet is added to the project, and check the dependency order! | ||
#endif | ||
|
||
#ifndef _UCRT_LTL_Include | ||
#error Cannot find the ucrt header file (ucrt\X.XX.XXXXX.X), please make sure that the VC-LTL helper for Visual Studio.props property sheet is added to the project, and check the dependency order! | ||
#endif // !_UCRT_LTL_Include | ||
|
||
#if defined(_LTL_VistaMode) | ||
|
||
#if defined _ATL_XP_TARGETING || defined _USING_V110_SDK71_ | ||
_LTL_PushWarning(1006, "Enabling XP compatibility in Vista mode will cause the program to become larger. It's recommended to remove the _ATL_XP_TARGETING and _USING_V110_SDK71_ macros.") | ||
#endif | ||
|
||
_LTL_PushNote("It's now the Windows Vista mode of VC-LTL. Define _DISABLE_DEPRECATE_LTL_MESSAGE to turn off the information prompt.") | ||
|
||
#elif defined(_LTL_XPMode) | ||
|
||
#ifdef _DLL | ||
//VC-LTL默认没有编译XP的动态库,如果需要请自行编译。 | ||
_LTL_PushWarning(1006, "The /MD option cannot be used normally in Windows XP mode. It's recommended to use the /MT option.") | ||
#endif | ||
|
||
_LTL_PushNote("It's now the Windows XP compatibility mode of VC-LTL. Define _DISABLE_DEPRECATE_LTL_MESSAGE to turn off the information prompt.") | ||
#else | ||
#error 未知模式! | ||
#endif | ||
|
||
#ifdef __NO_LTL_LIB | ||
_LTL_PushWarning(1003, "Starting from VC-LTL 2.0, the __NO_LTL_LIB macro will be ignored.") | ||
#endif | ||
|
||
#ifdef _NO__LTL_Initialization | ||
_LTL_PushWarning(1003, "Starting from VC-LTL 4.0, the _NO__LTL_Initialization macro will be ignored.") | ||
#endif //!_NO__LTL_Initialization | ||
|
||
#if defined __cplusplus_winrt && _CRT_NTDDI_MIN <= /*NTDDI_WIN8*/0x06020000 | ||
_LTL_PushWarning(1005, "When using the /ZW option, the program will not support Windows 8.") | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
* 项目:VC-LTL | ||
* 文件:VC-LTL.targets | ||
* 用途:适用于 Visual Studio 的 VC-LTL 工具集的属性页配置文件 | ||
* | ||
* 许可:MIT | ||
* | ||
* 作者:mingkuang (mingkuang AT live.com) | ||
* 作者:Mouri_Naruto (Mouri_Naruto AT Outlook.com) | ||
--> | ||
<ProjectSchemaDefinitions | ||
xmlns="http://schemas.microsoft.com/build/2009/properties" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > | ||
<Rule Name="CuyuTeam_3C886396-2D31-4C73-9281-E39A064253D9" | ||
PageTemplate="tool" | ||
DisplayName="NuGet Packages Settings"> | ||
<Rule.Categories> | ||
<Category Name="VC_LTL" DisplayName="VC-LTL" Description="The third-party CRT runtime library optimizes the size of C/C++ programs and reduces the use of FLS."/> | ||
</Rule.Categories> | ||
|
||
<Rule.DataSource> | ||
<DataSource Persistence="ProjectFile" | ||
ItemType="" | ||
Label="Configuration" | ||
HasConfigurationCondition="true"/> | ||
</Rule.DataSource> | ||
|
||
<BoolProperty | ||
Name="DisableAdvancedSupport" | ||
Category="VC_LTL" | ||
DisplayName="Enable VC-LTL Light Mode" | ||
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!!!" /> | ||
|
||
<BoolProperty | ||
Name="SupportWinXP" | ||
Category="VC_LTL" | ||
DisplayName="Enable Windows XP compatible" | ||
Description="Forced to open Windows XP compatibility mode, by default only when the Windows XP toolset is selected." /> | ||
|
||
<BoolProperty | ||
Name="msvcp60_static_library" | ||
Category="VC_LTL" | ||
DisplayName="Enable msvcp60 Static Library" | ||
Description="Don't use msvcp60.dll to avoid losing msvcp60.dll and causing the program to fail to start." /> | ||
|
||
<BoolProperty | ||
Name="SupportLTL" | ||
Category="VC_LTL" | ||
DisplayName="Enable VC-LTL" | ||
Description="Allow the current project to enable VC-LTL."/> | ||
</Rule> | ||
</ProjectSchemaDefinitions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!--保存错误代码列表--> | ||
<PropertyGroup> | ||
<!--LTL2000--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_DEBUG>VC-LTL is disabled because VC-LTL isn't compatible with Debug configuration, please switch to Release configuration and continue.</ERROR_VC_LTL_NOT_SUPPORT_DEBUG> | ||
<!--LTL2001--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_MFC>VC-LTL is disabled because VC-LTL isn't compatible with MFC projects.</ERROR_VC_LTL_NOT_SUPPORT_MFC> | ||
<!--LTL2002--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_PLATFORM>VC-LTL is disabled because VC-LTL isn't compatible with $(PlatformShortName) platforms.</ERROR_VC_LTL_NOT_SUPPORT_PLATFORM> | ||
<!--LTL2003--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_PLATFORM_TOOLSET>VC-LTL is disabled because VC-LTL isn't compatible with the $(PlatformToolset) toolset. Please switch to Visual Studio 2015/2017/2019 and continue.</ERROR_VC_LTL_NOT_SUPPORT_PLATFORM_TOOLSET> | ||
<!--LTL2004--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_UNIVERSAL_DRIVER>VC-LTL is disabled because VC-LTL isn't compatible with Windows 10 Universal Driver.</ERROR_VC_LTL_NOT_SUPPORT_UNIVERSAL_DRIVER> | ||
|
||
<!--LTL3000--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_VC_TOOLS_VERSION>VC-LTL doesn't support VC $(VCToolsVersion) and has been switched to VC $(VCLTLToolsVersion). This may be that your IDE version is too low, it's recommended to upgrade to the latest IDE and continue.</ERROR_VC_LTL_NOT_SUPPORT_VC_TOOLS_VERSION> | ||
<!--LTL3001--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_UCRT_VERSION>VC-LTL doesn't support UCRT $(TargetUniversalCRTVersion) and has been switched to UCRT $(VCLTLTargetUniversalCRTVersion). This may be that your SDK version is too low, it's recommended to switch to the latest SDK and continue.</ERROR_VC_LTL_NOT_SUPPORT_UCRT_VERSION> | ||
<!--LTL3002--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_WINXP_IN_UCRT_MODE>VC-LTL doesn't support the simultaneous use of UCRT mode and Windows XP mode, and Windows XP mode has been ignored.</ERROR_VC_LTL_NOT_SUPPORT_WINXP_IN_UCRT_MODE> | ||
<!--LTL3003--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_MITIGATION>VC-LTL doesn't support the $(SpectreMitigation). It's recommended to upgrade to the latest VC-LTL and continue.</ERROR_VC_LTL_NOT_SUPPORT_MITIGATION> | ||
|
||
<!--LTL4000--> | ||
<ERROR_VC_LTL_FILE_MISSING>VC-LTL cannot find the lib files, please reinstall the NuGet package, or download it again from https://github.com/Chuyu-Team/VC-LTL/releases/latest and continue.</ERROR_VC_LTL_FILE_MISSING> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
:: | ||
:: | ||
:: | ||
:: VC-LTL config.cmd µÄ´íÎóÐÅÏ¢ | ||
:: | ||
:: | ||
:: | ||
|
||
|
||
set ERROR_VC_LTL_DONOT_USE_THIS_FILE=Please don't call this script file directly, you should use 'VC-LTL helper for nmake'. | ||
|
||
set ERROR_VC_LTL_CANNOT_FOUND_INCLUDE_ENV=The environment variable INCLUDE cannot be found, please make sure vcvars32.bat/vcvars64.bat is executed. | ||
|
||
set ERROR_VC_LTL_CANNOT_FOUND_LIB_ENV=The environment variable LIB cannot be found, please make sure vcvars32.bat/vcvars64.bat is executed. | ||
|
||
set ERROR_VC_LTL_NOT_SUPPORT_PLATFORM_TOOLSET=VC-LTL only supports Visual Studio 2015, 2017 and 2019. | ||
|
||
set ERROR_VC_LTL_NOT_SUPPORT_PLATFORM=VC-LTL does not support %Platform% platform. | ||
|
||
set ERROR_VC_LTL_FILE_MISSING=VC-LTL can't find lib files, please download the binary files from https://github.com/Chuyu-Team/VC-LTL/releases/latest then continue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
| ||
/* | ||
实现一些额外的安全检查,多一层安全保障。 | ||
*/ | ||
|
||
#ifdef _DEBUG | ||
#error "调试版无法使用VC LTL,请切换到Release然后重新编译!" | ||
#endif | ||
|
||
#ifdef _DLL | ||
_LTL_PushWarning(1004, "从VC-LTL 4.0 开始MD模式将链接到VC-LTL自身的DLL中,如需静态编译(仅依赖msvcrt.dll),请切换到MT。") | ||
#endif | ||
|
||
|
||
#ifndef _VC_LTL_Include | ||
#error "VC头文件(VC\X.XX.XXXXX\include)没有被加载,请确保 VC-LTL helper for Visual Studio.props 属性表正常加入项目,并检查依赖顺序是否有误!" | ||
#endif | ||
|
||
#ifndef _UCRT_LTL_Include | ||
#error "ucrt头文件(ucrt\X.XX.XXXXX.X)没有被加载,请确保 VC-LTL helper for Visual Studio.props 属性表正常加入项目,并检查依赖顺序是否有误!" | ||
#endif // !_UCRT_LTL_Include | ||
|
||
#if defined(_LTL_VistaMode) | ||
|
||
#if defined _ATL_XP_TARGETING || defined _USING_V110_SDK71_ | ||
_LTL_PushWarning(1006, "在Vista模式中启用XP兼容将导致程序体积变大,推荐移除 _ATL_XP_TARGETING 以及 _USING_V110_SDK71_宏。") | ||
#endif | ||
|
||
_LTL_PushNote("进入ltl Vista模式,已准备引用到VC-LTL。定义 _DISABLE_DEPRECATE_LTL_MESSAGE 可关闭信息提示。") | ||
|
||
#elif defined(_LTL_XPMode) | ||
|
||
#ifdef _DLL | ||
//VC-LTL默认没有编译XP的动态库,如果需要请自行编译。 | ||
_LTL_PushWarning(1006, "Windows XP模式使用无法正常使用 /MD 编译,建议使用 /MT 编译。") | ||
#endif | ||
|
||
_LTL_PushNote("进入ltl WinXP兼容模式,已准备引用到VC-LTL。定义 _DISABLE_DEPRECATE_LTL_MESSAGE 可关闭信息提示。") | ||
#else | ||
#error 未知模式! | ||
#endif | ||
|
||
#ifdef __NO_LTL_LIB | ||
_LTL_PushWarning(1003, "VC-LTL 2.0 开始ltl超越模式已经弃用,此选项将被忽略。") | ||
#endif | ||
|
||
#ifdef _NO__LTL_Initialization | ||
_LTL_PushWarning(1003, "VC-LTL 4.0 开始不在允许禁用VC-LTL初始化,此选项将被忽略。") | ||
#endif //!_NO__LTL_Initialization | ||
|
||
#if defined __cplusplus_winrt && _CRT_NTDDI_MIN <= /*NTDDI_WIN8*/0x06020000 | ||
_LTL_PushWarning(1005, "VC-LTL为了简化支持,当使用 /ZW 参数时编译的程序将无法支持 Windows 8。") | ||
#endif |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!--保存错误代码列表--> | ||
<PropertyGroup> | ||
<!--LTL2000--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_DEBUG>VC-LTL不兼容 Debug 配置,VC-LTL已经自动禁用,请切换到 Release 配置然后继续。</ERROR_VC_LTL_NOT_SUPPORT_DEBUG> | ||
<!--LTL2001--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_MFC>VC-LTL不兼容 MFC 项目,VC-LTL已经自动禁用。</ERROR_VC_LTL_NOT_SUPPORT_MFC> | ||
<!--LTL2002--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_PLATFORM>VC-LTL不兼容 $(PlatformShortName) 平台,已经自动禁用VC-LTL。</ERROR_VC_LTL_NOT_SUPPORT_PLATFORM> | ||
<!--LTL2003--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_PLATFORM_TOOLSET>VC-LTL不兼容 $(PlatformToolset) 工具集,请切换到 Visual Studio 2015/2017/2019 然后继续。</ERROR_VC_LTL_NOT_SUPPORT_PLATFORM_TOOLSET> | ||
<!--LTL2004--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_UNIVERSAL_DRIVER>VC-LTL不兼容 Windows 10 Universal Driver,VC-LTL已经自动禁用。</ERROR_VC_LTL_NOT_SUPPORT_UNIVERSAL_DRIVER> | ||
|
||
<!--LTL3000--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_VC_TOOLS_VERSION>VC-LTL不支持 VC $(VCToolsVersion),已临时切换到 VC $(VCLTLToolsVersion) 来维持基础功能。这可能是你的IDE版本过低,建议升级到最新IDE然后继续!</ERROR_VC_LTL_NOT_SUPPORT_VC_TOOLS_VERSION> | ||
<!--LTL3001--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_UCRT_VERSION>VC-LTL不支持 UCRT $(TargetUniversalCRTVersion),目前已临时切换到 UCRT $(VCLTLTargetUniversalCRTVersion) 来维持基础功能。这可能是你的SDK版本过低,建议切换到最新SDK然后继续!</ERROR_VC_LTL_NOT_SUPPORT_UCRT_VERSION> | ||
<!--LTL3002--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_WINXP_IN_UCRT_MODE>VC-LTL不支持 UCRT模式与Windows XP兼容模式同时使用,已临时禁用Windows XP兼容模式。</ERROR_VC_LTL_NOT_SUPPORT_WINXP_IN_UCRT_MODE> | ||
<!--LTL3003--> | ||
<ERROR_VC_LTL_NOT_SUPPORT_MITIGATION>VC-LTL不完全支持 $(SpectreMitigation) 缓解方案,建议升级到最新VC-LTL然后继续。</ERROR_VC_LTL_NOT_SUPPORT_MITIGATION> | ||
|
||
<!--LTL4000--> | ||
<ERROR_VC_LTL_FILE_MISSING>VC-LTL不找不到lib文件,请重新安装 NuGet 包,或者从 https://github.com/Chuyu-Team/VC-LTL/releases/latest 下载完整二进制文件然后继续。</ERROR_VC_LTL_FILE_MISSING> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
:: | ||
:: | ||
:: | ||
:: VC-LTL config.cmd 的错误信息 | ||
:: | ||
:: | ||
:: | ||
|
||
|
||
set ERROR_VC_LTL_DONOT_USE_THIS_FILE=请不要直接使用此脚本,应该使用VC-LTL helper for nmake。 | ||
|
||
set ERROR_VC_LTL_CANNOT_FOUND_INCLUDE_ENV=找不到环境变量INCLUDE,请在vcvars32.bat/vcvars64.bat执行后调用此脚本。 | ||
|
||
set ERROR_VC_LTL_CANNOT_FOUND_LIB_ENV=找不到环境变量LIB,请在vcvars32.bat/vcvars64.bat执行后调用此脚本。 | ||
|
||
set ERROR_VC_LTL_NOT_SUPPORT_PLATFORM_TOOLSET=VC-LTL仅支持VS 2015、2017以及2019。 | ||
|
||
set ERROR_VC_LTL_NOT_SUPPORT_PLATFORM=VC-LTL CMD脚本不支持体系 : %Platform% | ||
|
||
set ERROR_VC_LTL_FILE_MISSING=VC-LTL不找不到lib文件,请从 https://github.com/Chuyu-Team/VC-LTL/releases/latest 下载完整二进制文件然后继续。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
| ||
//为了避免某些老脚本无法加载 LTL_CL_Checks.h,我们在这里做一个转发,默认引用为英文(1033) | ||
|
||
#include "../1033/LTL_CL_Checks.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
| ||
//为了避免某些老脚本无法加载 LTL_CL_Checks.h,我们在这里做一个转发,默认引用为英文(1033) | ||
|
||
#include "../1033/LTL_CL_Checks.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.