contrib: make the Xcode archive configurable for MacOS builds
This commit is contained in:
parent
471ecd296e
commit
1a1e0c245f
@ -5,6 +5,8 @@ set -ex
|
||||
TARGET_DIR="${TARGET_DIR:-"$PWD/deter_build_target"}"
|
||||
|
||||
XCODE_PATH="${XCODE_PATH:-"$PWD/Xcode_12.2.xip"}"
|
||||
XCODE_FILENAME="$(basename $XCODE_PATH)"
|
||||
XCODE_SHASUM="28d352f8c14a43d9b8a082ac6338dc173cb153f964c6e8fb6ba389e5be528bd0"
|
||||
|
||||
# Build (only) the Liana GUI on Windows.
|
||||
docker build . -t liana_cross_win -f contrib/reproducible/docker/windows.Dockerfile
|
||||
@ -22,14 +24,14 @@ docker run --rm -ti \
|
||||
|
||||
|
||||
# Sanity check the given MacOS SDK is the expected one.
|
||||
if ! $(echo "28d352f8c14a43d9b8a082ac6338dc173cb153f964c6e8fb6ba389e5be528bd0 $(basename $XCODE_PATH)" | sha256sum -c --status); then
|
||||
echo "No or invalid Xcode SDK found. Need an Xcode_12.2.xip. You can configure the path using \$XCODE_PATH.";
|
||||
if ! $(echo "$XCODE_SHASUM $(basename $XCODE_PATH)" | sha256sum -c --status); then
|
||||
echo "No or invalid Xcode SDK found. Need an Xcode_X.Y.xip archive whose hash is $XCODE_SHASUM. You can configure the path using \$XCODE_PATH.";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Build both the Liana daemon and GUI on MacOS.
|
||||
docker build . -t liana_cross_mac -f contrib/reproducible/docker/macos.Dockerfile
|
||||
docker run --rm -ti \
|
||||
docker run -ti \
|
||||
-v "$TARGET_DIR":/liana/target \
|
||||
-v "$TARGET_DIR/gui":/liana/gui/target \
|
||||
-v "$PWD/contrib/reproducible/docker":/liana/docker \
|
||||
@ -43,7 +45,8 @@ docker run --rm -ti \
|
||||
-v "$PWD/gui/ui/Cargo.lock":/liana/gui/ui/Cargo.lock \
|
||||
-v "$PWD/gui/ui/src":/liana/gui/ui/src \
|
||||
-v "$PWD/gui/ui/static":/liana/gui/ui/static \
|
||||
-v "$XCODE_PATH":/liana/Xcode_12.2.xip \
|
||||
-v "$XCODE_PATH":"/liana/$XCODE_FILENAME" \
|
||||
-e XCODE_PATH="/liana/$XCODE_FILENAME" \
|
||||
liana_cross_mac
|
||||
|
||||
set +ex
|
||||
|
||||
@ -6,8 +6,10 @@
|
||||
|
||||
set -xe
|
||||
|
||||
# Build the SDK and the toolchain using osxcross. It is expected to be located at /liana/Xcode_12.2.xip.
|
||||
# It's not part of the image to be able to share the Xcode_12.2.xip instead of copying it in the Docker context
|
||||
test -f "$XCODE_PATH" || exit 1
|
||||
|
||||
# Build the SDK and the toolchain using osxcross. It is expected to be located at $XCODE_PATH
|
||||
# It's not part of the image to be able to share the $XCODE_PATH instead of copying it in the Docker context
|
||||
# and then to the image.
|
||||
git clone https://github.com/darosior/osxcross -b dependencies_pinning
|
||||
cd osxcross
|
||||
@ -15,8 +17,8 @@ git checkout 50e86ebca7d14372febd0af8cd098705049161b9
|
||||
DARLING_DMG_REVISION=241238313a47d3cf6427ac5a75b7a0311a3a4cb4 \
|
||||
P7ZIP_REVISION=2f60a51ac3aa2507d36df3c4f58f71a3716b1357 \
|
||||
PBZX_REVISION=2a4d7c3300c826d918def713a24d25c237c8ed53 \
|
||||
XAR_REVISION=c2111a9a9cabc50d2b9c604aff41a481ae3f1989 ./tools/gen_sdk_package_pbzx.sh ../Xcode_12.2.xip
|
||||
mv MacOSX11.0.sdk.tar.xz tarballs/
|
||||
XAR_REVISION=c2111a9a9cabc50d2b9c604aff41a481ae3f1989 ./tools/gen_sdk_package_pbzx.sh "$XCODE_PATH"
|
||||
mv MacOSX* tarballs/
|
||||
DARLING_DMG_REVISION=241238313a47d3cf6427ac5a75b7a0311a3a4cb4 \
|
||||
P7ZIP_REVISION=2f60a51ac3aa2507d36df3c4f58f71a3716b1357 \
|
||||
PBZX_REVISION=2a4d7c3300c826d918def713a24d25c237c8ed53 \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user