Merge branch 'wrapper-update-master' into 'master'

Update wrapper
See merge request sheepitrenderfarm/client!119
This commit is contained in:
Sheepit Renderfarm
2022-03-11 14:19:40 +00:00
4 changed files with 44 additions and 2 deletions

2
.gitignore vendored
View File

@@ -2,4 +2,4 @@
.gradle
build
out
exe-wrapper/sheepit-wrapper.exe

13
exe-wrapper/README.md Normal file
View File

@@ -0,0 +1,13 @@
# Exe wrapper
Packs a java runtime, a sheepit-client jar and 7zip mini executable + config into one exe.
## Requirements
Needs `wget`, `7zr`, `unzip` and internet access for the latest sheepit jar
## Wrapping
Simply run `build.sh` and a `sheepit-wrapper.exe` should be built.
For a docker container, take a look into our [tools repository](https://gitlab.com/sheepitrenderfarm/tools/-/tree/master/exe-wrapper).

29
exe-wrapper/build.sh Normal file
View File

@@ -0,0 +1,29 @@
#!/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
# jvm is taken from https://adoptium.net/releases.html?variant=openjdk11&jvmVariant=hotspot
JVM_NAME="jdk-11.0.13+8-jre"
# Creating folder structure
mkdir -p build/jre
# Downloading client to the target directory
wget https://www.sheepit-renderfarm.com/media/applet/client-latest.php -O ./build/jre/sheepit-client.jar
# Unzipping jre
unzip "$JVM_NAME".zip -d ./build/jre/ # Unzip JRE to be packaged
mv ./build/jre/"$JVM_NAME"/* ./build/jre/
rm -d ./build/jre/"$JVM_NAME"
# Compressing app package
cd build/jre
7zr a -mx=9 ../application.7z ./
# Building the exe bundle and cleaning up
cd ../..
cat starter.sfx config.cfg ./build/application.7z > sheepit-wrapper.exe
rm -rf build/application.7z build/jre
echo "Build of sheepit-wrapper.exe successful"