Not to discount any attempts by other Linux users, but personal advice for anyone coming in here actually using Linux. Don't bother with open JDKs and JavaFx. Make a VM of Win10 and play. It's just easier and the game is not worth the hassle of building it from scratch or trying to troubleshoot your way through the former.
The game is horrendously (un)optimized that a VM probably won't add noticeable delay. Regardless, here's how I compile+run on Linux. YMMV. Familiarity w/ how Maven works (or to learn via Google) is required.
High-level instructions to (re)build:
1. `git clone` from github @
You must be registered to see the links
2. Change imports in `.../src/com/lilithsthrone/game/dialogue/utils/UtilText.java`
3. `mvn package` to build the base jar
4. download additional Linux-friendly jars via Maven
5. populate a `jar-additions` directory (below)
6. Execute `repackage.sh` (below) to augment the packaged artifact.
Once everything is setup (above), rebuilding is a simple `git fetch`, `mvn package`, then `repackage.sh`.
Expected directory structure for reference:
Code:
./repackage.sh
./run.sh
./liliths-throne-public/
./jar-additions/
./jar-additions/META-INF/
./jar-additions/classpath-libs/
./javafx-sdk-17.0.7/
./openjfx -> javafx-sdk-17.0.7
The imports to change:
Java:
-import jdk.nashorn.api.scripting.NashornScriptEngine;
-import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
// Use the following imports when using the org.openjdk.nashorn dependency:
-//import org.openjdk.nashorn.api.scripting.NashornScriptEngine;
-//import org.openjdk.nashorn.api.scripting.NashornScriptEngineFactory;
+import org.openjdk.nashorn.api.scripting.NashornScriptEngine;
+import org.openjdk.nashorn.api.scripting.NashornScriptEngineFactory;
`MANIFEST.MF` under jar-additions/META-INF (you'll need to fix <PATH>):
Code:
Manifest-Version: 1.0
Main-Class: com.lilithsthrone.main.Main
Class-Path: <PATH>/jar-additions/classpath-libs/nashorn-core-15.4.jar <PATH>/jar-additions/classpath-libs/asm-9.5.jar <PATH>/jar-additions/classpath-libs/asm-commons-9.5.jar <PATH>/jar-additions/classpath-libs/asm-analysis-9.5.jar <PATH>/jar-additions/classpath-libs/asm-tree-9.5.jar <PATH>/jar-additions/classpath-libs/asm-util-9.5.jar .
The jars in `jar-additions/classpath-libs` which can be downloaded via Maven:
Code:
asm-3.3.1.jar
asm-9.5.jar
asm-all-3.3.1.jar
asm-analysis-9.5.jar
asm-commons-9.5.jar
asm-tree-9.5.jar
asm-util-9.5.jar
nashorn-core-15.4.jar
`repackage.sh`:
Bash:
#!/bin/sh
#
gh_dir=liliths-throne-public
jar=`find ${gh_dir}/target/ -name "lilithsthrone-*.jar"`
# refresh the timestamp, otherwise zip may not update the file
touch jar-additions/META-INF/*
# attempting to package only MANIFEST
pushd jar-additions
zip -u "../$jar" META-INF/*
popd
Assuming you did the above correctly, you can launch via `run.sh` (after fixing <PATH>):
Bash:
#!/bin/sh
#
# from https://www.reddit.com/r/lewdgames/comments/zawndo/getting_liliths_throne_running_on_linux/
#
module_path="<PATH>/openjfx/lib"
modules="javafx.swt,javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web"
pushd liliths-throne-public
game_jar=`find target -name "Lilith*.jar"`
java -jar --module-path $module_path --add-modules $modules "$game_jar"
popd