From 6258a2666ac432dfae78e69f19bc871b056fbb01 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Wed, 15 Jun 2022 14:20:19 +0000 Subject: [PATCH] Move release to zip and make release for actual installers Co-authored-by: sigonasr2 --- Java/scripts/filelist | 1 + Java/scripts/md5 | 3 ++- Java/scripts/release.sh | 28 ++++++++++++++++------------ Java/scripts/zip.sh | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 Java/scripts/zip.sh diff --git a/Java/scripts/filelist b/Java/scripts/filelist index d2575bb..9e5004d 100644 --- a/Java/scripts/filelist +++ b/Java/scripts/filelist @@ -7,3 +7,4 @@ jar.sh release.sh update.sh version_info +zip.sh diff --git a/Java/scripts/md5 b/Java/scripts/md5 index 72ae9a9..5168b8b 100644 --- a/Java/scripts/md5 +++ b/Java/scripts/md5 @@ -4,5 +4,6 @@ clean.sh:668a2f9b568c55f6a044a509315032f6 - commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 - jar2.sh:7977fc138ee5db798d08c34734f0be93 - jar.sh:821d5a109324d405f05c35c4bb129375 - -release.sh:b1b62203411b18d0fec1db3dc2e5a061 - +release.sh:33ea22e29252fae1c750d534dbf4b0aa - update.sh:3be721658983183efa395984acd96b03 - +zip.sh:273f5a83b80a8e54022d60514dfeec0a - diff --git a/Java/scripts/release.sh b/Java/scripts/release.sh index 0f7389c..fe7ad87 100644 --- a/Java/scripts/release.sh +++ b/Java/scripts/release.sh @@ -1,14 +1,18 @@ -#Creates a zip file containing all project contents. +#Use ./sig package to create a custom installer based on OS. #Java source ${LANGUAGE}/scripts/version_info -TARGET_FILE="${PROJECT_NAME}_${RELEASE_VERSION}.zip" -FILES=$(cat ${LANGUAGE}/scripts/.package.files) -echo "Creating Package $TARGET_FILE..." -for f in $FILES -do - zip -ur $TARGET_FILE $f -done -echo "Complete!" -echo "" -echo "" -echo "" \ No newline at end of file +if [ "$1" = "windows" ];then + echo "Creating a package for Windows..." + echo "Not implemented yet." +elif [ "$1" = "mac" ];then + echo "Creating a package for Mac..." + echo "Not implemented yet." +elif [ "$1" = "linux" ];then + echo "Creating a package for Linux..." + cd .. + jpackage --input RabiClone --main-jar bin/RabiClone.jar --main-class sig.RabiClone --type app-image --dest RabiCloneOut + cp -R RabiCloneOut/RabiClone/lib/app/* RabiCloneOut/RabiClone + jpackage --app-image RabiCloneOut/RabiClone --name RabiClone + cd RabiClone + echo "Done!" +fi \ No newline at end of file diff --git a/Java/scripts/zip.sh b/Java/scripts/zip.sh new file mode 100644 index 0000000..4de5b1a --- /dev/null +++ b/Java/scripts/zip.sh @@ -0,0 +1,14 @@ +#Create a zip folder containing all dependencies. For quick release. +#Java +source ${LANGUAGE}/scripts/version_info +TARGET_FILE="${PROJECT_NAME}_${RELEASE_VERSION}.zip" +FILES=$(cat ${LANGUAGE}/scripts/.package.files) +echo "Creating Package $TARGET_FILE..." +for f in $FILES +do + zip -ur $TARGET_FILE $f +done +echo "Complete!" +echo "" +echo "" +echo "" \ No newline at end of file