require UTF-8 code page to build with MSVC toolchain (#427)
This commit is contained in:
parent
454dcbadcb
commit
00f911d5da
|
@ -56,7 +56,8 @@ qmake 变量:
|
||||||
|
|
||||||
前置条件:
|
前置条件:
|
||||||
|
|
||||||
0. Windows 7 x64 或更高版本。不支持 ARM64。
|
0. Windows 10 x64 或更高版本。不支持 ARM64。
|
||||||
|
- 对于 MSVC 工具链,Windows 必须使用 Unicode UTF-8 提供全球语言支持。
|
||||||
1. 用 [Qt.io](https://www.qt.io/download-qt-installer-oss) 或[镜像站](https://mirrors.sjtug.sjtu.edu.cn/docs/qt)的在线安装器安装 Qt。
|
1. 用 [Qt.io](https://www.qt.io/download-qt-installer-oss) 或[镜像站](https://mirrors.sjtug.sjtu.edu.cn/docs/qt)的在线安装器安装 Qt。
|
||||||
- 选中 Qt 库(“Qt” 组下的 “Qt 5.15.2” 小组,勾选 “MinGW 8.1.0 32-bit” “MinGW 8.1.0 64-bit” “MSVC 2019 32-bit” “MSVC 2019 64-bit” 中的至少一个)。
|
- 选中 Qt 库(“Qt” 组下的 “Qt 5.15.2” 小组,勾选 “MinGW 8.1.0 32-bit” “MinGW 8.1.0 64-bit” “MSVC 2019 32-bit” “MSVC 2019 64-bit” 中的至少一个)。
|
||||||
- 对于 MinGW 工具链,选中相应的工具链(“Qt” 组下的 “Developer and Designer Tools” 小组,“MinGW 8.1.0 32-bit” 或 “MinGW 8.1.0 64-bit”,匹配库的版本)。
|
- 对于 MinGW 工具链,选中相应的工具链(“Qt” 组下的 “Developer and Designer Tools” 小组,“MinGW 8.1.0 32-bit” 或 “MinGW 8.1.0 64-bit”,匹配库的版本)。
|
||||||
|
@ -113,15 +114,11 @@ qmake 变量:
|
||||||
|
|
||||||
前置条件:
|
前置条件:
|
||||||
|
|
||||||
0. Windows 7 x64 或更高版本。不支持 ARM64。
|
0. Windows 10 x64 或更高版本。不支持 ARM64。
|
||||||
- 在全新安装的 Windows 7 上,依次安装以下组件:
|
- Windows 必须使用 Unicode UTF-8 提供全球语言支持。
|
||||||
1. SHA-2 代码签名支持(.NET Framework 4.8 的前置条件),
|
|
||||||
2. .NET Framework 4.8(Windows 管理框架 5.1 和 Visual Studio 的前置条件,也是 Git for Windows 的可选依赖),
|
|
||||||
3. Windows 管理框架 5.1(vcpkg 自举的前置条件)。
|
|
||||||
1. 安装 Visual Studio 2017 或更高版本,或 “Visual Studio 构建工具 2017” 或更高版本,带有 “使用 C++ 的桌面开发” 工作负载。
|
1. 安装 Visual Studio 2017 或更高版本,或 “Visual Studio 构建工具 2017” 或更高版本,带有 “使用 C++ 的桌面开发” 工作负载。
|
||||||
- 在 “安装详细信息” 面板,“使用 C++ 的桌面开发” 之下,至少选择一个 “MSVC x86/x64 生成工具” 和一个 Windows SDK。
|
- 在 “安装详细信息” 面板,“使用 C++ 的桌面开发” 之下,至少选择一个 “MSVC x86/x64 生成工具” 和一个 Windows SDK。
|
||||||
2. 安装 [vcpkg 的独立版本](https://github.com/microsoft/vcpkg/blob/master/README_zh_CN.md#快速开始-windows)。
|
2. 安装 [vcpkg 的独立版本](https://github.com/microsoft/vcpkg/blob/master/README_zh_CN.md#快速开始-windows)。
|
||||||
- 截至 2023.08.09,Windows 7 需要[一个补丁](./packages/windows/vcpkg-win7-2023.08.09.patch)以使用兼容的 Python 版本。受影响的文件可能会被修改,所以最好手动修改这些文件。
|
|
||||||
3. 用 vcpkg 安装 Qt。
|
3. 用 vcpkg 安装 Qt。
|
||||||
```ps1
|
```ps1
|
||||||
$TARGET = "x64-windows-static" # 或 "x86-windows-static"
|
$TARGET = "x64-windows-static" # 或 "x86-windows-static"
|
||||||
|
|
|
@ -58,7 +58,8 @@ To build:
|
||||||
|
|
||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
|
||||||
0. Windows 7 x64 or later. ARM64 is not supported.
|
0. Windows 10 x64 or later. ARM64 is not supported.
|
||||||
|
- For MSVC toolchain, Windows has to use Unicode UTF-8 for worldwide language support.
|
||||||
1. Install Qt with online installer from [Qt.io](https://www.qt.io/download-qt-installer-oss).
|
1. Install Qt with online installer from [Qt.io](https://www.qt.io/download-qt-installer-oss).
|
||||||
- Select the library (in _Qt_ group, _Qt 5.15.2_ subgroup, check at lease one of _MinGW 8.1.0 32-bit_, _MinGW 8.1.0 64-bit_, _MSVC 2019 32-bit_ or _MSVC 2019 64-bit_).
|
- Select the library (in _Qt_ group, _Qt 5.15.2_ subgroup, check at lease one of _MinGW 8.1.0 32-bit_, _MinGW 8.1.0 64-bit_, _MSVC 2019 32-bit_ or _MSVC 2019 64-bit_).
|
||||||
- For MinGW toolchain, select the toolchain (in _Qt_ group, _Developer and Designer Tools_ subgroup, check _MinGW 8.1.0 32-bit_ or _MinGW 8.1.0 64-bit_, matching the library).
|
- For MinGW toolchain, select the toolchain (in _Qt_ group, _Developer and Designer Tools_ subgroup, check _MinGW 8.1.0 32-bit_ or _MinGW 8.1.0 64-bit_, matching the library).
|
||||||
|
@ -115,15 +116,11 @@ To build:
|
||||||
|
|
||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
|
||||||
0. Windows 7 x64 or later. ARM64 is not supported.
|
0. Windows 10 x64 or later. ARM64 is not supported.
|
||||||
- For a fresh installation of Windows 7, install following components in order:
|
- For MSVC toolchain, Windows has to use Unicode UTF-8 for worldwide language support.
|
||||||
1. SHA-2 code signing support (prerequisite of .NET Framework 4.8),
|
|
||||||
2. .NET Framework 4.8 (prerequisite of Windows Management Framework 5.1 and Visual Studio; also optional dependency of Git for Windows),
|
|
||||||
3. Windows Management Framework 5.1 (prerequisite of vcpkg bootstrapping).
|
|
||||||
1. Install Visual Studio 2017 or later, or Visual Studio Build Tools 2017 or later, with _Desktop Development with C++_ workload.
|
1. Install Visual Studio 2017 or later, or Visual Studio Build Tools 2017 or later, with _Desktop Development with C++_ workload.
|
||||||
- In _Installation Details_ panel, under the _Desktop Development with C++_ workload, select at least one _MSVC x86/x64 build tools_ and one _Windows SDK_.
|
- In _Installation Details_ panel, under the _Desktop Development with C++_ workload, select at least one _MSVC x86/x64 build tools_ and one _Windows SDK_.
|
||||||
2. Install [standalone vcpkg](https://vcpkg.io/en/getting-started).
|
2. Install [standalone vcpkg](https://vcpkg.io/en/getting-started).
|
||||||
- As of 2023.08.09, [a patch](./packages/windows/vcpkg-win7-2023.08.09.patch) is required for Windows 7 to use compatible version of Python. Affected files will change over time, so manually edit them to apply the patch.
|
|
||||||
3. Install Qt with vcpkg.
|
3. Install Qt with vcpkg.
|
||||||
```ps1
|
```ps1
|
||||||
$TARGET = "x64-windows-static" # or "x86-windows-static"
|
$TARGET = "x64-windows-static" # or "x86-windows-static"
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
diff --git a/scripts/cmake/vcpkg_find_acquire_program(PYTHON3).cmake b/scripts/cmake/vcpkg_find_acquire_program(PYTHON3).cmake
|
|
||||||
index 6734b0bb6..2900ddf9e 100644
|
|
||||||
--- a/scripts/cmake/vcpkg_find_acquire_program(PYTHON3).cmake
|
|
||||||
+++ b/scripts/cmake/vcpkg_find_acquire_program(PYTHON3).cmake
|
|
||||||
@@ -1,20 +1,20 @@
|
|
||||||
if(CMAKE_HOST_WIN32)
|
|
||||||
set(program_name python)
|
|
||||||
- set(program_version 3.11.4)
|
|
||||||
+ set(program_version 3.8.10)
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
||||||
set(tool_subdirectory "python-${program_version}-x86")
|
|
||||||
set(download_urls "https://www.python.org/ftp/python/${program_version}/python-${program_version}-embed-win32.zip")
|
|
||||||
set(download_filename "python-${program_version}-embed-win32.zip")
|
|
||||||
- set(download_sha512 4cdbb2efdc7764a87edfb7370716c1caf660d38bce37a280ec59b7aecab5672c5798aabe19a8ae395224bea7dfe644bd92656f0bbc44348717981b45a909c024)
|
|
||||||
+ set(download_sha512 a6f0c35ba37c07c6e8815fb43c20095541117f3b6cc034b8ef0acfc908de8951bdffa38706bac802f820290b39ae84f934f27a8e32f548735f470277f7a70550)
|
|
||||||
else()
|
|
||||||
set(tool_subdirectory "python-${program_version}-x64")
|
|
||||||
set(download_urls "https://www.python.org/ftp/python/${program_version}/python-${program_version}-embed-amd64.zip")
|
|
||||||
set(download_filename "python-${program_version}-embed-amd64.zip")
|
|
||||||
- set(download_sha512 3f93c2a16764b9ea6343315b70c0c6319aac8edaefbf4e21206fb30eff365e8fe37264a9133bebe12e664ea5d8fd232d587a5603a51fd96e1252a2fc01a2e550)
|
|
||||||
+ set(download_sha512 86e55911be78205a61f886feff2195c78a6f158a760cc1697ce4340dcb5ca118360251de2f707b6d2a78b7469d92c87b045b7326d6f194bfa92e665af1cd55a5)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(paths_to_search "${DOWNLOADS}/tools/python/${tool_subdirectory}")
|
|
||||||
- vcpkg_list(SET post_install_command "${CMAKE_COMMAND}" -E rm python311._pth)
|
|
||||||
+ vcpkg_list(SET post_install_command "${CMAKE_COMMAND}" -E rm python38._pth)
|
|
||||||
else()
|
|
||||||
set(program_name python3)
|
|
||||||
set(brew_package_name "python")
|
|
Loading…
Reference in New Issue