Skip to content

Implement self-updater on application start #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 11, 2025

Conversation

JeodC
Copy link
Contributor

@JeodC JeodC commented Apr 6, 2025

Description

  • Runs once on app start
  • Checks GitHub API for release tag and compares to __version__.py
  • If newer, downloads release from browser_download_url
  • No extraction steps yet (perfecting ui first)

It doesn't look quite the same as when downloading a rom, and since it occurs before anything else renders, I wonder if I'm missing some steps in the render pipeline that could otherwise make it look better. It does successfully download the latest .muxapp release if __version__.py is not present.

@JeodC JeodC force-pushed the self-updater branch 9 times, most recently from 9a454bb to fffe74c Compare April 6, 2025 20:31
@gantoine gantoine self-requested a review April 7, 2025 02:46
@JeodC JeodC force-pushed the self-updater branch 2 times, most recently from 5d5a6b8 to c573ae1 Compare April 7, 2025 11:58
@JeodC JeodC marked this pull request as ready for review April 7, 2025 16:29
@JeodC
Copy link
Contributor Author

JeodC commented Apr 7, 2025

With the added commits the self-updater is feature complete.

  • Check for update once on startup using GitHub API to compare latest release tag to contents of local __version__.py
  • If new release found prompt user for input whether to download it
    • If yes, new release is downloaded and extracted before imported modules initialize (in main.py)
    • If no, proceeds with current local version

I also laid a framework for a future project to add a ui options menu where the end user can choose whether to stretch the window to fill their display or stick with the 4:3 aspect ratio as well as choose the ui button colors and letters since several retro handhelds have varying button layouts (Xbox vs Nintendo layout, different physical button colors etc.)

@JeodC JeodC force-pushed the self-updater branch 2 times, most recently from a97243f to 6b89bbc Compare April 8, 2025 00:34
JeodC and others added 3 commits April 8, 2025 07:06
Since we use execv (same process) and argv (same arguments) without user input, this is generally safe and could be ignored. On the other hand, it could also be changed to relaunch the shell script, but this requires knowing where the shell script exists. For now ignore the warning.
@gantoine gantoine merged commit ccf4219 into rommapp:main Apr 11, 2025
1 check passed
@JeodC JeodC deleted the self-updater branch April 11, 2025 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants