@@ -126,33 +126,53 @@ sudo port install "${dependencies[@]}"
126126```
127127
128128#### Windows
129- First you need to install [ MSYS2] ( https://www.msys2.org ) , then startup "MSYS2 UCRT64" and execute the following
130- commands.
129+
130+ > [ !WARNING]
131+ > Cross-compilation is not supported on Windows. You must build on the target architecture.
132+
133+ First, you need to install [ MSYS2] ( https://www.msys2.org ) .
134+
135+ For AMD64 startup "MSYS2 UCRT64" (or for ARM64 startup "MSYS2 CLANGARM64") then execute the following commands.
131136
132137##### Update all packages
133138``` bash
134139pacman -Syu
135140```
136141
142+ ##### Set toolchain variable
143+ For UCRT64:
144+ ``` bash
145+ export TOOLCHAIN=" ucrt-x86_64"
146+ ```
147+
148+ For CLANGARM64:
149+ ``` bash
150+ export TOOLCHAIN=" clang-aarch64"
151+ ```
152+
137153##### Install dependencies
138154``` bash
139155dependencies=(
140156 " git"
141- " mingw-w64-ucrt-x86_64-boost" # Optional
142- " mingw-w64-ucrt-x86_64-cmake"
143- " mingw-w64-ucrt-x86_64-cppwinrt"
144- " mingw-w64-ucrt-x86_64-curl-winssl"
145- " mingw-w64-ucrt-x86_64-doxygen" # Optional, for docs... better to install official Doxygen
146- " mingw-w64-ucrt-x86_64-graphviz" # Optional, for docs
147- " mingw-w64-ucrt-x86_64-MinHook"
148- " mingw-w64-ucrt-x86_64-miniupnpc"
149- " mingw-w64-ucrt-x86_64-nodejs"
150- " mingw-w64-ucrt-x86_64-nsis"
151- " mingw-w64-ucrt-x86_64-onevpl"
152- " mingw-w64-ucrt-x86_64-openssl"
153- " mingw-w64-ucrt-x86_64-opus"
154- " mingw-w64-ucrt-x86_64-toolchain"
157+ " mingw-w64-${TOOLCHAIN} -boost" # Optional
158+ " mingw-w64-${TOOLCHAIN} -cmake"
159+ " mingw-w64-${TOOLCHAIN} -cppwinrt"
160+ " mingw-w64-${TOOLCHAIN} -curl-winssl"
161+ " mingw-w64-${TOOLCHAIN} -doxygen" # Optional, for docs... better to install official Doxygen
162+ " mingw-w64-${TOOLCHAIN} -graphviz" # Optional, for docs
163+ " mingw-w64-${TOOLCHAIN} -miniupnpc"
164+ " mingw-w64-${TOOLCHAIN} -nodejs"
165+ " mingw-w64-${TOOLCHAIN} -onevpl"
166+ " mingw-w64-${TOOLCHAIN} -openssl"
167+ " mingw-w64-${TOOLCHAIN} -opus"
168+ " mingw-w64-${TOOLCHAIN} -toolchain"
155169)
170+ if [[ " ${MSYSTEM} " == " UCRT64" ]]; then
171+ dependencies+=(
172+ " mingw-w64-${TOOLCHAIN} -MinHook"
173+ " mingw-w64-${TOOLCHAIN} -nsis"
174+ )
175+ fi
156176pacman -S " ${dependencies[@]} "
157177```
158178
0 commit comments