Improved linux packaging.
This commit is contained in:
parent
99a1ef3441
commit
19d6dc7a5e
|
@ -7,15 +7,14 @@ function join_by {
|
|||
fi
|
||||
}
|
||||
|
||||
mvn clean package javafx:jlink -DskipDebug=true -DstripJavaDebugAttributes=true -DnoHeaderFiles=true -DnoManPages=true
|
||||
|
||||
mvn clean package
|
||||
cd target
|
||||
module_jars=(lib/*)
|
||||
eligible_main_jars=("*jar-with-dependencies.jar")
|
||||
eligible_main_jars=("*.jar")
|
||||
main_jar=(${eligible_main_jars[0]})
|
||||
module_path=$(join_by ";" ${module_jars[@]})
|
||||
module_path="$main_jar;$module_path"
|
||||
|
||||
module_path=$(join_by ":" ${module_jars[@]})
|
||||
module_path="$main_jar:$module_path"
|
||||
echo $module_path
|
||||
jpackage \
|
||||
--name "Ace of Shades Launcher" \
|
||||
--app-version "1.0.0" \
|
||||
|
@ -24,8 +23,6 @@ jpackage \
|
|||
--linux-deb-maintainer "andrewlalisofficial@gmail.com" \
|
||||
--linux-menu-group "Game" \
|
||||
--linux-app-category "Game" \
|
||||
--runtime-image image \
|
||||
--main-jar $main_jar \
|
||||
--main-class nl.andrewl.aos2_launcher.Launcher \
|
||||
--input .
|
||||
--module-path "$module_path" \
|
||||
--module aos2_launcher/nl.andrewl.aos2_launcher.Launcher
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ public class EditProfileDialog extends Dialog<Profile> {
|
|||
.or(usernameField.textProperty().isEmpty());
|
||||
nameField.setText(profile.getName());
|
||||
usernameField.setText(profile.getUsername());
|
||||
VersionFetcher.INSTANCE.getAvailableReleases().thenAccept(releases -> Platform.runLater(() -> {
|
||||
VersionFetcher.INSTANCE.getAvailableReleases()
|
||||
.whenComplete((releases, throwable) -> Platform.runLater(() -> {
|
||||
if (throwable == null) {
|
||||
clientVersionChoiceBox.setItems(FXCollections.observableArrayList(releases.stream().map(ClientVersionRelease::tag).toList()));
|
||||
// If the profile doesn't have a set version, use the latest release.
|
||||
if (profile.getClientVersion() == null || profile.getClientVersion().isBlank()) {
|
||||
|
@ -53,6 +55,13 @@ public class EditProfileDialog extends Dialog<Profile> {
|
|||
} else {
|
||||
clientVersionChoiceBox.setValue(profile.getClientVersion());
|
||||
}
|
||||
} else {
|
||||
throwable.printStackTrace();
|
||||
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||
alert.initOwner(this.getOwner());
|
||||
alert.setContentText("An error occurred while fetching the latest game releases: " + throwable.getMessage());
|
||||
alert.show();
|
||||
}
|
||||
}));
|
||||
jvmArgsTextArea.setText(profile.getJvmArgs());
|
||||
|
||||
|
|
Loading…
Reference in New Issue