Files
VC-LTL5/VC-LTL helper for Visual Studio.props

78 lines
4.1 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
作者:mingkuang
修改日期:2018-08-14
VC-LTL自动化加载配置,建议你将此文件单独复制到你的工程再使用,该文件能自动识别当前环境是否存在VC-LTL,并且自动应用。
使用方法:
1. 在属性管理器选择所有Release配置,然后右键选择“添加现有属性表”。
VC-LTL默认搜索顺序
1. VC-LTL helper for Visual Studio.props所在目录,即 $(MSBuildThisFileDirectory)
2. 当前项目根目录,即 $(ProjectDir)VC-LTL
3. 前解决方案根目录,即 $(SolutionDir)VC-LTL
4. 当前项目父目录,即 $(ProjectDir)..\VC-LTL
5. 当前解决方案父目录,即 $(SolutionDir)..\VC-LTL
6. 注册表HKEY_CURRENT_USER\Code\VC-LTL@Root
把VC-LTL放在其中一个位置即可,VC-LTL就能被自动引用。
如果你对默认搜索顺序不满,你可以修改此文件。你也可以直接指定$(VC_LTL_Root)宏更加任性的去加载VC-LTL。
-->
<!--#####################################################################VC-LTL设置#####################################################################-->
<PropertyGroup>
<!--
控制最小兼容系统版本,目前可用版本为 5.1.2600.0 6.0.6000.0(默认) 6.2.9200.0 10.0.10240.0 10.0.19041.0
注意:VC-LTL依赖YY-Thunks,否则可能无法兼容早期系统。如果需要支持Windows XP,该值必须为5.1.2600.0。-->
<!--<WindowsTargetPlatformMinVersion>5.1.2600.0</WindowsTargetPlatformMinVersion>-->
<!--
VC-LTL使用的CRT模式,SupportLTL可能值为:
* false:禁用VC_LTL
* true:默认值,让VC-LTL自动适应。当最小兼容版本>=10.0时使用ucrt模式,其他系统使用msvcrt模式。
* msvcrt:使用msvcrt.dll作为CRT。注意:msvcrt模式可能不完全支持所有ucrt的新功能。比如setloacl不支持UTF8。
* ucrt:使用ucrtbase.dll作为CRT。注意:早期系统可能需要下载VC-LTL.Redist.Dlls.zip,感谢msvcr14x项目提供兼容XP系统的ucrtbase.dll。
如果需要兼容XP时也使用ucrt,请指定 SupportLTL=ucrt。-->
<!--<SupportLTL>ucrt</SupportLTL>-->
</PropertyGroup>
<!--####################################################################################################################################################-->
<PropertyGroup>
<!--Shared.props文件根目录存在VC-LTL?-->
<VC_LTL_Root Condition=" ('$(VC_LTL_Root)'=='') And (Exists('$(MSBuildThisFileDirectory)_msvcrt.h')) ">$(MSBuildThisFileDirectory)</VC_LTL_Root>
<!--当前项目根目录存在VC-LTL?-->
<VC_LTL_Root Condition=" ('$(VC_LTL_Root)'=='') And (Exists('$(ProjectDir)VC-LTL\_msvcrt.h')) ">$(ProjectDir)VC-LTL</VC_LTL_Root>
<!--当前解决方案根目录存在VC-LTL?-->
<VC_LTL_Root Condition=" ('$(VC_LTL_Root)'=='') And ('$(SolutionDir)'!='') And (Exists('$(SolutionDir)VC-LTL\_msvcrt.h')) ">$(SolutionDir)VC-LTL</VC_LTL_Root>
<!--当前项目父目录存在VC-LTL?-->
<VC_LTL_Root Condition=" ('$(VC_LTL_Root)'=='') And (Exists('$(ProjectDir)..\VC-LTL\_msvcrt.h')) ">$(ProjectDir)..\VC-LTL</VC_LTL_Root>
<!--当前解决方案父目录存在VC-LTL?-->
<VC_LTL_Root Condition=" ('$(VC_LTL_Root)'=='') And ('$(SolutionDir)'!='') And (Exists('$(SolutionDir)..\VC-LTL\_msvcrt.h')) ">$(SolutionDir)..\VC-LTL</VC_LTL_Root>
<!--如果本地工程没有,那么继续尝试通过注册表获取VC-LTL路径,双击Install.cmd可以自动产生此注册表。-->
<VC_LTL_Root Condition=" '$(VC_LTL_Root)'=='' ">$(Registry:HKEY_CURRENT_USER\Code\VC-LTL@Root)</VC_LTL_Root>
</PropertyGroup>
<ImportGroup Condition=" '$(VC_LTL_Root)'!=''">
<Import Project="$(VC_LTL_Root)\Config\config.props" Condition="Exists('$(VC_LTL_Root)\Config\config.props')"/>
<!--兼容模式,尝试加载老版本-->
<Import Project="$(VC_LTL_Root)\ltlvcrt.props" Condition="(!Exists('$(VC_LTL_Root)\Config\config.props')) And (Exists('$(VC_LTL_Root)\ltlvcrt.props'))"/>
</ImportGroup>
</Project>