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