From 1424713f622d2556dc7220b922c1623d7d3c4682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 17 Mar 2017 11:55:14 +0100 Subject: [PATCH] Minor resource reorg --- CMakeLists.txt | 3 +++ UI/DevScreens.cpp | 9 ++++++--- Windows/MainWindow.cpp | 1 - Windows/MainWindowMenu.cpp | 4 ++++ Windows/WindowsHost.cpp | 7 ++++++- Windows/zipup.cmd | 0 android/build.gradle | 4 +++- .../gold => gold/res}/drawable-hdpi/ic_launcher.png | Bin .../gold => gold/res}/drawable-ldpi/ic_launcher.png | Bin .../gold => gold/res}/drawable-mdpi/ic_launcher.png | Bin .../res}/drawable-xhdpi/ic_launcher.png | Bin .../gold => gold/res}/drawable-xhdpi/tv_banner.png | Bin .../res}/drawable-xxhdpi/ic_launcher.png | Bin .../{res/gold => gold/res}/drawable/ic_banner.png | Bin android/gold/res/values/strings.xml | 4 ++++ 15 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 Windows/zipup.cmd rename android/{res/gold => gold/res}/drawable-hdpi/ic_launcher.png (100%) rename android/{res/gold => gold/res}/drawable-ldpi/ic_launcher.png (100%) rename android/{res/gold => gold/res}/drawable-mdpi/ic_launcher.png (100%) rename android/{res/gold => gold/res}/drawable-xhdpi/ic_launcher.png (100%) rename android/{res/gold => gold/res}/drawable-xhdpi/tv_banner.png (100%) rename android/{res/gold => gold/res}/drawable-xxhdpi/ic_launcher.png (100%) rename android/{res/gold => gold/res}/drawable/ic_banner.png (100%) create mode 100644 android/gold/res/values/strings.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a8ae20b40..caa84b4c4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,9 @@ endif() if(GOLD) add_definitions(-DGOLD) + message("Gold Build") +else() + message("Normal Build") endif() # Doesn't link on some platforms diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index e1af31079a..d479dbd9e4 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -358,9 +358,6 @@ void SystemInfoScreen::CreateViews() { deviceSpecs->Add(new InfoItem("Name", System_GetProperty(SYSPROP_NAME))); deviceSpecs->Add(new InfoItem("Lang/Region", System_GetProperty(SYSPROP_LANGREGION))); deviceSpecs->Add(new InfoItem("ABI", GetCompilerABI())); -#ifdef JENKINS - deviceSpecs->Add(new InfoItem("Built by", "Jenkins")); -#endif deviceSpecs->Add(new ItemHeader("CPU Information")); deviceSpecs->Add(new InfoItem("Name", cpu_info.brand_string)); #if defined(ARM) || defined(ARM64) || defined(MIPS) @@ -445,6 +442,9 @@ void SystemInfoScreen::CreateViews() { tabHolder->AddTab("Build Config", buildConfigScroll); buildConfig->Add(new ItemHeader("Build Configuration")); +#ifdef JENKINS + buildConfig->Add(new InfoItem("Built by", "Jenkins")); +#endif #ifdef _DEBUG buildConfig->Add(new InfoItem("_DEBUG", "")); #else @@ -456,6 +456,9 @@ void SystemInfoScreen::CreateViews() { #ifdef MOBILE_DEVICE buildConfig->Add(new InfoItem("MOBILE_DEVICE", "")); #endif +#ifdef GOLD + buildConfig->Add(new InfoItem("GOLD", "")); +#endif ViewGroup *cpuExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); cpuExtensionsScroll->SetTag("DevSystemInfoCPUExt"); diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index aec818c8a6..698ec084c3 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -126,7 +126,6 @@ namespace MainWindow bool noFocusPause = false; // TOGGLE_PAUSE state to override pause on lost focus #define MAX_LOADSTRING 100 - const TCHAR *szTitle = TEXT("PPSSPP"); const TCHAR *szWindowClass = TEXT("PPSSPPWnd"); const TCHAR *szDisplayClass = TEXT("PPSSPPDisplay"); diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index 7fae7c50b1..82aad3e367 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -1273,7 +1273,11 @@ namespace MainWindow { { W32Util::CenterWindow(hDlg); HWND versionBox = GetDlgItem(hDlg, IDC_VERSION); +#ifdef GOLD std::string windowText = "PPSSPP "; +#else + std::string windowText = "PPSSPP Gold "; +#endif windowText.append(PPSSPP_GIT_VERSION); SetWindowText(versionBox, ConvertUTF8ToWString(windowText).c_str()); } diff --git a/Windows/WindowsHost.cpp b/Windows/WindowsHost.cpp index 93339462c5..40ef7d220c 100644 --- a/Windows/WindowsHost.cpp +++ b/Windows/WindowsHost.cpp @@ -150,7 +150,12 @@ void WindowsHost::ShutdownGraphics() { } void WindowsHost::SetWindowTitle(const char *message) { - std::wstring winTitle = ConvertUTF8ToWString(std::string("PPSSPP ") + PPSSPP_GIT_VERSION); +#ifdef GOLD + const char *name = "PPSSPP "; +#else + const char *name = "PPSSPP Gold "; +#endif + std::wstring winTitle = ConvertUTF8ToWString(std::string(name) + PPSSPP_GIT_VERSION); if (message != nullptr) { winTitle.append(ConvertUTF8ToWString(" - ")); winTitle.append(ConvertUTF8ToWString(message)); diff --git a/Windows/zipup.cmd b/Windows/zipup.cmd new file mode 100644 index 0000000000..e69de29bb2 diff --git a/android/build.gradle b/android/build.gradle index 1d0e8f9c2d..1a1f559fca 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -55,7 +55,9 @@ android { ] jni.srcDirs = ['..'] } - + gold { + res.srcDirs = ['gold/res'] + } } productFlavors { normal { diff --git a/android/res/gold/drawable-hdpi/ic_launcher.png b/android/gold/res/drawable-hdpi/ic_launcher.png similarity index 100% rename from android/res/gold/drawable-hdpi/ic_launcher.png rename to android/gold/res/drawable-hdpi/ic_launcher.png diff --git a/android/res/gold/drawable-ldpi/ic_launcher.png b/android/gold/res/drawable-ldpi/ic_launcher.png similarity index 100% rename from android/res/gold/drawable-ldpi/ic_launcher.png rename to android/gold/res/drawable-ldpi/ic_launcher.png diff --git a/android/res/gold/drawable-mdpi/ic_launcher.png b/android/gold/res/drawable-mdpi/ic_launcher.png similarity index 100% rename from android/res/gold/drawable-mdpi/ic_launcher.png rename to android/gold/res/drawable-mdpi/ic_launcher.png diff --git a/android/res/gold/drawable-xhdpi/ic_launcher.png b/android/gold/res/drawable-xhdpi/ic_launcher.png similarity index 100% rename from android/res/gold/drawable-xhdpi/ic_launcher.png rename to android/gold/res/drawable-xhdpi/ic_launcher.png diff --git a/android/res/gold/drawable-xhdpi/tv_banner.png b/android/gold/res/drawable-xhdpi/tv_banner.png similarity index 100% rename from android/res/gold/drawable-xhdpi/tv_banner.png rename to android/gold/res/drawable-xhdpi/tv_banner.png diff --git a/android/res/gold/drawable-xxhdpi/ic_launcher.png b/android/gold/res/drawable-xxhdpi/ic_launcher.png similarity index 100% rename from android/res/gold/drawable-xxhdpi/ic_launcher.png rename to android/gold/res/drawable-xxhdpi/ic_launcher.png diff --git a/android/res/gold/drawable/ic_banner.png b/android/gold/res/drawable/ic_banner.png similarity index 100% rename from android/res/gold/drawable/ic_banner.png rename to android/gold/res/drawable/ic_banner.png diff --git a/android/gold/res/values/strings.xml b/android/gold/res/values/strings.xml new file mode 100644 index 0000000000..6034294487 --- /dev/null +++ b/android/gold/res/values/strings.xml @@ -0,0 +1,4 @@ + + + PPSSPP Gold +