From 46b15c3d95606153831e9c2c86b65656e6dd5018 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Mon, 21 Feb 2022 13:27:53 +0900 Subject: [PATCH] build suggestion to hide the jarfile into the subdir --- how_to_build_jre_with_jlink.md | 25 ++++++++++++++++--------- start_game_linux_aarch64.sh | 2 +- start_game_linux_x86_64.sh | 2 +- start_game_mac_aarch64.sh | 2 +- start_game_mac_x86_64.sh | 2 +- start_game_windows.bat | 2 +- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/how_to_build_jre_with_jlink.md b/how_to_build_jre_with_jlink.md index c6e1e6694..d6fd346df 100644 --- a/how_to_build_jre_with_jlink.md +++ b/how_to_build_jre_with_jlink.md @@ -19,17 +19,24 @@ Create an output directory; its contents shall be: ``` +assets -+runtime-linux-aarch64 -+runtime-linux-amd64 -+runtime-osx-amd64 -+runtime-osx-aarch64 -+runtime-windows-amd64 -start_game_linux.sh -start_game_mac.sh ++runtimes +`+runtime-linux-aarch64 +`+runtime-linux-amd64 +`+runtime-osx-amd64 +`+runtime-osx-aarch64 +`+runtime-windows-amd64 +`TerrarumBuild.jar +start_game_linux_aarch64.sh +start_game_linux_x86_64.sh +start_game_mac_aarch64.sh +start_game_mac_x86_64.sh start_game_windows.bat -TerrarumBuild.jar ``` whereas `runtime-*` are runtime directories generated from the commands above, `TerrarumBuild.jar` is the artifact built using the TerrarumBuild. -`start_game_*` files are on the root directory of the project; you only need to simply copy them over. \ No newline at end of file +`start_game_*` files are on the root directory of the project; you only need to simply copy them over. + +Hide the `.jar` within the subdirectory; users will think this file is the main executable and will try to execute it using whatever JVM they may (or may not) have. + +And yes, I'm totally aware that `.sh` file says `x86_64` but the runtimes says `amd64`. \ No newline at end of file diff --git a/start_game_linux_aarch64.sh b/start_game_linux_aarch64.sh index 86d534e59..0f0767da6 100755 --- a/start_game_linux_aarch64.sh +++ b/start_game_linux_aarch64.sh @@ -1,3 +1,3 @@ #!/bin/bash cd "${0%/*}" -./runtime-linux-aarch64/bin/java -Xms1G -Xmx6G -jar TerrarumBuild.jar +./runtimes/runtime-linux-aarch64/bin/java -Xms1G -Xmx6G -jar ./runtimes/TerrarumBuild.jar diff --git a/start_game_linux_x86_64.sh b/start_game_linux_x86_64.sh index 37f157079..16908294f 100755 --- a/start_game_linux_x86_64.sh +++ b/start_game_linux_x86_64.sh @@ -1,3 +1,3 @@ #!/bin/bash cd "${0%/*}" -./runtime-linux-amd64/bin/java -Xms1G -Xmx6G -jar TerrarumBuild.jar +./runtimes/runtime-linux-amd64/bin/java -Xms1G -Xmx6G -jar ./runtimes/TerrarumBuild.jar diff --git a/start_game_mac_aarch64.sh b/start_game_mac_aarch64.sh index edf0bc78c..d4caaca9f 100755 --- a/start_game_mac_aarch64.sh +++ b/start_game_mac_aarch64.sh @@ -1,3 +1,3 @@ #!/bin/bash cd "${0%/*}" -./runtime-osx-aarch64/bin/java -Xms1G -Xmx6G -jar TerrarumBuild.jar +./runtimes/runtime-osx-aarch64/bin/java -Xms1G -Xmx6G -jar ./runtimes/TerrarumBuild.jar diff --git a/start_game_mac_x86_64.sh b/start_game_mac_x86_64.sh index fe920d3fc..ddf13e039 100755 --- a/start_game_mac_x86_64.sh +++ b/start_game_mac_x86_64.sh @@ -1,3 +1,3 @@ #!/bin/bash cd "${0%/*}" -./runtime-osx-amd64/bin/java -Xms1G -Xmx6G -jar TerrarumBuild.jar +./runtimes/runtime-osx-amd64/bin/java -Xms1G -Xmx6G -jar ./runtimes/TerrarumBuild.jar diff --git a/start_game_windows.bat b/start_game_windows.bat index 369ceb86b..458da61b7 100755 --- a/start_game_windows.bat +++ b/start_game_windows.bat @@ -1,2 +1,2 @@ cd /D "%~dp0" -runtime-windows-amd64\bin\java -Xms1G -Xmx6G -jar TerrarumBuild.jar +runtimes\runtime-windows-amd64\bin\java -Xms1G -Xmx6G -jar .\runtimes\TerrarumBuild.jar