From 06f064d50d085a7dcd1ff51d7664acd659f35ef9 Mon Sep 17 00:00:00 2001 From: Morph21 <38075691+Morph21@users.noreply.github.com> Date: Mon, 16 Dec 2024 18:58:02 +0100 Subject: [PATCH] Added instructions for jar file, changed build scripts --- .gitignore | 1 + build_mercury_with_zip.bat | 11 ++++++++++- just_zip.bat | 28 ++++++++++++++++++++++++++++ release_files/HOW_TO_RUN_JAR.txt | 6 ++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 just_zip.bat create mode 100644 release_files/HOW_TO_RUN_JAR.txt diff --git a/.gitignore b/.gitignore index 26d45673..501fbdc9 100644 --- a/.gitignore +++ b/.gitignore @@ -76,4 +76,5 @@ logs/ release_files/MercuryTrade.* release_files/resources/ release_files/launch4j.log +release_files/lang.zip diff --git a/build_mercury_with_zip.bat b/build_mercury_with_zip.bat index 76d2048e..f67aae33 100644 --- a/build_mercury_with_zip.bat +++ b/build_mercury_with_zip.bat @@ -20,9 +20,11 @@ echo removing old zip files del MercuryTrade.jar.zip del MercuryTrade.exe.zip copy MercuryTrade.jar MercuryTrade +copy HOW_TO_RUN_JAR.txt MercuryTrade call powershell Compress-Archive MercuryTrade MercuryTrade.jar.zip cd MercuryTrade del MercuryTrade.jar +del HOW_TO_RUN_JAR.txt cd .. echo Zipping with jar completed echo Zipping with exe file start @@ -30,4 +32,11 @@ copy MercuryTrade.exe MercuryTrade call powershell Compress-Archive MercuryTrade MercuryTrade.exe.zip cd MercuryTrade del MercuryTrade.exe -echo zipping with exe completed \ No newline at end of file +cd .. +echo zipping with exe completed +echo zipping with lang started +echo removing old lang files +del lang.zip +call powershell Compress-Archive ../app-shared/src/main/resources/lang lang.zip +echo zipping with lang ended + diff --git a/just_zip.bat b/just_zip.bat new file mode 100644 index 00000000..599c9a83 --- /dev/null +++ b/just_zip.bat @@ -0,0 +1,28 @@ +echo off +cls +echo preparing zip files for release starting... +echo zipping with jar file start +cd release_files +echo removing old zip files +del MercuryTrade.jar.zip +del MercuryTrade.exe.zip +copy MercuryTrade.jar MercuryTrade +copy HOW_TO_RUN_JAR.txt MercuryTrade +call powershell Compress-Archive MercuryTrade MercuryTrade.jar.zip +cd MercuryTrade +del MercuryTrade.jar +del HOW_TO_RUN_JAR.txt +cd .. +echo Zipping with jar completed +echo Zipping with exe file start +copy MercuryTrade.exe MercuryTrade +call powershell Compress-Archive MercuryTrade MercuryTrade.exe.zip +cd MercuryTrade +del MercuryTrade.exe +cd .. +echo zipping with exe completed +echo zipping with lang started +echo removing old lang files +del lang.zip +call powershell Compress-Archive ../app-shared/src/main/resources/lang/* lang.zip +echo zipping with lang ended \ No newline at end of file diff --git a/release_files/HOW_TO_RUN_JAR.txt b/release_files/HOW_TO_RUN_JAR.txt new file mode 100644 index 00000000..7be16f26 --- /dev/null +++ b/release_files/HOW_TO_RUN_JAR.txt @@ -0,0 +1,6 @@ +If you want to run this app from jar you need to type in cmd following command: + +java "-Dfile.encoding=UTF-8" -jar MercuryTrade.jar + +This s very important "-Dfile.encoding=UTF-8" since it loads application with UTF-8 charset so characters like ąśćł and some chinese/japanese characters needs that +