Merge branch 'Emotional_DMG' into 'master'
Add DMG wrapping to CI See merge request sheepitrenderfarm/client!141
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -4,3 +4,5 @@
|
|||||||
*.png binary
|
*.png binary
|
||||||
*.sfx binary
|
*.sfx binary
|
||||||
*.zip binary
|
*.zip binary
|
||||||
|
*.tar binary
|
||||||
|
*.gz binary
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ test:
|
|||||||
script:
|
script:
|
||||||
- ./gradlew check
|
- ./gradlew check
|
||||||
|
|
||||||
wrap-client:
|
exe-wrap:
|
||||||
stage: wrap
|
stage: wrap
|
||||||
image: debian:stable-slim
|
image: debian:stable-slim
|
||||||
variables:
|
variables:
|
||||||
@@ -52,3 +52,31 @@ wrap-client:
|
|||||||
paths:
|
paths:
|
||||||
- ./sheepit-wrapper.exe
|
- ./sheepit-wrapper.exe
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
|
||||||
|
dmg-x64-wrap:
|
||||||
|
stage: wrap
|
||||||
|
image: debian:stable-slim
|
||||||
|
variables:
|
||||||
|
ARCH: "Intel-x64"
|
||||||
|
JRETAR: "OpenJDK11U-jre_x64_mac_hotspot_11.0.15_10.tar.gz" # Taken from https://adoptium.net/releases.html?variant=openjdk11&jvmVariant=hotspot
|
||||||
|
script:
|
||||||
|
- dmg-wrapper/ci-build-dmg.sh $ARCH $JRETAR
|
||||||
|
artifacts:
|
||||||
|
name: "$CI_COMMIT_REF_NAME-sheepit-artifact-$ARCH-dmg"
|
||||||
|
paths:
|
||||||
|
- ./dmg-wrapper/SheepIt-$ARCH.dmg
|
||||||
|
expire_in: 1 week
|
||||||
|
|
||||||
|
dmg-arm-wrap:
|
||||||
|
stage: wrap
|
||||||
|
image: debian:stable-slim
|
||||||
|
variables:
|
||||||
|
ARCH: "Apple-ARM"
|
||||||
|
JRETAR: "OpenJDK17U-jre_aarch64_mac_hotspot_17.0.2_8.tar.gz" # Taken from https://adoptium.net/de/temurin/releases/?variant=openjdk17&jvmVariant=hotspot
|
||||||
|
script:
|
||||||
|
- dmg-wrapper/ci-build-dmg.sh $ARCH $JRETAR
|
||||||
|
artifacts:
|
||||||
|
name: "$CI_COMMIT_REF_NAME-sheepit-artifact-$ARCH-dmg"
|
||||||
|
paths:
|
||||||
|
- ./dmg-wrapper/SheepIt-$ARCH.dmg
|
||||||
|
expire_in: 1 week
|
||||||
|
|||||||
BIN
dmg-wrapper/OpenJDK11U-jre_x64_mac_hotspot_11.0.15_10.tar.gz
Normal file
BIN
dmg-wrapper/OpenJDK11U-jre_x64_mac_hotspot_11.0.15_10.tar.gz
Normal file
Binary file not shown.
BIN
dmg-wrapper/OpenJDK17U-jre_aarch64_mac_hotspot_17.0.2_8.tar.gz
Normal file
BIN
dmg-wrapper/OpenJDK17U-jre_aarch64_mac_hotspot_17.0.2_8.tar.gz
Normal file
Binary file not shown.
11
dmg-wrapper/SheepIt-Run.sh
Executable file
11
dmg-wrapper/SheepIt-Run.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail # Unofficial strict mode, see http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
||||||
|
|
||||||
|
cd "$(dirname "$(readlink -f "$0")")"
|
||||||
|
# see https://stackoverflow.com/questions/3349105/how-can-i-set-the-current-working-directory-to-the-directory-of-the-script-in-ba
|
||||||
|
echo "Please only pin the first window - the launcher to the Dock"
|
||||||
|
echo "============================="
|
||||||
|
echo "Loading and launching SheepIt"
|
||||||
|
nohup "$BIN" -Xdock:icon=./$APP.png -Djna.nosys=true -jar "$JAR" &>/dev/null & disown
|
||||||
|
osascript -e 'tell application "Terminal" to close (every window whose name contains "SheepIt-Run.sh")' &
|
||||||
|
exit 0
|
||||||
BIN
dmg-wrapper/SheepIt.png
Normal file
BIN
dmg-wrapper/SheepIt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
BIN
dmg-wrapper/SheepIt.tar.gz
Normal file
BIN
dmg-wrapper/SheepIt.tar.gz
Normal file
Binary file not shown.
11
dmg-wrapper/build-libdmg-hfsplus.sh
Executable file
11
dmg-wrapper/build-libdmg-hfsplus.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt-get install git cmake build-essential zlib1g-dev
|
||||||
|
|
||||||
|
git clone https://github.com/fanquake/libdmg-hfsplus.git
|
||||||
|
cd libdmg-hfsplus
|
||||||
|
cmake . -B build
|
||||||
|
make -C build/dmg -j8
|
||||||
|
mv build/dmg/dmg ..
|
||||||
|
cd ..
|
||||||
|
rm -rf libdmg-hfsplus/
|
||||||
36
dmg-wrapper/ci-build-dmg.sh
Executable file
36
dmg-wrapper/ci-build-dmg.sh
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail # Unofficial strict mode, see http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
||||||
|
|
||||||
|
cd "$(dirname "$(readlink -f "$0")")"
|
||||||
|
# see https://stackoverflow.com/questions/3349105/how-can-i-set-the-current-working-directory-to-the-directory-of-the-script-in-ba
|
||||||
|
|
||||||
|
ARCH="$1"
|
||||||
|
JRETAR="$2"
|
||||||
|
|
||||||
|
APP="SheepIt"
|
||||||
|
DMG="$APP-$ARCH-raw.dmg"
|
||||||
|
FINAL="$APP-$ARCH.dmg"
|
||||||
|
|
||||||
|
BASE="$(pwd)"
|
||||||
|
BUILD="$BASE/build"
|
||||||
|
RES="$BUILD/SheepIt.app/Contents/Resources"
|
||||||
|
CL="$RES/client"
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --no-install-recommends genisoimage # Add dependencies
|
||||||
|
|
||||||
|
mkdir "$BUILD"
|
||||||
|
tar -axf "$APP.tar.gz" -C "$BUILD" # Extract base file structure + Platypus shell exec shim
|
||||||
|
tar -axf "$BASE/$JRETAR" -C "$RES" # Extracts the JRE into Resources folder
|
||||||
|
|
||||||
|
mkdir -p "$CL"
|
||||||
|
cp ../sheepit-client-all.jar "$CL/$APP.jar" # Copy client artifact to be packaged
|
||||||
|
cp "$BASE/$APP-Run.sh" "$CL"
|
||||||
|
cp "$BASE/$APP.png" "$CL"
|
||||||
|
|
||||||
|
cd "$CL"
|
||||||
|
ln -s "$(find ../ -name java)" $APP # We symlink java to make the title appearing in the dock to read "SheepIt", not "java"
|
||||||
|
cd "$BASE"
|
||||||
|
|
||||||
|
genisoimage -D -V $APP -no-pad -r -apple -o "$DMG" "$BUILD"
|
||||||
|
./dmg "$DMG" "$FINAL" # Use libdmg based dmg tool to compress the dmg (and also make it read-only)
|
||||||
BIN
dmg-wrapper/dmg
Executable file
BIN
dmg-wrapper/dmg
Executable file
Binary file not shown.
Reference in New Issue
Block a user