mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Use the release build of NWJS for Apple Silicon
This commit is contained in:
@@ -30,17 +30,12 @@ _build_runtime() {
|
|||||||
# NOTE: The nw download servers seem to be very unreliable, so at the moment we're using wget
|
# 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.
|
# 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
|
# uname -m returns "x86_64" on Intel, but we need "x64"
|
||||||
|
NW_ARCH="x64"
|
||||||
if [ "$(uname -m)" == "arm64" ]; then
|
if [ "$(uname -m)" == "arm64" ]; then
|
||||||
pushd "${BUILD_ROOT}" > /dev/null || exit
|
NW_ARCH="arm64"
|
||||||
wget https://dl.nwjs.io/live-build/nw76/20230516-150708/a88c13a6c/v0.76.1/nwjs-sdk-v0.76.1-osx-arm64.zip
|
fi
|
||||||
unzip "nwjs-sdk-v0.76.1-osx-arm64.zip"
|
|
||||||
popd > /dev/null || exit
|
|
||||||
|
|
||||||
xattr -r -d com.apple.quarantine "${BUILD_ROOT}/nwjs-sdk-v0.76.1-osx-arm64"/nwjs.app
|
|
||||||
cp -R "${BUILD_ROOT}/nwjs-sdk-v0.76.1-osx-arm64"/nwjs.app "${BUILD_ROOT}/"
|
|
||||||
else
|
|
||||||
# YARN:
|
# YARN:
|
||||||
# yarn add --cwd "${BUILDROOT}" nw
|
# yarn add --cwd "${BUILDROOT}" nw
|
||||||
# YARN END
|
# YARN END
|
||||||
@@ -50,10 +45,10 @@ _build_runtime() {
|
|||||||
|
|
||||||
pushd "${BUILD_ROOT}" > /dev/null || exit
|
pushd "${BUILD_ROOT}" > /dev/null || exit
|
||||||
while true;do
|
while true;do
|
||||||
wget "https://dl.nwjs.io/v${NW_VERSION}/nwjs-v${NW_VERSION}-osx-x64.zip" && break
|
wget "https://dl.nwjs.io/v${NW_VERSION}/nwjs-v${NW_VERSION}-osx-${NW_ARCH}.zip" && break
|
||||||
rm "nwjs-v${NW_VERSION}-osx-x64.zip"
|
rm "nwjs-v${NW_VERSION}-osx-${NW_ARCH}.zip"
|
||||||
done
|
done
|
||||||
unzip "nwjs-v${NW_VERSION}-osx-x64.zip"
|
unzip "nwjs-v${NW_VERSION}-osx-${NW_ARCH}.zip"
|
||||||
popd > /dev/null || exit
|
popd > /dev/null || exit
|
||||||
# WGET END
|
# WGET END
|
||||||
|
|
||||||
@@ -62,9 +57,8 @@ _build_runtime() {
|
|||||||
# YARN END
|
# YARN END
|
||||||
|
|
||||||
# WGET:
|
# WGET:
|
||||||
cp -R "${BUILD_ROOT}/nwjs-v${NW_VERSION}-osx-x64"/nwjs.app "${BUILD_ROOT}/"
|
cp -R "${BUILD_ROOT}/nwjs-v${NW_VERSION}-osx-${NW_ARCH}"/nwjs.app "${BUILD_ROOT}/"
|
||||||
# WGET END
|
# WGET END
|
||||||
fi
|
|
||||||
|
|
||||||
mv "${BUILD_ROOT}/nwjs.app" "${BUNDLE_DIR}"
|
mv "${BUILD_ROOT}/nwjs.app" "${BUNDLE_DIR}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user