diff --git a/Java/scripts/build.sh b/Java/scripts/build.sh index 540c54f..e176940 100755 --- a/Java/scripts/build.sh +++ b/Java/scripts/build.sh @@ -5,5 +5,5 @@ javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp $ printf "\n\n\nRunning Program...\n\n" ORIGINAL_LOC=$(pwd) cd $OUT_DIR -java ${CUSTOM_PARAMS} -cp .:../lib/bin -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@" +java ${CUSTOM_PARAMS} -cp .:../lib/bin/ -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@" ${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh \ No newline at end of file diff --git a/Java/scripts/build2.sh b/Java/scripts/build2.sh new file mode 100644 index 0000000..cf9cb33 --- /dev/null +++ b/Java/scripts/build2.sh @@ -0,0 +1,9 @@ +#Builds and runs the project. +#Java +source ${LANGUAGE}/scripts/version_info +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 +java ${CUSTOM_PARAMS} -cp ".;../lib/bin/ " "-Djava.library.path=${LIBRARY_PATH}" ${MAIN_CLASS} "$@" +${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh \ No newline at end of file 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 100755 index 0000000..0930c16 --- /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. +#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 7439c4b..ac2107f 100644 --- a/Java/scripts/md5 +++ b/Java/scripts/md5 @@ -1,6 +1,8 @@ -build.sh:293285766098a4e3d4d708e58a69de82 - +build2.sh:02631fbd1ba6cd4f3a3767184bee7e19 - +build.sh:b247061c83c39b1bb78ac7642534ba2c - clean.sh:668a2f9b568c55f6a044a509315032f6 - commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 - -jar.sh:2f59229fcaf02779bfaa43144f3be66f - +jar2.sh:1a50fbf1ca23a0595349f923d4548a70 - +jar.sh:821d5a109324d405f05c35c4bb129375 - release.sh:b1b62203411b18d0fec1db3dc2e5a061 - update.sh:3be721658983183efa395984acd96b03 - diff --git a/sig b/sig index 18ef736..5e2514a 100755 --- a/sig +++ b/sig @@ -8,6 +8,7 @@ define MAIN_CLASS "sig.${PROJECT_NAME}" define OUT_DIR "bin" define LIBRARY_PATH "../lib" define CLASS_PATH "${PROJECT_DIR}/..:lib/bin" +define CLASS_PATH_WINDOWS "${PROJECT_DIR}/..;lib/bin" define CUSTOM_PARAMS "" define LANGUAGE ""