2020-07-15 20:49:36 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# SCRIPT HEADER start
|
|
|
|
basedir=$1
|
|
|
|
source "$basedir/scripts/functions.sh"
|
|
|
|
echo " "
|
|
|
|
echo "----------------------------------------"
|
|
|
|
echo " $(bashcolor 1 32)Task$(bashcolorend) - Install Launcher"
|
|
|
|
echo " This will build a launcher that similar to Paperclip by the server jar."
|
|
|
|
echo " "
|
|
|
|
echo "----------------------------------------"
|
|
|
|
# SCRIPT HEADER end
|
|
|
|
|
|
|
|
# Copied from https://github.com/PaperMC/Paper/blob/d54ce6c17fb7a35238d6b9f734d30a4289886773/scripts/paperclip.sh
|
|
|
|
# License from Paper applies to this file
|
|
|
|
|
|
|
|
set -e
|
|
|
|
paperworkdir="$basedir/Tuinity/Paper/work"
|
|
|
|
mcver=$(cat "$paperworkdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
2020-08-03 18:48:42 +02:00
|
|
|
serverjar="$basedir/Yatopia-Server/target/yatopia-$mcver.jar"
|
2020-07-15 20:49:36 +02:00
|
|
|
vanillajar="$paperworkdir/Minecraft/$mcver/$mcver.jar"
|
|
|
|
|
|
|
|
(
|
2020-09-02 11:45:06 +02:00
|
|
|
cd "$paperworkdir/Paperclip"
|
|
|
|
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$serverjar" "-Dvanillajar=$vanillajar"
|
2020-07-15 20:49:36 +02:00
|
|
|
)
|
|
|
|
mkdir -p "$basedir/target"
|
2020-08-01 18:14:57 +02:00
|
|
|
cp "$paperworkdir/Paperclip/assembly/target/paperclip-${mcver}.jar" "$basedir/yatopia-${mcver}-paperclip.jar"
|
2020-07-15 20:49:36 +02:00
|
|
|
|
|
|
|
echo ""
|
2020-08-01 18:14:57 +02:00
|
|
|
echo " $(bashcolor 1 32)Success$(bashcolorend) - Saved launcher jar to target/yatopia-${mcver}-launcher.jar"
|