diff options
| -rw-r--r-- | src/common/CMakeLists.txt | 24 | ||||
| -rw-r--r-- | src/common/scm_rev.cpp.in | 4 | ||||
| -rw-r--r-- | src/common/scm_rev.h | 2 | ||||
| -rw-r--r-- | src/yuzu/about_dialog.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 4 |
6 files changed, 30 insertions, 10 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index d9424ea91..f41946cc6 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -1,13 +1,16 @@ | |||
| 1 | # Generate cpp with Git revision from template | 1 | # Generate cpp with Git revision from template |
| 2 | # Also if this is a CI build, add the build name (ie: Nightly, Bleeding Edge) to the scm_rev file as well | 2 | # Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well |
| 3 | set(REPO_NAME "") | 3 | set(REPO_NAME "") |
| 4 | set(BUILD_VERSION "0") | ||
| 4 | if ($ENV{CI}) | 5 | if ($ENV{CI}) |
| 5 | if ($ENV{TRAVIS}) | 6 | if ($ENV{TRAVIS}) |
| 6 | set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG}) | 7 | set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG}) |
| 8 | set(BUILD_TAG $ENV{TRAVIS_TAG}) | ||
| 7 | elseif($ENV{APPVEYOR}) | 9 | elseif($ENV{APPVEYOR}) |
| 8 | set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME}) | 10 | set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME}) |
| 11 | set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME}) | ||
| 9 | endif() | 12 | endif() |
| 10 | # regex capture the string nightly or bleeding-edge into CMAKE_MATCH_1 | 13 | # regex capture the string nightly or canary into CMAKE_MATCH_1 |
| 11 | string(REGEX MATCH "yuzu-emu/yuzu-?(.*)" OUTVAR ${BUILD_REPOSITORY}) | 14 | string(REGEX MATCH "yuzu-emu/yuzu-?(.*)" OUTVAR ${BUILD_REPOSITORY}) |
| 12 | if (${CMAKE_MATCH_COUNT} GREATER 0) | 15 | if (${CMAKE_MATCH_COUNT} GREATER 0) |
| 13 | # capitalize the first letter of each word in the repo name. | 16 | # capitalize the first letter of each word in the repo name. |
| @@ -16,10 +19,21 @@ if ($ENV{CI}) | |||
| 16 | string(SUBSTRING ${WORD} 0 1 FIRST_LETTER) | 19 | string(SUBSTRING ${WORD} 0 1 FIRST_LETTER) |
| 17 | string(SUBSTRING ${WORD} 1 -1 REMAINDER) | 20 | string(SUBSTRING ${WORD} 1 -1 REMAINDER) |
| 18 | string(TOUPPER ${FIRST_LETTER} FIRST_LETTER) | 21 | string(TOUPPER ${FIRST_LETTER} FIRST_LETTER) |
| 19 | # this leaves a trailing space on the last word, but we actually want that | 22 | set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER}") |
| 20 | # because of how it's styled in the title bar. | ||
| 21 | set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER} ") | ||
| 22 | endforeach() | 23 | endforeach() |
| 24 | if (BUILD_TAG) | ||
| 25 | string(REGEX MATCH "${CMAKE_MATCH_1}-([0-9]+)" OUTVAR ${BUILD_TAG}) | ||
| 26 | if (${CMAKE_MATCH_COUNT} GREATER 0) | ||
| 27 | set(BUILD_VERSION ${CMAKE_MATCH_1}) | ||
| 28 | endif() | ||
| 29 | if (BUILD_VERSION) | ||
| 30 | # This leaves a trailing space on the last word, but we actually want that | ||
| 31 | # because of how it's styled in the title bar. | ||
| 32 | set(BUILD_FULLNAME "${REPO_NAME} #${BUILD_VERSION} ") | ||
| 33 | else() | ||
| 34 | set(BUILD_FULLNAME "") | ||
| 35 | endif() | ||
| 36 | endif() | ||
| 23 | endif() | 37 | endif() |
| 24 | endif() | 38 | endif() |
| 25 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY) | 39 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY) |
diff --git a/src/common/scm_rev.cpp.in b/src/common/scm_rev.cpp.in index 4083095d5..2b1727769 100644 --- a/src/common/scm_rev.cpp.in +++ b/src/common/scm_rev.cpp.in | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | #define GIT_DESC "@GIT_DESC@" | 9 | #define GIT_DESC "@GIT_DESC@" |
| 10 | #define BUILD_NAME "@REPO_NAME@" | 10 | #define BUILD_NAME "@REPO_NAME@" |
| 11 | #define BUILD_DATE "@BUILD_DATE@" | 11 | #define BUILD_DATE "@BUILD_DATE@" |
| 12 | #define BUILD_FULLNAME "@BUILD_FULLNAME@" | ||
| 13 | #define BUILD_VERSION "@BUILD_VERSION@" | ||
| 12 | 14 | ||
| 13 | namespace Common { | 15 | namespace Common { |
| 14 | 16 | ||
| @@ -17,6 +19,8 @@ const char g_scm_branch[] = GIT_BRANCH; | |||
| 17 | const char g_scm_desc[] = GIT_DESC; | 19 | const char g_scm_desc[] = GIT_DESC; |
| 18 | const char g_build_name[] = BUILD_NAME; | 20 | const char g_build_name[] = BUILD_NAME; |
| 19 | const char g_build_date[] = BUILD_DATE; | 21 | const char g_build_date[] = BUILD_DATE; |
| 22 | const char g_build_fullname[] = BUILD_FULLNAME; | ||
| 23 | const char g_build_version[] = BUILD_VERSION; | ||
| 20 | 24 | ||
| 21 | } // namespace | 25 | } // namespace |
| 22 | 26 | ||
diff --git a/src/common/scm_rev.h b/src/common/scm_rev.h index db0f4a947..af9a9daed 100644 --- a/src/common/scm_rev.h +++ b/src/common/scm_rev.h | |||
| @@ -11,5 +11,7 @@ extern const char g_scm_branch[]; | |||
| 11 | extern const char g_scm_desc[]; | 11 | extern const char g_scm_desc[]; |
| 12 | extern const char g_build_name[]; | 12 | 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[]; | ||
| 15 | extern const char g_build_version[]; | ||
| 14 | 16 | ||
| 15 | } // namespace Common | 17 | } // namespace Common |
diff --git a/src/yuzu/about_dialog.cpp b/src/yuzu/about_dialog.cpp index a81ad2888..3efa65a38 100644 --- a/src/yuzu/about_dialog.cpp +++ b/src/yuzu/about_dialog.cpp | |||
| @@ -11,7 +11,7 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDia | |||
| 11 | ui->setupUi(this); | 11 | ui->setupUi(this); |
| 12 | ui->labelLogo->setPixmap(QIcon::fromTheme("yuzu").pixmap(200)); | 12 | ui->labelLogo->setPixmap(QIcon::fromTheme("yuzu").pixmap(200)); |
| 13 | ui->labelBuildInfo->setText( | 13 | ui->labelBuildInfo->setText( |
| 14 | ui->labelBuildInfo->text().arg(Common::g_build_name, Common::g_scm_branch, | 14 | ui->labelBuildInfo->text().arg(Common::g_build_fullname, Common::g_scm_branch, |
| 15 | Common::g_scm_desc, QString(Common::g_build_date).left(10))); | 15 | Common::g_scm_desc, QString(Common::g_build_date).left(10))); |
| 16 | } | 16 | } |
| 17 | 17 | ||
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index dbe5bd8a4..cb8135c42 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -136,11 +136,11 @@ GMainWindow::GMainWindow() | |||
| 136 | 136 | ||
| 137 | ConnectMenuEvents(); | 137 | ConnectMenuEvents(); |
| 138 | ConnectWidgetEvents(); | 138 | ConnectWidgetEvents(); |
| 139 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", Common::g_build_name, Common::g_scm_branch, | 139 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch, |
| 140 | Common::g_scm_desc); | 140 | Common::g_scm_desc); |
| 141 | 141 | ||
| 142 | setWindowTitle(QString("yuzu %1| %2-%3") | 142 | setWindowTitle(QString("yuzu %1| %2-%3") |
| 143 | .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc)); | 143 | .arg(Common::g_build_fullname, Common::g_scm_branch, Common::g_scm_desc)); |
| 144 | show(); | 144 | show(); |
| 145 | 145 | ||
| 146 | // Necessary to load titles from nand in gamelist. | 146 | // Necessary to load titles from nand in gamelist. |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index e1f269d31..c87e96b2d 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -128,7 +128,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 128 | SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); | 128 | SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); |
| 129 | SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0); | 129 | SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0); |
| 130 | 130 | ||
| 131 | std::string window_title = fmt::format("yuzu {} | {}-{}", Common::g_build_name, | 131 | std::string window_title = fmt::format("yuzu {} | {}-{}", Common::g_build_fullname, |
| 132 | Common::g_scm_branch, Common::g_scm_desc); | 132 | Common::g_scm_branch, Common::g_scm_desc); |
| 133 | render_window = | 133 | render_window = |
| 134 | SDL_CreateWindow(window_title.c_str(), | 134 | SDL_CreateWindow(window_title.c_str(), |
| @@ -167,7 +167,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 167 | OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); | 167 | OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); |
| 168 | SDL_PumpEvents(); | 168 | SDL_PumpEvents(); |
| 169 | SDL_GL_SetSwapInterval(false); | 169 | SDL_GL_SetSwapInterval(false); |
| 170 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", Common::g_build_name, Common::g_scm_branch, | 170 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch, |
| 171 | Common::g_scm_desc); | 171 | Common::g_scm_desc); |
| 172 | 172 | ||
| 173 | DoneCurrent(); | 173 | DoneCurrent(); |