Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
更新readme,并添加nuget帮助
Browse files Browse the repository at this point in the history
  • Loading branch information
mingkuang-Chuyu committed Dec 7, 2019
1 parent 20a863b commit 2b7fc7c
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 28 deletions.
47 changes: 33 additions & 14 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,31 +85,47 @@ from the pure C source code.
> The binaries compiled with the VC-LTL is compatible with Windows XP and
later, even in the environment which installed no hotfixes.

## 3. How to used?
We will enter the theme, we have prepared a rich [VC-LTL Samples](https://github.com/Chuyu-Team/vc-ltl-samples) for your reference, and welcome to join our QQ group (633710173).

### 3.1. Install VC-LTL
If you download and unzip [VC-LTL Binary](https://github.com/Chuyu-Team/VC-LTL/releases/latest) to `D:\Src\VC-LTL`, please double-click `D:\Src\VC-LTL\Install.cmd`.

> The script will save the information in the registry `HKCU\Code\VC-LTL`.
### 3.2. Using VC-LTL in Visual Studio
### 3.1. Using VC-LTL in Visual Studio

#### 3.1.1. Choose reference mode

##### 3.1.1.1. Reference via NuGet (recommend)
> VC-LTL is too large to upload "nuget.org".
Right-click on the project and select "Manage NuGet Packages" - Settings - ╋

Then add the Chuyu NuGet source: https://pkgs.dev.azure.com/chuyu/_packaging/chuyu/nuget/v3/index.json

Finally, switch the source of the package to "Chuyu", then select the version that suits you, and finally click Install.

![ConfigurationNuGet](https://raw.githubusercontent.com/wiki/Chuyu-Team/VC-LTL/en/image/ConfigurationNuGet.png)

![InstallByNuGet](https://raw.githubusercontent.com/wiki/Chuyu-Team/VC-LTL/en/image/InstallByNuGet.png)

##### 3.1.1.2. Reference via Registry (recommend)
We will enter the theme, we have prepared a rich [VC-LTL Samples](https://github.com/Chuyu-Team/vc-ltl-samples) for your reference, and welcome to join our QQ group (633710173).

#### 3.2.1. Add VC-LTL Property Sheet
Copy `VC-LTL helper for Visual Studio.props` to your project, then open the Property Manager ( View - Property Manager ) and right-click on the Release Configuration, click on `Add Existing Property Sheet...`, and finally select `VC-LTL helper for Visual Studio.props`.

![AddShared](https://raw.githubusercontent.com/wiki/Chuyu-Team/VC-LTL/en/image/AddShared.png)

#### 3.2.2. Configure Project Properties
#### 3.1.2. Configure Project Properties
* C/C++ - Code Generation -`Runtime Library` adjust to `Multi-threaded (/MT)`

![ConfigurationProject](https://raw.githubusercontent.com/wiki/Chuyu-Team/VC-LTL/en/image/ConfigurationProject.png)

> For XP support, please use the `Windows XP toolset` in the platform toolset, or modify `VC-LTL helper for Visual Studio.props` to enable `<SupportWinXP>true</SupportWinXP>`.
### 3.3. Using VC-LTL in CMake
### 3.2. Using VC-LTL in CMake
We will enter the theme, we have prepared a rich [VC-LTL Samples](https://github.com/Chuyu-Team/vc-ltl-samples) for your reference, and welcome to join our QQ group (633710173).

#### 3.3.1. Add VC-LTL Module File
#### 3.2.1. Add VC-LTL Module File

Copy `VC-LTL helper for cmake.cmake` to your project. Then add `include("VC-LTL helper for cmake.cmake")` to `CMakeLists.txt`.

Expand All @@ -123,13 +139,14 @@ include("VC-LTL helper for cmake.cmake")
add_subdirectory(src)
```

#### 3.3.2. Modify The Configuration
#### 3.2.2. Modify The Configuration

> Make sure to use `/MT` to compile project when using VC-LTL. For XP support, please modify `VC-LTL helper for cmake.cmake` to enable `set(SupportWinXP "true")`.
### 3.4. Using VC-LTL in NMake/CL
### 3.3. Using VC-LTL in NMake/CL

#### 3.4.1. Run VC-LTL Cmd Script
#### 3.3.1. Run VC-LTL Cmd Script
We will enter the theme, we have prepared a rich [VC-LTL Samples](https://github.com/Chuyu-Team/vc-ltl-samples) for your reference, and welcome to join our QQ group (633710173).

Copy `VC-LTL helper for nmake.cmd` to your project. Run `vcvars32.bat` or `vcvars64.bat` and execute this script. The script will automatically modify the `include` and `lib` environment variables.

Expand All @@ -140,11 +157,11 @@ call "D:\VC-LTL\VC-LTL helper for nmake.cmd"
nmake /f Test.mak
```
#### 3.4.2. Modify The Configuration
#### 3.3.2. Modify The Configuration

> Make sure to use `/MT` to compile project when using VC-LTL. For XP support, please modify `VC-LTL helper for nmake.cmd` to enable `set SupportWinXP=true`.
### 3.5. Rebuild (Release only)
### 3.4. Rebuild (Release only)
Is the file size smaller? If you fail to compile, please refer to [4. FAQ](#4-faq). You can also feedback and work together to improve VC-LTL.

If VC-LTL is referenced correctly, it will be output at the time of generation: `note: 进入ltl普通模式,已准备引用到VC-LTL。定义 _DISABLE_DEPRECATE_LTL_MESSAGE 可关闭信息提示。`.
Expand Down Expand Up @@ -457,9 +474,11 @@ If VC-LTL is referenced correctly, it will be output at the time of generation:
* [Improve 53](https://github.com/Chuyu-Team/VC-LTL/issues/53), disable reference elimination for the STL library and avoid LLVM link failure (Thanks to hotxp, BigBrother).


### 4.0.3.5 - Improved Support (Dec 2, 2019 16:00)
### 4.0.3.6 - Improved Support (Dec 7, 2019 16:00)
* Improve, Improve the experience of VC-LTL in VS (Thanks to MouriNaruto).
* Improve, Improved QT support (Thunks to 昌平517).
* New Fea, add VS 14.23.28105 support.
* Improve, FH4 removes TLS dependencies.
* Fix Bug, C4201 waring in corecrt_wstdio.h and mbstring.h (Thunks to BigBrother).
* Fix Bug, XP `legacy_stdio_definitions.lib` missing vsnprintf_s function issue (Thunks to 昌平517).
* Fix Bug, XP `legacy_stdio_definitions.lib` missing vsnprintf_s function issue (Thunks to 昌平517).
* Fix Bug,symbol conflict may occur in `legacy_stdio_definitions.lib` in light mode (Thunks to 昌平517)
53 changes: 39 additions & 14 deletions ReadMe.osc.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,47 @@ VC-LTL最初是Dism++专用运行时。2017年3月6号从Dism++源代码中分
## 3. 使用方法
下面我们将进入主题,我们给大家准备了丰富的[VC-LTL示例](https://github.com/Chuyu-Team/vc-ltl-samples)供大家参考,也欢迎加入我们的QQ群(633710173)。

### 3.1. 安装VC-LTL

### 3.1. 在Visual Studio中使用VC-LTL

#### 3.1.1. 引用VC-LTL

##### 3.1.1.1. 通过NuGet引用(推荐)
> 由于VC-LTl体积过大,因此无法上传“nuget.org”。
在 项目右键,选择“管理 NuGet 程序包” - 设置 - ╋

然后添加初雨NuGet源:https://pkgs.dev.azure.com/chuyu/_packaging/chuyu/nuget/v3/index.json

然后将包源切换到“初雨”,然后选择适合您的版本,最后点击安装即可。

![ConfigurationNuGet](https://raw.githubusercontent.com/wiki/Chuyu-Team/VC-LTL/zh-Hans/image/ConfigurationNuGet.png)

![InstallByNuGet](https://raw.githubusercontent.com/wiki/Chuyu-Team/VC-LTL/zh-Hans/image/InstallByNuGet.png)

##### 3.1.1.2. 通过注册表引用
假如,你将[VC-LTL Binary](https://gitee.com/Chuyu-Team/VC-LTL/releases)下载并解压至`D:\Src\VC-LTL`(具体位置无任何要求),双击`D:\Src\VC-LTL\Install.cmd`即可。

> 脚本会在`HKCU\Code\VC-LTL`创建注册表。
### 3.2. 在Visual Studio中使用VC-LTL

#### 3.2.1. 添加VC-LTL属性表
将属性表`VC-LTL helper for Visual Studio.props`复制到你的工程目录,你可以打开属性管理器(视图 - 属性管理器),然后Release配置上右键`添加现有属性表`,然后选择`VC-LTL helper for Visual Studio.props`即可。

![AddShared](https://raw.githubusercontent.com/wiki/Chuyu-Team/VC-LTL/zh-Hans/image/AddShared.png)

#### 3.2.2. 配置工程属性
#### 3.1.2. 配置工程属性
* C/C++ - 代码生成 -【运行库】调整为【多线程 (/MT)】

![ConfigurationProject](https://raw.githubusercontent.com/wiki/Chuyu-Team/VC-LTL/zh-Hans/image/ConfigurationProject.png)

> 如需支持XP,请在平台工具集中选择`Windows XP`或者修改`VC-LTL helper for Visual Studio.props`启用 `<SupportWinXP>true</SupportWinXP>` 即可。
### 3.3. 在CMake中使用VC-LTL
### 3.2. 在CMake中使用VC-LTL

假如,你将[VC-LTL Binary](https://gitee.com/Chuyu-Team/VC-LTL/releases)下载并解压至`D:\Src\VC-LTL`(具体位置无任何要求),双击`D:\Src\VC-LTL\Install.cmd`即可。

> 脚本会在`HKCU\Code\VC-LTL`创建注册表。
#### 3.3.1. 添加VC-LTL配置文件
#### 3.2.1. 添加VC-LTL配置文件

将模块文件`VC-LTL helper for cmake.cmake`复制到你的工程目录(顶层CMakeLists.txt同级目录)。然后在`CMakeLists.txt`中添加一行 `include("VC-LTL helper for cmake.cmake")` 即可。

Expand All @@ -111,13 +130,17 @@ include("VC-LTL helper for cmake.cmake")
add_subdirectory(src)
```

#### 3.3.2. 调整配置工程
#### 3.2.2. 调整配置工程

> 务必确保使用`/MT`编译代码。如需支持XP,请修改`VC-LTL helper for cmake.cmake`启用 `set(SupportWinXP "true")` 即可。
### 3.4. 在NMake/纯CL中使用VC-LTL
### 3.3. 在NMake/纯CL中使用VC-LTL

假如,你将[VC-LTL Binary](https://gitee.com/Chuyu-Team/VC-LTL/releases)下载并解压至`D:\Src\VC-LTL`(具体位置无任何要求),双击`D:\Src\VC-LTL\Install.cmd`即可。

> 脚本会在`HKCU\Code\VC-LTL`创建注册表。
#### 3.4.1. 运行VC-LTL辅助脚本
#### 3.3.1. 运行VC-LTL辅助脚本

将辅助脚本`VC-LTL helper for nmake.cmd`复制到你的工程目录。启动`vcvars32.bat/vcvars64.bat`执行此脚本即可,脚本将自动修改`include`以及`lib`环境变量。

Expand All @@ -128,12 +151,12 @@ call "D:\VC-LTL\VC-LTL helper for nmake.cmd"
nmake /f Test.mak
```
#### 3.4.2. 配置工程属性
#### 3.3.2. 配置工程属性

> 务必确保使用`/MT`编译代码。如需支持XP,请修改`VC-LTL helper for nmake.cmd`启用 `set SupportWinXP=true`

### 3.5. 重新编译(仅Release)
### 3.4. 重新编译(仅Release)
现在是不是体积就小了很多。如果你编译不通过,可以先参考 [4. 常见问题](#4-常见问题)。如果还是不通过可以反馈,共同改进VC-LTL。

如果正确引用VC-LTL,那么 会在生成时输出:`note: 进入ltl普通模式,已准备引用到VC-LTL。定义 _DISABLE_DEPRECATE_LTL_MESSAGE 可关闭信息提示。`
Expand Down Expand Up @@ -445,9 +468,11 @@ nmake /f Test.mak
* [改进体验 53](https://github.com/Chuyu-Team/VC-LTL/issues/53),关闭对STL库的引用消除,规避LLVM链接失败问题(感谢 hotxp、BigBrother)。


### 4.0.3.5 - 改进支持(2019-12-02 16:00)
### 4.0.3.6 - 改进支持(2019-12-07 16:00)
* 改进体验,改进VS用户使用VC-LTL的体验(感谢 毛利)。
* 改进体验,改进QT支持(感谢 昌平517)。
* 新增Fea,添加14.23.28105支持。
* 行为调整,消除FH4对TLS的依赖。
* 解决Bug,消除 corecrt_wstdio.h 以及 mbstring.h中的 C4201警告(感谢 大胸)。
* 解决Bug,解决XP `legacy_stdio_definitions.lib` 缺少 vsnprintf_s 问题(感谢 昌平517)。
* 解决Bug,解决XP `legacy_stdio_definitions.lib` 缺少 vsnprintf_s 问题(感谢 昌平517)。
* 解决Bug,轻量模式中,`legacy_stdio_definitions.lib`可能出现符号冲突问题(感谢 昌平517)。

0 comments on commit 2b7fc7c

Please sign in to comment.