2019-02-28 13:56:54 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-04 11:01:38 +00:00
|
|
|
set -e
|
|
|
|
|
2019-02-28 13:56:54 +00:00
|
|
|
cd $(dirname "${BASH_SOURCE[0]}")/..
|
|
|
|
mkdir -p cutter-deps && cd cutter-deps
|
|
|
|
|
2024-07-26 18:53:32 +00:00
|
|
|
DEPS_BASE_URL=https://github.com/rizinorg/cutter-deps/releases/download/v16
|
|
|
|
|
|
|
|
if [ "$CUTTER_QT" == "5" ]; then
|
|
|
|
DEPS_FILE_linux_x86_64=cutter-deps-linux-x86_64.tar.gz
|
|
|
|
DEPS_SHA256_linux_x86_64=0721c85548bbcf31f6911cdb2227e5efb4a20c34262672d4cd2193db166b2f8c
|
|
|
|
DEPS_BASE_URL=https://github.com/rizinorg/cutter-deps/releases/download/v15
|
|
|
|
else
|
|
|
|
DEPS_FILE_linux_x86_64=cutter-deps-linux-x86_64.tar.gz
|
|
|
|
DEPS_SHA256_linux_x86_64=f63c5af2d9872bc6538a94c839d6ef6645c7630c42cff30f1d9da8eefd9eb040
|
|
|
|
fi
|
|
|
|
echo $DEPS_SHA256_linux_x86_64
|
2022-07-04 11:01:38 +00:00
|
|
|
|
|
|
|
DEPS_FILE_macos_x86_64=cutter-deps-macos-x86_64.tar.gz
|
2024-07-26 18:53:32 +00:00
|
|
|
DEPS_SHA256_macos_x86_64=bcdc214e34dc3fd720327ad42e03fe3ec996ca28a9987e99898f149a65299a8c
|
2022-07-04 11:01:38 +00:00
|
|
|
|
|
|
|
DEPS_FILE_macos_arm64=cutter-deps-macos-arm64.tar.gz
|
2024-07-26 18:53:32 +00:00
|
|
|
DEPS_SHA256_macos_arm64=aa3f5ae91b93c5176d6bd4313af0888a2b6dcdaa2ef1750dd7e2f98156882e0f
|
2019-03-08 23:01:24 +00:00
|
|
|
|
2022-07-04 11:01:38 +00:00
|
|
|
DEPS_FILE_win_x86_64=cutter-deps-win-x86_64.tar.gz
|
2024-07-26 18:53:32 +00:00
|
|
|
DEPS_SHA256_win_x86_64=710e40cf8329205d09535cc56a9fb155a56ff1a1ca112145864382fb3d4e8160
|
2019-03-16 10:35:31 +00:00
|
|
|
|
|
|
|
|
2022-07-04 11:01:38 +00:00
|
|
|
ARCH=x86_64
|
2019-03-16 10:35:31 +00:00
|
|
|
if [ "$OS" == "Windows_NT" ]; then
|
2022-07-04 11:01:38 +00:00
|
|
|
PLATFORM=win
|
2019-03-08 23:01:24 +00:00
|
|
|
else
|
2019-03-16 10:35:31 +00:00
|
|
|
UNAME_S="$(uname -s)"
|
|
|
|
if [ "$UNAME_S" == "Linux" ]; then
|
2022-07-04 11:01:38 +00:00
|
|
|
PLATFORM=linux
|
2019-03-16 10:35:31 +00:00
|
|
|
elif [ "$UNAME_S" == "Darwin" ]; then
|
2022-07-04 11:01:38 +00:00
|
|
|
PLATFORM=macos
|
|
|
|
ARCH=$(uname -m)
|
2019-03-16 10:35:31 +00:00
|
|
|
else
|
|
|
|
echo "Unsupported Platform: uname -s => $UNAME_S, \$OS => $OS"
|
|
|
|
exit 1
|
|
|
|
fi
|
2019-03-08 23:01:24 +00:00
|
|
|
fi
|
2019-02-28 13:56:54 +00:00
|
|
|
|
2022-07-04 11:01:38 +00:00
|
|
|
DEPS_FILE=DEPS_FILE_${PLATFORM}_${ARCH}
|
|
|
|
DEPS_FILE=${!DEPS_FILE}
|
|
|
|
DEPS_SHA256=DEPS_SHA256_${PLATFORM}_${ARCH}
|
|
|
|
DEPS_SHA256=${!DEPS_SHA256}
|
|
|
|
DEPS_URL=${DEPS_BASE_URL}/${DEPS_FILE}
|
2019-03-08 23:01:24 +00:00
|
|
|
|
2022-07-04 11:01:38 +00:00
|
|
|
SHA256SUM=sha256sum
|
|
|
|
if ! command -v ${SHA256SUM} &> /dev/null; then
|
|
|
|
SHA256SUM="shasum -a 256"
|
2019-03-08 23:01:24 +00:00
|
|
|
fi
|
|
|
|
|
2022-07-04 11:01:38 +00:00
|
|
|
curl -L "$DEPS_URL" -o "$DEPS_FILE" || exit 1
|
|
|
|
echo "$DEPS_SHA256 $DEPS_FILE" | ${SHA256SUM} -c - || exit 1
|
|
|
|
|
|
|
|
tar -xf "$DEPS_FILE" || exit 1
|
2019-03-16 10:35:31 +00:00
|
|
|
|
|
|
|
if [ -f relocate.sh ]; then
|
|
|
|
./relocate.sh || exit 1
|
|
|
|
fi
|
2019-02-28 13:56:54 +00:00
|
|
|
|