Implements a new feature for the Updater for Linux users, that notifies them of the directory of where their backup folder has been made & stores their last version of the emulator. This folder is not stagnant, for now, it makes a backup folder wherever the AppImage is, so it'll create a new one if the AppImage is moved to a separate location. Can be looked into in the future to make it so users can select a location. For now, this works.
Signed-off-by: Collecting <collecting@noreply.localhost>
- Add STABLE_UPDATE_URL and NIGHTLY_UPDATE_URL constants
- Update CheckForUpdates() to read channel from QSettings
- Implement channel-aware version checking
- Nightly: Always use commit hash from build version
- Stable: Prioritize version.txt file, fallback to commit hash
- Update ParseUpdateResponse() to handle different API formats
- Stable: Parse tag_name from Gitea API
- Nightly: Extract commit hash from GitHub release name
- Update Linux AppImage updates to manage version.txt based on channel
- Remove update_url parameter from CheckForUpdates() methods
- Update main.cpp to use new CheckForUpdates() signature
The updater now supports both Stable and Nightly channels with
appropriate version checking and update source selection for each.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Force the updater dialog to be non-modal so users can continue using
the application while checking for or downloading updates. This improves
user experience by not blocking interaction with the main window.
The dialog is explicitly set to non-modal in the constructor, overriding
any setting from the UI file.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Implement deferred update mechanism using a helper batch script that applies
updates after the application exits, avoiding Windows file locking issues.
On Windows, the updater now:
- Stages update files and creates a helper batch script
- Launches the script as a detached process
- Exits the application
- The script waits for app closure, applies updates, and restarts Citron
Linux AppImage updates continue to work as before with the existing method.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Move UpdaterDialog class declaration outside #ifdef _WIN32 to ensure
Qt's MOC can see the Q_OBJECT macro. Add stub implementations for
non-Windows platforms to satisfy linker.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Replace direct file overwriting with a staging-based update mechanism to
resolve "file in use" errors during self-updates.
**Changes:**
- Stage updates to temporary directory instead of direct installation
- Apply staged updates on next application startup (before files are loaded)
- Add static methods for startup update detection and application
- Create update manifest to track staged update metadata
- Backup existing files before applying updates
- Update UI messaging to reflect staged update workflow
**Problem solved:**
The previous direct file replacement approach failed when trying to overwrite
DLLs and executables that were loaded into memory by the running process.
This two-stage approach stages files safely, then applies them on restart
when no files are in use.
**Workflow:**
1. Download and extract update to staging directory
2. Create manifest with update metadata
3. Show "Update ready" message to user
4. On next app startup: detect staged update, apply it, show success message
5. Clean up staging directory after successful application
This ensures reliable self-updates without file access conflicts.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Implement a complete auto-updater system for Citron with the following features:
- Add UpdaterService class for handling update checks, downloads, and installations
- Add UpdaterDialog with progress tracking and user interaction
- Support both .zip and .7z archives with Windows PowerShell fallback
- Automatic background update checking on startup (3-second delay)
- Silent notifications when updates are available
- Manual "Check for Updates" menu option in Help menu
- User setting to enable/disable automatic update checks (enabled by default)
- Graceful error handling with detailed logging
- Restart functionality after successful updates
- Libarchive integration for cross-platform archive support
The system uses HTTP URLs to bypass SSL library compatibility issues and
provides a smooth user experience with minimal interruption during automatic
checks. Manual updates show a full dialog with progress tracking and changelog
information.
Fixes update distribution workflow and keeps users informed of new releases.
Signed-off-by: Zephyron <zephyron@citron-emu.org>