Skip to content
This repository was archived by the owner on Jan 7, 2020. It is now read-only.

Commit 846887d

Browse files
committed
Support MSVC v141 and v142 simultaneously
1 parent 88ba613 commit 846887d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ branches:
33
- /dev.*/ # do not build dev branch
44

55
image:
6-
- Visual Studio 2019 Preview
6+
- Visual Studio 2017
77

88
platform:
99
- x86

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ CQ_MAIN {
7676

7777
在开始使用之前,请确保你已经安装了 Git,且 `PATH` 中存在 `git` 命令。不需要安装 vcpkg,后面的脚本中会自动安装。
7878

79-
然后确保安装了 **Visual Studio 2019**,并勾选「使用 C++ 的桌面开发」,确保安装了 CMake、**MSVC v142****Windows 10 SDK** 这三个组件。其中,如果系统中已经安装了 CMake,无需再在 VS Installer 中安装,但需要确保命令已添加进 `PATH`。除此之外,vcpkg 还要求安装 VS 2019**英文语言包**
79+
然后确保安装了 **Visual Studio 2017 或 2019**,并勾选「使用 C++ 的桌面开发」,确保安装了 CMake、**MSVC v141 或 v142****Windows 10 SDK** 这三个组件。其中,如果系统中已经安装了 CMake,无需再在 VS Installer 中安装,但需要确保命令已添加进 `PATH`。除此之外,vcpkg 还要求安装 VS 的**英文语言包**
8080

8181
### 下载 SDK
8282

@@ -118,7 +118,7 @@ powershell .\scripts\generate.ps1 Debug
118118
powershell .\scripts\build.ps1 Debug
119119
```
120120

121-
上面两条命令分别生成 build 目录和构建项目,将 `Debug` 改为 `Release` 可以构建 release 版本。如果安装了 CMake 还没支持的较新版本 VS,需要先手动进入 VS 2019 的 Developer Command Prompt,再执行上面的命令。
121+
上面两条命令分别生成 build 目录和构建项目,将 `Debug` 改为 `Release` 可以构建 release 版本。如果安装了 CMake 还没支持的较新版本 VS,需要先手动进入 VS 2017 或 2019 的 Developer Command Prompt,再执行上面的命令。
122122

123123
如果你使用 VS Code,可以直接运行 task;如果使用 VS,可以直接选择菜单 CMake - 全部生成。
124124

@@ -143,6 +143,7 @@ $jsonPath = "$appOutDir\$jsonName"
143143
144144
Write-Host "正在拷贝插件到 酷Q 应用文件夹……"
145145
146+
New-Item -Path $coolqAppDevDir -ItemType Directory -ErrorAction SilentlyContinue
146147
Copy-Item -Force $dllPath "$coolqAppDevDir\$dllName"
147148
Copy-Item -Force $jsonPath "$coolqAppDevDir\$jsonName"
148149

cmake/x86-windows-static-custom.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
set(VCPKG_TARGET_ARCHITECTURE x86)
22
set(VCPKG_CRT_LINKAGE dynamic)
33
set(VCPKG_LIBRARY_LINKAGE static)
4-
set(VCPKG_PLATFORM_TOOLSET v142)
54

65
if (PORT MATCHES "^libiconv$")
76
set(VCPKG_LIBRARY_LINKAGE dynamic)

scripts/generate.ps1

-74 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)