Skip to content
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

Misc: Minimise the amount of work done when svnrev.h is updated #11988

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

chaoticgd
Copy link
Contributor

@chaoticgd chaoticgd commented Nov 8, 2024

Description of Changes

I have created a new pair of files for retrieving version information: BuildVersion.h and BuildVersion.cpp. They provide exactly the same information as svnrev.h but they don't force a recompile for all translation units using them every time cmake configure is run.

Most systems that used svnrev.h directly have been ported to use this new wrapper instead. The most notable changes are in the auto updater since it previously relied on a lot of preprocessor logic.

The only place svnrev.h is used directly is now the Windows resource files.

buildversion

Rationale behind Changes

  • Don't recompile a bunch of files unnecessarily whenever cmake configure is run.
  • No more // Remember to manually update this every release. shenanigans (see GSDeviceVK.cpp).
  • Minimal changes made to the existing build systems.
  • Get our money's worth out of our linkers.

Suggested Testing Steps

The systems that have been touched are:

  • The Qt GUI (version displayed).
  • The auto updater (preprocessor conditionals replaced with runtime logic).
  • The achievement system (version reported to RetroAchievements library).
  • The Vulkan renderer (version reported via the Vulkan API).
  • Networking code (the HTTP user agent).
  • Fullscreen UI (version displayed).
  • PINE (version reported via MsgVersion).
  • Input recording (version stored in the file header).
  • The save state system (version stored in save states).
  • Log output (PCSX2 version number).

Ideally there should be no differences in functionality or output for any of these systems.

@F0bes F0bes merged commit eeb9193 into PCSX2:master Nov 12, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants