-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.sh
34 lines (27 loc) · 870 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Build the game
rm -rf engine/build/dependencies/
printf "Building...\n\n"
FOLDER="release"
VERSION="0.1.5"
if [ "$#" -lt 1 ]; then
gradle :studio:build :engine:build :engine:copyRuntimeLibs
else
FOLDER="release-$1"
gradle :studio:build :engine:build :engine:copyRuntimeLibs -Pos="$1"
fi
# Copy assets
printf "\nCopying assets..."
mkdir -p "$FOLDER"
cp -r extra/game/ "$FOLDER/game/"
cp studio/build/libs/launcher.jar "$FOLDER/"
cp -r engine/build/dependencies/ "$FOLDER/dependencies/"
cp engine/build/libs/bbs-engine-0.1.jar "$FOLDER/dependencies/"
cp -r licenses/ "$FOLDER/licenses/"
if [ "$1" == "windows" ] || [ "$1" == "windows-x86" ] || [ "$1" == "windows-arm64" ]; then
cp extra/launch.bat "$FOLDER/launch.bat"
else
cp extra/launch.sh "$FOLDER/launch.sh"
fi
mkdir -p "zips"
zip -r "zips/bbs-$FOLDER-$VERSION.zip" "$FOLDER/"