summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2011-08-21 16:30:19 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2011-08-21 17:43:05 -0500
commite8fe15c3f7e3471f49ea0423ac0fe652db90391a (patch)
tree5cdd0d71d7981941ddeb786ab8c98ceba763fc59 /Source/Core
parent95fd6e925cb3113cc3bde93c4aa56f4e1cabbfaa (diff)
Make titlebar and about dialog fancy for cmake build.
Windows needs fixing.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/Common.h2
-rw-r--r--Source/Core/Common/Src/Version.cpp22
-rw-r--r--Source/Core/Core/Src/Core.cpp4
-rw-r--r--Source/Core/DolphinWX/Src/AboutDolphin.cpp7
-rw-r--r--Source/Core/DolphinWX/Src/FrameTools.cpp2
-rw-r--r--Source/Core/DolphinWX/Src/Main.cpp2
-rw-r--r--Source/Core/DolphinWX/Src/MainNoGUI.cpp4
-rw-r--r--Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp2
8 files changed, 28 insertions, 17 deletions
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 7618f5329b..bc9b4dc051 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -26,7 +26,7 @@
#include <string.h>
// SVN version number
-extern const char *svn_rev_str;
+extern const char *scm_rev_str;
extern const char *netplay_dolphin_ver;
// Force enable logging in the right modes. For some reason, something had changed
diff --git a/Source/Core/Common/Src/Version.cpp b/Source/Core/Common/Src/Version.cpp
index 4f2f0b1d77..f3d30398c8 100644
--- a/Source/Core/Common/Src/Version.cpp
+++ b/Source/Core/Common/Src/Version.cpp
@@ -16,15 +16,21 @@
// http://code.google.com/p/dolphin-emu/
#include "Common.h"
-#include "svnrev.h"
+#include "scmrev.h"
#ifdef _DEBUG
-const char *svn_rev_str = "Dolphin Debug r" SVN_REV_STR;
+ #define BUILD_TYPE_STR "Debug "
#elif defined DEBUGFAST
-const char *svn_rev_str = "Dolphin Debugfast r" SVN_REV_STR;
+ #define BUILD_TYPE_STR "DebugFast "
#else
-const char *svn_rev_str = "Dolphin r" SVN_REV_STR;
-#endif
+ #define BUILD_TYPE_STR ""
+#endif
+
+const char *scm_rev_str = "Dolphin "
+#if !SCM_IS_MASTER
+ "[" SCM_BRANCH_STR "] "
+#endif
+ BUILD_TYPE_STR SCM_DESC_STR;
#ifdef _M_X64
#define NP_ARCH "x64"
@@ -33,9 +39,9 @@ const char *svn_rev_str = "Dolphin r" SVN_REV_STR;
#endif
#ifdef _WIN32
-const char *netplay_dolphin_ver = SVN_REV_STR " W" NP_ARCH;
+const char *netplay_dolphin_ver = SCM_DESC_STR " W" NP_ARCH;
#elif __APPLE__
-const char *netplay_dolphin_ver = SVN_REV_STR " M" NP_ARCH;
+const char *netplay_dolphin_ver = SCM_DESC_STR " M" NP_ARCH;
#else
-const char *netplay_dolphin_ver = SVN_REV_STR " L" NP_ARCH;
+const char *netplay_dolphin_ver = SCM_DESC_STR " L" NP_ARCH;
#endif
diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp
index 18ab457d92..06fe496eb6 100644
--- a/Source/Core/Core/Src/Core.cpp
+++ b/Source/Core/Core/Src/Core.cpp
@@ -608,7 +608,7 @@ void VideoThrottle()
// This is our final "frame counter" string
std::string SMessage = StringFromFormat("%s | %s",
SSettings.c_str(), SFPS.c_str());
- std::string TMessage = StringFromFormat("%s | ", svn_rev_str) +
+ std::string TMessage = StringFromFormat("%s | ", scm_rev_str) +
SMessage;
// Show message
@@ -617,7 +617,7 @@ void VideoThrottle()
if (_CoreParameter.bRenderToMain &&
SConfig::GetInstance().m_InterfaceStatusbar) {
Host_UpdateStatusBar(SMessage.c_str());
- Host_UpdateTitle(svn_rev_str);
+ Host_UpdateTitle(scm_rev_str);
} else
Host_UpdateTitle(TMessage.c_str());
diff --git a/Source/Core/DolphinWX/Src/AboutDolphin.cpp b/Source/Core/DolphinWX/Src/AboutDolphin.cpp
index 27aba79aa4..11e8dbd98c 100644
--- a/Source/Core/DolphinWX/Src/AboutDolphin.cpp
+++ b/Source/Core/DolphinWX/Src/AboutDolphin.cpp
@@ -18,6 +18,7 @@
#include "Common.h"
#include "AboutDolphin.h"
#include "../resources/dolphin_logo.cpp"
+#include "scmrev.h"
AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id,
const wxString &title, const wxPoint &position,
@@ -29,9 +30,13 @@ AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id,
wxStaticBitmap* const sbDolphinLogo = new wxStaticBitmap(this, wxID_ANY,
wxBitmap(iDolphinLogo));
- std::string Text = std::string(svn_rev_str) + "\n"
+ std::string Text = "Dolphin " SCM_DESC_STR "\n"
"Copyright (c) 2003-2011+ Dolphin Team\n"
"\n"
+ "Branch: " SCM_BRANCH_STR "\n"
+ "Revision: " SCM_REV_STR "\n"
+ "Date: " __DATE__ " @ " __TIME__ "\n"
+ "\n"
"Dolphin is a Gamecube/Wii emulator, which was\n"
"originally written by F|RES and ector.\n"
"Today Dolphin is an open source project with many\n"
diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp
index 75d76a314e..a3798fe084 100644
--- a/Source/Core/DolphinWX/Src/FrameTools.cpp
+++ b/Source/Core/DolphinWX/Src/FrameTools.cpp
@@ -1073,7 +1073,7 @@ void CFrame::DoStop()
X11Utils::InhibitScreensaver(X11Utils::XDisplayFromHandle(GetHandle()),
X11Utils::XWindowFromHandle(GetHandle()), false);
#endif
- m_RenderFrame->SetTitle(wxString::FromAscii(svn_rev_str));
+ m_RenderFrame->SetTitle(wxString::FromAscii(scm_rev_str));
// Destroy the renderer frame when not rendering to main
m_RenderParent->Disconnect(wxID_ANY, wxEVT_SIZE,
diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp
index fc6ef09695..c8b6d61fa1 100644
--- a/Source/Core/DolphinWX/Src/Main.cpp
+++ b/Source/Core/DolphinWX/Src/Main.cpp
@@ -274,7 +274,7 @@ bool DolphinApp::OnInit()
#endif
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY,
- wxString::FromAscii(svn_rev_str),
+ wxString::FromAscii(scm_rev_str),
wxPoint(x, y), wxSize(w, h),
UseDebugger, BatchMode, UseLogger);
SetTopWindow(main_frame);
diff --git a/Source/Core/DolphinWX/Src/MainNoGUI.cpp b/Source/Core/DolphinWX/Src/MainNoGUI.cpp
index 537a7e5551..ffb511dc70 100644
--- a/Source/Core/DolphinWX/Src/MainNoGUI.cpp
+++ b/Source/Core/DolphinWX/Src/MainNoGUI.cpp
@@ -294,13 +294,13 @@ int main(int argc, char* argv[])
help = 1;
break;
case 'v':
- fprintf(stderr, "%s\n", svn_rev_str);
+ fprintf(stderr, "%s\n", scm_rev_str);
return 1;
}
}
if (help == 1 || argc == optind) {
- fprintf(stderr, "%s\n\n", svn_rev_str);
+ fprintf(stderr, "%s\n\n", scm_rev_str);
fprintf(stderr, "A multi-platform Gamecube/Wii emulator\n\n");
fprintf(stderr, "Usage: %s [-e <file>] [-h] [-v]\n", argv[0]);
fprintf(stderr, " -e, --exec Load the specified file\n");
diff --git a/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp b/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp
index 1af47f5a4c..0f4809a6cc 100644
--- a/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp
+++ b/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp
@@ -103,7 +103,7 @@ void TexDecoder_OpenCL_Initialize()
char dolphin_rev[HEADER_SIZE];
filename = File::GetUserPath(D_OPENCL_IDX) + "kernel.bin";
- snprintf(dolphin_rev, HEADER_SIZE, "%-31s", svn_rev_str);
+ snprintf(dolphin_rev, HEADER_SIZE, "%-31s", scm_rev_str);
{
File::IOFile input(filename, "rb");