Feat: Highly experimental JAR auto update #3
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.
Currently, the auto-update feature is highly experimental, and might be removed, or changed at any time.
And for now, this feature has the following known issues:
that can't be automatically migrated.
we haven't implemented an update channel for now (e.g., stable, beta, alpha, development, etc...).
exit code 1 which will indicate an error by the launcher.
The user will have to launch once again to run the updated JAR.
the update process will always update to the minimized JAR.
We haven't planned on how this will be implemented, this is an experimental implementation that is disabled by default and is not recommended if you want something that is stable
Due to how file locking on Windows, the implementation is a bit different as it will generate a batch script that will run after 2 seconds, and in that time, the batch script expects the application to be closed. the application will not wait for the batch script to finish so we can remove, overwrite, or rename the current JAR file.
We could have implemented this with auto-updater, launcher, or a separate script, we didn't solve it this way for many reasons: