Build for Apple Silicon using the test SDK build from NWjs.

This commit is contained in:
Dave Page 2023-05-25 15:42:42 +01:00
parent cb070fc365
commit 7d068130a4

View File

@ -30,6 +30,16 @@ _build_runtime() {
# NOTE: The nw download servers seem to be very unreliable, so at the moment we're using wget
# in a retry loop as Yarn/Npm don't seem to like that.
# Temporarily handle arm64 builds (Apple Silicon) differently, until NWjs produces an actual release
if [ "$(uname -m)" == "arm64" ]; then
pushd "${BUILD_ROOT}" > /dev/null || exit
wget https://dl.nwjs.io/live-build/nw76/20230516-150708/a88c13a6c/v0.76.1/nwjs-sdk-v0.76.1-osx-arm64.zip
unzip "nwjs-sdk-v0.76.1-osx-arm64.zip"
popd > /dev/null || exit
cp -R "${BUILD_ROOT}/nwjs-sdk-v0.76.1-osx-arm64"/nwjs.app "${BUILD_ROOT}/"
else
# YARN:
# yarn add --cwd "${BUILDROOT}" nw
# YARN END
@ -53,6 +63,7 @@ _build_runtime() {
# WGET:
cp -R "${BUILD_ROOT}/nwjs-v${NW_VERSION}-osx-x64"/nwjs.app "${BUILD_ROOT}/"
# WGET END
fi
mv "${BUILD_ROOT}/nwjs.app" "${BUNDLE_DIR}"