From fb9902da44ab293e0938d9419338d38cd882c598 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 28 Feb 2020 19:10:37 +0100 Subject: [PATCH] Add compile script --- .gitignore | 2 ++ compile.sh | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 compile.sh diff --git a/.gitignore b/.gitignore index 227c3ec..5217bcf 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ image.png /maps/ /assets/ out/ + +TheGame.jar diff --git a/compile.sh b/compile.sh new file mode 100755 index 0000000..a9c58ab --- /dev/null +++ b/compile.sh @@ -0,0 +1,24 @@ +#!/bin/bash +chmod +x lib/*.jar +rm -rf tmp +mkdir tmp +javac -cp src/main/java:lib/gson-2.8.6.jar:lib/jopt-simple-6.0-alpha-3.jar \ + -target 1.9 -source 1.9 \ + -d tmp --module-path src/main/java \ + src/main/java/fr/ynerant/leveleditor/api/editor/*.java \ + src/main/java/fr/ynerant/leveleditor/client/main/*.java \ + src/main/java/fr/ynerant/leveleditor/editor/*.java \ + src/main/java/fr/ynerant/leveleditor/frame/*.java \ + src/main/java/fr/ynerant/leveleditor/game/*.java \ + src/main/java/fr/ynerant/leveleditor/game/mobs/*.java \ + src/main/java/fr/ynerant/leveleditor/game/towers/*.java +cp -r src/main/resources/* tmp/ +unzip lib/gson-2.8.6.jar -x META-INF/MANIFEST.MF -d tmp +unzip lib/jopt-simple-6.0-alpha-3.jar -x META-INF/MANIFEST.MF -d tmp +cd tmp +zip -r TheGame.jar * +mv TheGame.jar ../ +cd .. +rm -rf tmp +chmod +x TheGame.jar +echo "Successfully compiled to \"TheGame.jar\". To run: \"java -jar TheGame.jar\"".