From f1029c11fd2d0641b7be19cd752f30795be8e0fa Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Mon, 13 Jun 2022 02:02:33 -0500 Subject: [PATCH] Update SigScript Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 --- Java/scripts/build2.sh | 4 ++-- Java/scripts/filelist | 2 ++ Java/scripts/jar.sh | 2 +- Java/scripts/jar2.sh | 17 +++++++++++++++++ Java/scripts/md5 | 14 ++++++++------ sig | 2 +- utils/filelist | 2 +- utils/md5 | 8 ++++---- 8 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 Java/scripts/jar2.sh diff --git a/Java/scripts/build2.sh b/Java/scripts/build2.sh index caa432e..bbcced0 100644 --- a/Java/scripts/build2.sh +++ b/Java/scripts/build2.sh @@ -1,7 +1,7 @@ -#Builds and runs the project. +#Builds and runs the project for Windows. #Java source ${LANGUAGE}/scripts/version_info -javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp ${CLASS_PATH2} -d ${OUT_DIR} ${PROJECT_DIR}/*.java +javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp ${CLASS_PATH_WINDOWS} -d ${OUT_DIR} ${PROJECT_DIR}/*.java printf "\n\n\nRunning Program...\n\n" ORIGINAL_LOC=$(pwd) cd $OUT_DIR diff --git a/Java/scripts/filelist b/Java/scripts/filelist index 455d98e..d2575bb 100644 --- a/Java/scripts/filelist +++ b/Java/scripts/filelist @@ -1,6 +1,8 @@ +build2.sh build.sh clean.sh commit.sh +jar2.sh jar.sh release.sh update.sh diff --git a/Java/scripts/jar.sh b/Java/scripts/jar.sh index e9904f9..61d1759 100755 --- a/Java/scripts/jar.sh +++ b/Java/scripts/jar.sh @@ -13,5 +13,5 @@ jar cfm ${PROJECT_NAME}.jar ${ORIGINAL_LOC}/manifest sig jar uf ${PROJECT_NAME}.jar -C ../lib/bin/ . printf "\n\n\nRunning Program...\n\n" java ${CUSTOM_PARAMS} -cp .:../lib/bin -Djava.library.path="${LIBRARY_PATH}" -jar ${PROJECT_NAME}.jar "$@" -./${LANGUAGE}/scripts/clean.sh +${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh cd .. diff --git a/Java/scripts/jar2.sh b/Java/scripts/jar2.sh new file mode 100644 index 0000000..9167bb8 --- /dev/null +++ b/Java/scripts/jar2.sh @@ -0,0 +1,17 @@ +#Builds a runnable jar file using ${MAIN_CLASS} as an entry point and then runs the newly generated jar for Windows. +#Java +source ${LANGUAGE}/scripts/version_info +rm -Rf bin/* +javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp ${CLASS_PATH_WINDOWS} -d ${OUT_DIR} ${PROJECT_DIR}/${PROJECT_NAME}.java +printf "\n\n\nGenerating Manifest...\n\n" +touch manifest +echo "Main-Class: ${MAIN_CLASS}" > manifest +printf "\n\n\nCreating Jar...\n\n" +ORIGINAL_LOC=$(pwd) +cd ${OUT_DIR} +jar cfm ${PROJECT_NAME}.jar ${ORIGINAL_LOC}/manifest sig +jar uf ${PROJECT_NAME}.jar -C ../lib/bin/ . +printf "\n\n\nRunning Program...\n\n" +java ${CUSTOM_PARAMS} -cp .;../lib/bin "-Djava.library.path=${LIBRARY_PATH}" -jar ${PROJECT_NAME}.jar "$@" +${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh +cd .. diff --git a/Java/scripts/md5 b/Java/scripts/md5 index 7253680..5aca4fd 100644 --- a/Java/scripts/md5 +++ b/Java/scripts/md5 @@ -1,6 +1,8 @@ -build.sh:293285766098a4e3d4d708e58a69de82 *- -clean.sh:668a2f9b568c55f6a044a509315032f6 *- -commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 *- -jar.sh:2f59229fcaf02779bfaa43144f3be66f *- -release.sh:b1b62203411b18d0fec1db3dc2e5a061 *- -update.sh:3be721658983183efa395984acd96b03 *- +build2.sh:8e21e7c419a3c3974ab32902802a8c7a - +build.sh:b247061c83c39b1bb78ac7642534ba2c - +clean.sh:668a2f9b568c55f6a044a509315032f6 - +commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 - +jar2.sh:7977fc138ee5db798d08c34734f0be93 - +jar.sh:821d5a109324d405f05c35c4bb129375 - +release.sh:b1b62203411b18d0fec1db3dc2e5a061 - +update.sh:3be721658983183efa395984acd96b03 - diff --git a/sig b/sig index bdd890d..8707e06 100755 --- a/sig +++ b/sig @@ -1,4 +1,4 @@ -export AUTO_UPDATE=false +export AUTO_UPDATE=true source utils/define.sh diff --git a/utils/filelist b/utils/filelist index 8a9f471..95ad5ff 100644 --- a/utils/filelist +++ b/utils/filelist @@ -1,5 +1,5 @@ .coauthors -.updateDirectories define.sh main.sh search.sh +.updateDirectories diff --git a/utils/md5 b/utils/md5 index 3ffd1ab..baa339d 100644 --- a/utils/md5 +++ b/utils/md5 @@ -1,4 +1,4 @@ -.updateDirectories:0ede00461e947494545e694040787b3f *- -define.sh:3ecab0dffe2adfb950f3eb7c7061b750 *- -main.sh:d3d1bd0b56d8114eb7479964227f8576 *- -search.sh:81d08f5ff48e8a44b5f68387d426da05 *- +define.sh:3ecab0dffe2adfb950f3eb7c7061b750 - +main.sh:d3d1bd0b56d8114eb7479964227f8576 - +search.sh:81d08f5ff48e8a44b5f68387d426da05 - +.updateDirectories:0ede00461e947494545e694040787b3f -