@@ -72,33 +72,51 @@ sudo port install "${dependencies[@]}"
7272```
7373
7474#### Windows
75- First you need to install [ MSYS2] ( https://www.msys2.org ) , then startup "MSYS2 UCRT64" and execute the following
76- commands.
75+
76+ @warning {Cross-compilation is not supported on Windows. You must build on the target architecture.}
77+
78+ First you need to install [ MSYS2] ( https://www.msys2.org ) .
79+
80+ For AMD64 startup "MSYS2 UCRT64", or for ARM64 startup "MSYS2 CLANGARM64", then execute the following commands.
7781
7882##### Update all packages
7983``` bash
8084pacman -Syu
8185```
8286
87+ ##### Set toolchain variable
88+ For UCRT64:
89+ ``` bash
90+ export TOOLCHAIN=" ucrt-x86_64"
91+ ```
92+
93+ For CLANGARM64:
94+ ``` bash
95+ export TOOLCHAIN=" clang-aarch64"
96+ ```
97+
8398##### Install dependencies
8499``` bash
85100dependencies=(
86101 " git"
87- " mingw-w64-ucrt-x86_64-boost" # Optional
88- " mingw-w64-ucrt-x86_64-cmake"
89- " mingw-w64-ucrt-x86_64-cppwinrt"
90- " mingw-w64-ucrt-x86_64-curl-winssl"
91- " mingw-w64-ucrt-x86_64-doxygen" # Optional, for docs... better to install official Doxygen
92- " mingw-w64-ucrt-x86_64-graphviz" # Optional, for docs
93- " mingw-w64-ucrt-x86_64-MinHook"
94- " mingw-w64-ucrt-x86_64-miniupnpc"
95- " mingw-w64-ucrt-x86_64-nodejs"
96- " mingw-w64-ucrt-x86_64-nsis"
97- " mingw-w64-ucrt-x86_64-onevpl"
98- " mingw-w64-ucrt-x86_64-openssl"
99- " mingw-w64-ucrt-x86_64-opus"
100- " mingw-w64-ucrt-x86_64-toolchain"
102+ " mingw-w64-${TOOLCHAIN} -boost" # Optional
103+ " mingw-w64-${TOOLCHAIN} -cmake"
104+ " mingw-w64-${TOOLCHAIN} -cppwinrt"
105+ " mingw-w64-${TOOLCHAIN} -curl-winssl"
106+ " mingw-w64-${TOOLCHAIN} -graphviz" # Optional, for docs
107+ " mingw-w64-${TOOLCHAIN} -miniupnpc"
108+ " mingw-w64-${TOOLCHAIN} -nodejs"
109+ " mingw-w64-${TOOLCHAIN} -onevpl"
110+ " mingw-w64-${TOOLCHAIN} -openssl"
111+ " mingw-w64-${TOOLCHAIN} -opus"
112+ " mingw-w64-${TOOLCHAIN} -toolchain"
101113)
114+ if [[ ${MSYSTEM} == " ucrt64" ]]; then
115+ dependencies+=(
116+ " mingw-w64-${TOOLCHAIN} -MinHook"
117+ " mingw-w64-${TOOLCHAIN} -nsis" # TODO: how to create an arm64 installer?
118+ )
119+ fi
102120pacman -S " ${dependencies[@]} "
103121```
104122
@@ -139,7 +157,7 @@ ninja -C build
139157 }}
140158 @tab {Windows | @tabs {
141159 @tab {Installer | ```bash
142- cpack -G NSIS --config ./build/CPackConfig.cmake
160+ cpack -G NSIS --config ./build/CPackConfig.cmake # Not working on CLANGARM64
143161 ```}
144162 @tab {Portable | ```bash
145163 cpack -G ZIP --config ./build/CPackConfig.cmake
0 commit comments