Qt: Log PCSX2 version changes to update_log.txt on startup#14340
Qt: Log PCSX2 version changes to update_log.txt on startup#14340Vishrut2403 wants to merge 3 commits intoPCSX2:masterfrom
Conversation
|
Wouldn't it make more sense to just keep a log file for the updater? |
Had a look at the updater code, all three platforms do have processUpdate, and they all go through a single call site But after a successful update the app immediately exits to launch the new version, so there's no window to write a log there either. The QtHost approach works because it catches the version change on the next launch after the update. Also noticed AutoUpdater/LastVersion is already stored in settingsm I could use that instead of a separate last_version.txt if that's cleaner. |
|
No i meantjust write to the log file from the updater code, since it will get the PCSX2 directory, you can create/append an updater log file and write in there what version you're updating to and what from. If there's already a setting for it, then it makes more sense to just use that instead of keeping another file |
Looked more into it, LastVersion is only written when skipping an update so its not really tracking the installed version. writing the log from inside processUpdate is doable since m_latest_version and BuildVersion::GitRev are both available there but it means touching all three platform implementations separately and still wont cover manual installs. Just wanted to flag that |
|
Sure, but if you're manually updating, you probably have more of an idea what versions you're installing and don't really need a log :) Also there's very little reason to manually update when there's an updater available. |
The windows updater binary doesn't actually have access to any version info, it just move files around. to log the from and to versions, from there id need to pass them as extra command line args which feels like a bigger change. |
|
Okay, but I'm still unsure of the benefit of this, if you know roughly what version you were on (or how long since you updated) and what you're on now, you can download individual past builds and do a binary search to find regressions. There will likely only be a few people who will actually do such regression testing and getting old builds and skipping big steps is not a difficult thing to do, if there's a regression since you last updated, it's likely recentsih. This all just feels a bit jank and not very useful, honestly imo, sorry. Keeping a log of updates done by the updater could maybe be useful and covers most cases of what you're trying to address, but beyond that, I don't know what use it would be. I guess it's up to what the team think (not my place anymore, just giving my 2c) |
|
This is over complicated. I can only see one use case for this where :
I much prefer that rather than leaving random files on the users disk. Just pass it as an argument when PCSX2 invokes the updater. Append to an update_log.txt |
This reverts commit a5c12bf.
Done, passed the old and new version strings as extra args to the updater binary and write to update_log.txt in the destination directory after CommitUpdate succeeds. also needed to add the same args on the AutoUpdaterDialog side where it invokes the updater. |
f1a20a0 to
51f7027
Compare
|
Also added the log for linux and mac inside respective processUpdate implementations in AutoUpdaterDialog.cpp, so it should cover all three platforms now |
Description of Changes
Added a small version tracking mechanism that runs on startup. Each launch compares the current version (BuildVersion::GitRev) against a persisted last_version.txt in the settings folder. If they differ, a timestamped entry gets appended to update_log.txt:
[2026-04-20 00:16:38] Updated from v2.7.229 to v2.7.274-1-g5156fc10c
Rationale behind Changes
Currently there is no way to track when a user updated PCSX2, making it difficult to detect regressions or figure out which version broke something. This adds a log with that covers both the auto-updater and manual installs.
Closes #14327.
Suggested Testing Steps
echo "v2.7.000-fake" > ~/.config/PCSX2/inis/last_version.txt
Did you use AI to help find, test, or implement this issue or feature?
Yes. Used Claude to help navigate the codebase and identify the right hook point and existing helpers to use.