diff options
| author | 2019-10-05 00:09:49 -0400 | |
|---|---|---|
| committer | 2019-10-05 00:09:49 -0400 | |
| commit | 3d4a0b94e368ddab44cbfe0180ccfa76dfb6ac81 (patch) | |
| tree | d0583c88eb831ff045ed9ff264ddcb80a259c675 /src | |
| parent | ci: Add version counter variable (diff) | |
| download | yuzu-3d4a0b94e368ddab44cbfe0180ccfa76dfb6ac81.tar.gz yuzu-3d4a0b94e368ddab44cbfe0180ccfa76dfb6ac81.tar.xz yuzu-3d4a0b94e368ddab44cbfe0180ccfa76dfb6ac81.zip | |
common: Add additional SCM revision fields
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | src/common/scm_rev.cpp.in | 6 | ||||
| -rw-r--r-- | src/common/scm_rev.h | 3 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index dfed8b51d..5c996fcdb 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -15,11 +15,23 @@ if (DEFINED ENV{CI}) | |||
| 15 | set(BUILD_TAG $ENV{AZURE_REPO_TAG}) | 15 | set(BUILD_TAG $ENV{AZURE_REPO_TAG}) |
| 16 | endif() | 16 | endif() |
| 17 | endif() | 17 | endif() |
| 18 | if (DEFINED ENV{TITLEBARFORMATIDLE}) | ||
| 19 | set(TITLE_BAR_FORMAT_IDLE $ENV{TITLEBARFORMATIDLE}) | ||
| 20 | endif () | ||
| 21 | if (DEFINED ENV{TITLEBARFORMATRUNNING}) | ||
| 22 | set(TITLE_BAR_FORMAT_RUNNING $ENV{TITLEBARFORMATRUNNING}) | ||
| 23 | endif () | ||
| 24 | if (DEFINED ENV{DISPLAYVERSION}) | ||
| 25 | set(DISPLAY_VERSION $ENV{DISPLAYVERSION}) | ||
| 26 | endif () | ||
| 18 | add_custom_command(OUTPUT scm_rev.cpp | 27 | add_custom_command(OUTPUT scm_rev.cpp |
| 19 | COMMAND ${CMAKE_COMMAND} | 28 | COMMAND ${CMAKE_COMMAND} |
| 20 | -DSRC_DIR="${CMAKE_SOURCE_DIR}" | 29 | -DSRC_DIR="${CMAKE_SOURCE_DIR}" |
| 21 | -DBUILD_REPOSITORY="${BUILD_REPOSITORY}" | 30 | -DBUILD_REPOSITORY="${BUILD_REPOSITORY}" |
| 31 | -DTITLE_BAR_FORMAT_IDLE="${TITLE_BAR_FORMAT_IDLE}" | ||
| 32 | -DTITLE_BAR_FORMAT_RUNNING="${TITLE_BAR_FORMAT_RUNNING}" | ||
| 22 | -DBUILD_TAG="${BUILD_TAG}" | 33 | -DBUILD_TAG="${BUILD_TAG}" |
| 34 | -DBUILD_ID="${DISPLAY_VERSION}" | ||
| 23 | -P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake" | 35 | -P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake" |
| 24 | DEPENDS | 36 | DEPENDS |
| 25 | # WARNING! It was too much work to try and make a common location for this list, | 37 | # WARNING! It was too much work to try and make a common location for this list, |
diff --git a/src/common/scm_rev.cpp.in b/src/common/scm_rev.cpp.in index d69038f65..5f126f324 100644 --- a/src/common/scm_rev.cpp.in +++ b/src/common/scm_rev.cpp.in | |||
| @@ -11,6 +11,9 @@ | |||
| 11 | #define BUILD_DATE "@BUILD_DATE@" | 11 | #define BUILD_DATE "@BUILD_DATE@" |
| 12 | #define BUILD_FULLNAME "@BUILD_FULLNAME@" | 12 | #define BUILD_FULLNAME "@BUILD_FULLNAME@" |
| 13 | #define BUILD_VERSION "@BUILD_VERSION@" | 13 | #define BUILD_VERSION "@BUILD_VERSION@" |
| 14 | #define BUILD_ID "@BUILD_ID@" | ||
| 15 | #define TITLE_BAR_FORMAT_IDLE "@TITLE_BAR_FORMAT_IDLE@" | ||
| 16 | #define TITLE_BAR_FORMAT_RUNNING "@TITLE_BAR_FORMAT_RUNNING@" | ||
| 14 | #define SHADER_CACHE_VERSION "@SHADER_CACHE_VERSION@" | 17 | #define SHADER_CACHE_VERSION "@SHADER_CACHE_VERSION@" |
| 15 | 18 | ||
| 16 | namespace Common { | 19 | namespace Common { |
| @@ -22,6 +25,9 @@ const char g_build_name[] = BUILD_NAME; | |||
| 22 | const char g_build_date[] = BUILD_DATE; | 25 | const char g_build_date[] = BUILD_DATE; |
| 23 | const char g_build_fullname[] = BUILD_FULLNAME; | 26 | const char g_build_fullname[] = BUILD_FULLNAME; |
| 24 | const char g_build_version[] = BUILD_VERSION; | 27 | const char g_build_version[] = BUILD_VERSION; |
| 28 | const char g_build_id[] = BUILD_ID; | ||
| 29 | const char g_title_bar_format_idle[] = TITLE_BAR_FORMAT_IDLE; | ||
| 30 | const char g_title_bar_format_running[] = TITLE_BAR_FORMAT_RUNNING; | ||
| 25 | const char g_shader_cache_version[] = SHADER_CACHE_VERSION; | 31 | const char g_shader_cache_version[] = SHADER_CACHE_VERSION; |
| 26 | 32 | ||
| 27 | } // namespace | 33 | } // namespace |
diff --git a/src/common/scm_rev.h b/src/common/scm_rev.h index 666bf0367..563015ec9 100644 --- a/src/common/scm_rev.h +++ b/src/common/scm_rev.h | |||
| @@ -13,6 +13,9 @@ extern const char g_build_name[]; | |||
| 13 | extern const char g_build_date[]; | 13 | extern const char g_build_date[]; |
| 14 | extern const char g_build_fullname[]; | 14 | extern const char g_build_fullname[]; |
| 15 | extern const char g_build_version[]; | 15 | extern const char g_build_version[]; |
| 16 | extern const char g_build_id[]; | ||
| 17 | extern const char g_title_bar_format_idle[]; | ||
| 18 | extern const char g_title_bar_format_running[]; | ||
| 16 | extern const char g_shader_cache_version[]; | 19 | extern const char g_shader_cache_version[]; |
| 17 | 20 | ||
| 18 | } // namespace Common | 21 | } // namespace Common |