Skip to content

Commit

Permalink
new instruction for Java 17 deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
curioustorvald committed Feb 10, 2022
1 parent e69cb58 commit 97d3edf
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 14 deletions.
17 changes: 10 additions & 7 deletions how_to_build_jre_with_jlink.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Download and unzip the JDK for the appropriate operation systems first! JDKs can

Then, on the terminal, run following commands:

jlink --add-modules java.base,java.desktop,java.logging,jdk.unsupported --output /home/installed/Documents/Terrarum/out/runtime-linux --no-header-files --no-man-pages --strip-debug --compress=2
jlink --add-modules java.base,java.desktop,java.logging,jdk.unsupported --output ~/Documents/Terrarum/out/runtime-linux-amd64 --no-header-files --no-man-pages --strip-debug --compress=2

jlink --module-path /home/installed/Documents/openjdk/jdk-11.0.2-windows/jmods:mods --add-modules java.base,java.desktop,java.logging,jdk.unsupported --output /home/installed/Documents/Terrarum/out/runtime-windows --no-header-files --no-man-pages --strip-debug --compress=2

jlink --module-path /home/installed/Documents/openjdk/jdk-11.0.2.jdk-mac/Contents/Home/jmods:mods --add-modules java.base,java.desktop,java.logging,jdk.unsupported --output /home/installed/Documents/Terrarum/out/runtime-osx --no-header-files --no-man-pages --strip-debug --compress=2
jlink --module-path ~/Documents/openjdk/jdk-17.0.1-aarch64/jmods:mods --add-modules java.base,java.desktop,java.logging,jdk.unsupported --output ~/Documents/Terrarum/out/runtime-linux-aarch64 --no-header-files --no-man-pages --strip-debug --compress=2
jlink --module-path ~/Documents/openjdk/jdk-17.0.1-windows/jmods:mods --add-modules java.base,java.desktop,java.logging,jdk.unsupported --output ~/Documents/Terrarum/out/runtime-windows-amd64 --no-header-files --no-man-pages --strip-debug --compress=2
jlink --module-path ~/Documents/openjdk/jdk-17.0.1.jdk-aarch64/Contents/Home/jmods:mods --add-modules java.base,java.desktop,java.logging,jdk.unsupported --output ~/Documents/Terrarum/out/runtime-osx-aarch64 --no-header-files --no-man-pages --strip-debug --compress=2
jlink --module-path ~/Documents/openjdk/jdk-17.0.1.jdk-amd64/Contents/Home/jmods:mods --add-modules java.base,java.desktop,java.logging,jdk.unsupported --output ~/Documents/Terrarum/out/runtime-osx-amd64 --no-header-files --no-man-pages --strip-debug --compress=2

This process assumes that the game does NOT use the Java 9+ modules and every single required libraries are fat-jar'd (their contents extracted right into the Jar)

Expand All @@ -18,9 +19,11 @@ Create an output directory; its contents shall be:

```
+assets
+runtime-linux
+runtime-osx
+runtime-windows
+runtime-linux-aarch64
+runtime-linux-amd64
+runtime-osx-amd64
+runtime-osx-aarch64
+runtime-windows-amd64
start_game_linux.sh
start_game_mac.sh
start_game_windows.bat
Expand Down
3 changes: 0 additions & 3 deletions start_game_linux.sh

This file was deleted.

3 changes: 3 additions & 0 deletions start_game_linux_aarch64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./runtime-linux-aarch64/bin/java -Xms1G -Xmx6G -jar TerrarumBuild.jar
3 changes: 3 additions & 0 deletions start_game_linux_x86_64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./runtime-linux-amd64/bin/java -Xms1G -Xmx6G -jar TerrarumBuild.jar
3 changes: 0 additions & 3 deletions start_game_mac.sh

This file was deleted.

3 changes: 3 additions & 0 deletions start_game_mac_aarch64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./runtime-osx-aarch64/bin/java -Xms1G -Xmx6G -jar TerrarumBuild.jar
3 changes: 3 additions & 0 deletions start_game_mac_x86_64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./runtime-osx-amd64/bin/java -Xms1G -Xmx6G -jar TerrarumBuild.jar
2 changes: 1 addition & 1 deletion start_game_windows.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
runtime-windows\bin\java -Xms1G -Xmx6G -jar TerrarumBuild.jar
runtime-windows-amd64\bin\java -Xms1G -Xmx6G -jar TerrarumBuild.jar

0 comments on commit 97d3edf

Please sign in to comment.