Add Update Settings panel for auto-update mode and minimum app version#463
Open
shannah wants to merge 7 commits into
Open
Add Update Settings panel for auto-update mode and minimum app version#463shannah wants to merge 7 commits into
shannah wants to merge 7 commits into
Conversation
…app version Expose two launcher-update features (already supported by the client4jgo launcher) as first-class, GUI-editable settings in jDeploy: - Auto-update mode (jdeploy.appUpdateMode): "auto" (silent update on launch, the default) vs "prompt" (ask the user on launch when an update is available). The installer writes this to the launcher's preferences.properties (app-update-mode key) at install time. - Minimum initial app version (jdeploy.minLauncherInitialAppVersion): forces users on an older launcher to download a fresh installer and perform a full update. Supports an explicit version, or a "latest" sentinel (minLauncherInitialAppVersionMode) that is resolved to the published version at publish time without rewriting the developer's package.json. - Require full launcher update (jdeploy.requireLauncherUpdate) checkbox. Changes: - New UpdateSettingsPanel registered as the "Updates" tab in JDeployProjectEditor. - JDeployProject getters for the new jdeploy keys. - BasePublishDriver resolves the minLauncherInitialAppVersion "latest" sentinel in the published package.json. - AppInfo carries appUpdateMode; the installer reads it from the published package metadata (NPMPackageVersion) and InstallerPreferencesService persists app-update-mode to preferences.properties (read-merge-write so a null/empty published value never clobbers an existing user preference). - Unit tests across cli, shared, and installer modules. No client4jgo changes are required; it already consumes every key/attribute involved.
…18155' into claude/wizardly-thompson-68sos
…scripts - Add test_jdeploy_gui.sh to launch the jDeploy GUI from the command line, replicating the 'JDeploy' IntelliJ run configuration - Add test_installer_debug.sh to test the install wizard against a registry, replicating the 'JDeploy Installer' IntelliJ run configuration - Add .tool-versions pinning JDK 8 and Maven for mise/asdf - Add DEVELOPMENT.md documenting the build and the test scripts, linked from the README
Anchor the panel content at the top with BorderLayout.NORTH so the sections keep their preferred heights instead of being stretched to fill the editor's content area, and add consistent padding inside the titled borders and between sections.
Users may not know what "minimum initial app version" means, so the panel now frames both sections in terms of auto-updates: - "Auto-Update Behaviour" is now "App-Only Updates" — updates that replace only the app's jar files and are applied seamlessly on launch - "Minimum Initial App Version" is now "Full Updates" — updates that run the installer again, updating the native launcher along with the app, with options reworded accordingly (never / every release / older than a given version) Each section gets a help link that pops up a fuller description of the two update types and when a full update is warranted. The version threshold field shows a placeholder hint and tooltip clarifying that it takes a version of the user's app, not a date or a jDeploy version. No persistence changes: the same appUpdateMode, minLauncherInitialAppVersion(Mode), and requireLauncherUpdate keys are read and written as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a GUI Updates panel to the jDeploy project editor exposing the launcher's update settings, framed in user-friendly vocabulary:
jdeploy.appUpdateMode) — choose whether app-only (jar-file) updates are applied automatically on launch (default) or whether the user is prompted first. The installer writes this to the launcher'spreferences.properties(app-update-mode) at install time.jdeploy.minLauncherInitialAppVersion/minLauncherInitialAppVersionMode/requireLauncherUpdate) — choose when users are required to run the installer again to update the native launcher: never (default), on every release, or for installations older than a given app version.Each section has a help link that pops up a fuller explanation of app-only vs full updates and when a full update is warranted. The version threshold field has a placeholder hint and tooltip clarifying it takes a version of the user's app (not a date or jDeploy version).
Settings follow the remove-when-default convention — keys are only written to
package.jsonwhen they differ from the defaults.Also includes:
DEVELOPMENT.mdlocal development guide, linked from the READMEtest_jdeploy_gui.sh/test_installer_debug.shscripts replicating the IntelliJ run configs for manual GUI and installer testing.tool-versionspinning JDK 8 + Maven for mise/asdfTesting
UpdateSettingsPanelTestcovering load/save round-trips and remove-when-default behaviorjdeploy-test-app1.0.20 and 1.0.21 to GitHub releases withappUpdateMode=promptusing the branch build, verified the setting lands in the publishedpackage-info.json, and installed 1.0.20 via the branch installer to exercise the prompt-before-update flow