-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Build: Use git tag for the file version on windows #5355
Conversation
Also update the copyright year of SysForwardDefs.h
Heads up, this seems to break building on Linux for me
|
Yup, aware of it. |
I reverted the commit for now For the future, here's a cmake function to put in function(write_svnrev_h)
if(PCSX2_GIT_TAG)
if ("${PCSX2_GIT_TAG}" MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
"#define SVN_REV ${PCSX2_WC_TIME}ll\n"
"#define GIT_TAG \"${PCSX2_GIT_TAG}\"\n"
"#define GIT_TAGGED_COMMIT 1\n"
"#define GIT_TAG_HI ${CMAKE_MATCH_1}\n"
"#define GIT_TAG_MID ${CMAKE_MATCH_2}\n"
"#define GIT_TAG_LO ${CMAKE_MATCH_3}\n"
"#define GIT_REV \"\"\n"
)
else()
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
"#define SVN_REV ${PCSX2_WC_TIME}ll\n"
"#define GIT_TAG \"${PCSX2_GIT_TAG}\"\n"
"#define GIT_TAGGED_COMMIT 1\n"
"#define GIT_REV \"\"\n"
)
endif()
else()
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
"#define SVN_REV ${PCSX2_WC_TIME}ll\n"
"#define GIT_TAG \"${PCSX2_GIT_TAG}\"\n"
"#define GIT_TAGGED_COMMIT 0\n"
"#define GIT_REV \"${PCSX2_GIT_REV}\"\n"
)
endif()
endfunction() Check for But more importantly, do not include svnrev.h in a file that's widely included across the emulator or you'll mess up all our incremental builds and caching |
Description of Changes
Uses the Git tag for the file version (And anything else that uses PCSX2_VersionHi/Mid/Lo)
Rationale behind Changes
Have the Git tag visible in the file details pane on Windows
Suggested Testing Steps
Hope nothing breaks