Commit Graph

17 Commits

Author SHA1 Message Date
Collecting
cb918bdbc8 feat: Add Backup Location Path Notification for Linux Updates
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>
2025-12-11 05:25:57 +00:00
Zephyron
c27533949c Add update channel support (Stable/Nightly) to updater system
- 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>
2025-11-22 16:56:48 +10:00
Zephyron
87a4d61789 Make updater dialog non-modal
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>
2025-11-22 16:13:10 +10:00
Zephyron
0ce89925a2 Fix Windows auto updater file locking issue
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>
2025-11-01 19:19:02 +10:00
Collecting
c8d6bada47 update/commit-link
New site so new link, adjusted accordingly.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-10-29 09:49:28 +00:00
collecting
6855bac278 fix: AppImage 2025-10-27 03:08:55 +00:00
collecting
deefdd36b0 fix: Auto Updater Link 2025-10-26 05:33:41 +00:00
collecting
66fc50646f Edit updater_dialog.cpp 2025-10-25 01:03:30 +00:00
collecting
c1dda00eea fix: Auto Updater 2025-10-24 11:30:59 +00:00
collecting
1a29259e33 fix: Autoupdater 2025-10-24 10:39:04 +00:00
Zephyron
a76c3e8808 fix: resolve UpdaterService redefinition error with conditional compilation
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-21 11:33:26 +10:00
Zephyron
da3f017c32 fix: resolve Qt MOC generation for conditionally compiled UpdaterDialog
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>
2025-09-17 20:27:22 +10:00
Boss.sfc
a3c4f0614a fix: Linux compiling
Made it so that the updater stuff is windows only.

Signed-off-by: Boss.sfc <boss.sfc@citron-emu.org>
2025-09-14 18:46:18 +07:00
Zephyron
12c3e4b92c Revert "fix: resolve X11 macro conflicts with enum values and Qt constants"
This reverts commit c32ac3b3c1.
2025-09-14 20:15:29 +10:00
Zephyron
c32ac3b3c1 fix: resolve X11 macro conflicts with enum values and Qt constants
Rename Success enums and fix Qt event types to avoid X11 macro conflicts.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-14 20:09:09 +10:00
Zephyron
00c3e7aea5 fix: Implement two-stage update system to handle file-in-use errors
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>
2025-07-11 17:01:37 +10:00
Zephyron
9ef1c76a2c feat: Add automatic update system with background checking
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>
2025-07-11 16:22:28 +10:00