Skip to content

Commit 84f7fe5

Browse files
authored
feat: Adds native dependencies for win-arm64 (#2644)
* Adds native dependencies for win-arm64 - The used versions of those dependencies are often rather dated and didn't build out of the box on win-arm64 / Visual Studio 2022, minimal patches had to be applied - As far as I understood PVRTexLib is delivered as binary only and there's no win-arm64 - therefor added a check to not load it at all. In the end it's only needed by the asset compiler, which in turn is platform neutral. However when invoking it on a arm64 machine, the `dotnet path/to/asset/compiler` will launch it in arm64. If there would be some option to launch it in x64 we wouldn't have any issues with asset compiling. Still the editor might have issues, since its running in process? - Removed the FreeImageNET load - it's not used anywhere in code - Fixes some PInvoke signatures in DxtWrapper * Fixes build of Stride.VisualStudio.sln Probably introduced by ddc7423 * Removes ARM64 from UWP * Updates checkout scripts of freetype and Bullet and NativePath
1 parent 2d5e6a6 commit 84f7fe5

45 files changed

Lines changed: 806 additions & 72 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deps/BulletPhysics/checkout.bat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ IF NOT ERRORLEVEL 0 (
66
ECHO "Could not find git.exe"
77
EXIT /B %ERRORLEVEL%
88
)
9-
%GIT_CMD% clone git@github.com:Eideren/BulletSharpPInvoke.git ../../externals/BulletSharpPInvoke
9+
%GIT_CMD% clone https://github.com/stride3d/BulletSharpPInvoke ../../externals/BulletSharpPInvoke
10+
pushd ..\..\externals\BulletSharpPInvoke
11+
%GIT_CMD% checkout 0de0f3cd564173474c58d57aad31c8aad82cb99d
12+
popd
1013
if NOT ERRORLEVEL 0 pause
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:e13c24c8b16368ecb8dcf0265425ee8f1c70645f756974feb89872935fa8b940
3+
size 1626112

deps/Celt/checkout.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ IF NOT ERRORLEVEL 0 (
33
ECHO "Could not find git.exe"
44
EXIT /B %ERRORLEVEL%
55
)
6-
%GIT_CMD% clone https://git.xiph.org/opus.git -b v1.1.3 ..\..\externals\Celt
6+
%GIT_CMD% clone https://github.com/xiph/opus.git -b v1.1.3 ..\..\externals\Celt
77
if NOT ERRORLEVEL 0 pause

deps/FFmpeg/dotnet/build.sh

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@ configure_windows_x64_shared() {
4444
--prefix="${BASEDIR}/build/windows/x64"
4545
}
4646

47+
configure_windows_arm64_shared() {
48+
"${BASEDIR}/configure" \
49+
--toolchain=msvc \
50+
--arch=arm64 \
51+
--enable-asm \
52+
--enable-shared \
53+
--enable-version3 \
54+
--enable-w32threads \
55+
--enable-yasm \
56+
--disable-debug \
57+
--disable-doc \
58+
--disable-programs \
59+
--disable-static \
60+
--disable-x86asm \
61+
--target-os=win64 \
62+
--prefix="${BASEDIR}/build/windows/arm64"
63+
}
64+
4765
configure_windows_x86_shared() {
4866
"${BASEDIR}/configure" \
4967
--toolchain=msvc \
@@ -99,6 +117,26 @@ configure_windows_x64_exe() {
99117
--prefix="${BASEDIR}/build/windows/x64"
100118
}
101119

120+
configure_windows_arm64_exe() {
121+
"${BASEDIR}/configure" \
122+
--toolchain=msvc \
123+
--arch=arm64 \
124+
--enable-asm \
125+
--enable-static \
126+
--enable-version3 \
127+
--enable-w32threads \
128+
--enable-yasm \
129+
--disable-debug \
130+
--disable-doc \
131+
--disable-ffplay \
132+
--disable-ffprobe \
133+
--disable-ffserver \
134+
--disable-shared \
135+
--disable-x86asm \
136+
--target-os=win64 \
137+
--prefix="${BASEDIR}/build/windows/arm64"
138+
}
139+
102140
install() {
103141
make -j${NUMBER_OF_CORES} && make install
104142
}
@@ -118,6 +156,21 @@ build_windows_x64_shared() {
118156
popd
119157
}
120158

159+
build_windows_arm64_shared() {
160+
oot="${BASEDIR}/build/windows/arm64/oot/ffmpeg"
161+
mkdir -p "$oot"
162+
pushd "$oot"
163+
164+
# Configure ffmpeg (can be skipped if already done)
165+
configure_windows_arm64_shared
166+
# Make sure any previous build doesn't pollute the current one (can be skipped if configure didn't change since last time)
167+
clean
168+
# Build FFmpeg and copy binaries+include files into the installation folder (defined by --prefix in the configure command)
169+
install
170+
171+
popd
172+
}
173+
121174
build_windows_x86_shared() {
122175
oot="${BASEDIR}/build/windows/x86/oot/ffmpeg"
123176
mkdir -p "$oot"
@@ -148,6 +201,21 @@ build_windows_x64_exe() {
148201
popd
149202
}
150203

204+
build_windows_arm64_exe() {
205+
oot="${BASEDIR}/build/windows/arm64/oot/ffmpeg"
206+
mkdir -p "$oot"
207+
pushd "$oot"
208+
209+
# Configure ffmpeg (can be skipped if already done)
210+
configure_windows_arm64_exe
211+
# Make sure any previous build doesn't pollute the current one (can be skipped if configure didn't change since last time)
212+
clean
213+
# Build FFmpeg and copy binaries+include files into the installation folder (defined by --prefix in the configure command)
214+
install
215+
216+
popd
217+
}
218+
151219
build_windows_x86_exe() {
152220
oot="${BASEDIR}/build/windows/x86/oot/ffmpeg"
153221
mkdir -p "$oot"
@@ -171,3 +239,4 @@ NUMBER_OF_CORES=$(nproc)
171239
build_windows_x86_shared
172240
#build_windows_x64_exe
173241
#build_windows_x86_exe
242+
#build_windows_arm64_exe
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:7f69cd8022a13a8be34f01506e10b9bbf92f0bb04d6eb71a662267b47c54351d
3+
size 9722880
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:9e8c57dcd4b5e3cb81b035597424c800fb44f52607af295ac487728888f6c040
3+
size 204800
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:a7f4842a8224747bbaff9a5e0d5b2e191f4c7d2085099cd6d5b56ace545ad7ea
3+
size 1856512
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:3725c5ed89c43e6cf1060a413773644eaf78a5c2efacf7e8f9413f994c62e33d
3+
size 2210816
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:b434850920c56ed34c9047f0f904d7dc8673ba580de40bc601f7df28b88b1255
3+
size 623616
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:fcf2ea93ba2a06818955cf2cd7880c5771f147f885a10b64aa72410e98b58525
3+
size 186880

0 commit comments

Comments
 (0)