Attempt at auto update SVN revision in title bar - let's see if it works for everyone, sorry Sonic, you'll have to find a linux solution (see svnrev_template.h). Also adds some smash bros cheats.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@34 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-07-20 15:12:12 +00:00
parent 7765b3f556
commit eaaea3da94
13 changed files with 159 additions and 9 deletions

View File

@ -28,6 +28,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(ProjectDir)SubWCRev.exe $(SolutionDir) $(ProjectDir)\src\svnrev_template.h $(ProjectDir)\src\svnrev.h"
/>
<Tool
Name="VCCustomBuildTool"
@ -96,6 +97,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(ProjectDir)SubWCRev.exe $(SolutionDir) $(ProjectDir)\src\svnrev_template.h $(ProjectDir)\src\svnrev.h"
/>
<Tool
Name="VCCustomBuildTool"
@ -167,6 +169,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(ProjectDir)SubWCRev.exe $(SolutionDir) $(ProjectDir)\src\svnrev_template.h $(ProjectDir)\src\svnrev.h"
/>
<Tool
Name="VCCustomBuildTool"
@ -239,6 +242,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(ProjectDir)SubWCRev.exe $(SolutionDir) $(ProjectDir)\src\svnrev_template.h $(ProjectDir)\src\svnrev.h"
/>
<Tool
Name="VCCustomBuildTool"
@ -312,6 +316,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(ProjectDir)SubWCRev.exe $(SolutionDir) $(ProjectDir)\src\svnrev_template.h $(ProjectDir)\src\svnrev.h"
/>
<Tool
Name="VCCustomBuildTool"
@ -379,6 +384,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(ProjectDir)SubWCRev.exe $(SolutionDir) $(ProjectDir)\src\svnrev_template.h $(ProjectDir)\src\svnrev.h"
/>
<Tool
Name="VCCustomBuildTool"

View File

@ -11,6 +11,13 @@ bool File::Exists(const std::string &filename)
#endif
}
bool File::IsDirectory(const std::string &filename) {
#ifdef _WIN32
return (GetFileAttributes(filename.c_str()) & FILE_ATTRIBUTE_DIRECTORY) != 0;
#else
return false; //TODO
#endif
}
std::string SanitizePath(const std::string &filename) {
std::string copy = filename;

View File

@ -9,6 +9,7 @@ public:
static bool Exists(const std::string &filename);
static void Launch(const std::string &filename);
static void Explore(const std::string &path);
static bool IsDirectory(const std::string &filename);
};
#endif

View File

@ -0,0 +1,2 @@
#define SVN_REV $WCREV$
#define SVN_REV_STR "$WCREV$"

Binary file not shown.

View File

@ -79,8 +79,8 @@ CBreakPointView::Update()
Refresh();
}
void CBreakPointView::DeleteCurrentSelection()
{
void CBreakPointView::DeleteCurrentSelection()
{
int Item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (Item >= 0)
{

View File

@ -76,7 +76,7 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
EVT_BUTTON(IDM_SETPC, CCodeWindow::OnCodeStep)
EVT_BUTTON(IDM_GOTOPC, CCodeWindow::OnCodeStep)
EVT_TEXT(IDM_ADDRBOX, CCodeWindow::OnAddrBoxChange)
EVT_LISTBOX(IDM_SYMBOLLIST, CCodeWindow::OnSymolListChange)
EVT_LISTBOX(IDM_SYMBOLLIST, CCodeWindow::OnSymbolListChange)
EVT_LISTBOX(IDM_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage)
EVT_MENU(IDM_LOGWINDOW, CCodeWindow::OnToggleLogWindow)
@ -411,7 +411,7 @@ void CCodeWindow::UpdateButtonStates()
}
void CCodeWindow::OnSymolListChange(wxCommandEvent& event)
void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
{
int index = symbols->GetSelection();
Debugger::CSymbol* pSymbol = static_cast<Debugger::CSymbol*>(symbols->GetClientData(index));

View File

@ -73,7 +73,7 @@ class CCodeWindow
wxTextCtrl* addrbox;
DECLARE_EVENT_TABLE()
void OnSymolListChange(wxCommandEvent& event);
void OnSymbolListChange(wxCommandEvent& event);
void OnCallstackListChange(wxCommandEvent& event);
void OnCodeStep(wxCommandEvent& event);
void OnAddrBoxChange(wxCommandEvent& event);

View File

@ -18,6 +18,7 @@
#include <vector>
#include <string>
#include "svnrev.h"
#include "CPUDetect.h"
#include "Globals.h"
#include "Common.h"
@ -86,8 +87,12 @@ bool DolphinApp::OnInit()
SConfig::GetInstance().LoadSettings();
wxInitAllImageHandlers();
// Create the main frame window
main_frame = new CFrame((wxFrame*) NULL, wxID_ANY,
_T("Dolphin"),
#ifdef _DEBUG
const char *title = "Dolphin Debug SVN R " SVN_REV_STR;
#else
const char *title = "Dolphin SVN R " SVN_REV_STR;
#endif
main_frame = new CFrame((wxFrame*) NULL, wxID_ANY, title,
wxPoint(100, 100), wxSize(800, 600));
// create debugger