add svnrev.h to linux
solves issue 93 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@780 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
407bd39d8b
commit
6336af92a1
|
@ -64,7 +64,7 @@ dirs = [
|
||||||
'Source/Core/VideoCommon/Src',
|
'Source/Core/VideoCommon/Src',
|
||||||
'Source/Plugins/Plugin_VideoOGL/Src',
|
'Source/Plugins/Plugin_VideoOGL/Src',
|
||||||
'Source/Plugins/Plugin_DSP_HLE/Src',
|
'Source/Plugins/Plugin_DSP_HLE/Src',
|
||||||
# 'Source/Plugins/Plugin_DSP_LLE/Src',
|
'Source/Plugins/Plugin_DSP_LLE/Src',
|
||||||
'Source/Plugins/Plugin_DSP_NULL/Src',
|
'Source/Plugins/Plugin_DSP_NULL/Src',
|
||||||
'Source/Plugins/Plugin_PadSimple/Src',
|
'Source/Plugins/Plugin_PadSimple/Src',
|
||||||
'Source/Plugins/Plugin_nJoy_SDL/Src',
|
'Source/Plugins/Plugin_nJoy_SDL/Src',
|
||||||
|
@ -142,7 +142,6 @@ elif (flavour == 'devel'):
|
||||||
else:
|
else:
|
||||||
compileFlags.append('-O3')
|
compileFlags.append('-O3')
|
||||||
|
|
||||||
|
|
||||||
# more warnings
|
# more warnings
|
||||||
if env['lint']:
|
if env['lint']:
|
||||||
warnings.append('error')
|
warnings.append('error')
|
||||||
|
@ -203,6 +202,8 @@ env.AddMethod(utils.filterWarnings)
|
||||||
|
|
||||||
Export('env')
|
Export('env')
|
||||||
|
|
||||||
|
utils.GenerateRevFile(env['flavor'], "Source/Core/Common/Src/svnrev_template.h",
|
||||||
|
"Source/Core/Common/Src/svnrev.h")
|
||||||
# print a nice progress indication when not compiling
|
# print a nice progress indication when not compiling
|
||||||
Progress(['-\r', '\\\r', '|\r', '/\r'], interval = 5)
|
Progress(['-\r', '\\\r', '|\r', '/\r'], interval = 5)
|
||||||
|
|
||||||
|
|
|
@ -35,3 +35,20 @@ def CheckSDL(context, version):
|
||||||
|
|
||||||
context.Result( ret )
|
context.Result( ret )
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
def GenerateRevFile(flavour, template, output):
|
||||||
|
|
||||||
|
try:
|
||||||
|
svnrev = os.popen('svnversion .').read().strip().split(':')[0]
|
||||||
|
except:
|
||||||
|
svnrev = ""
|
||||||
|
|
||||||
|
revstr = svnrev + "-" + flavour
|
||||||
|
tmpstr = open(template, "r").read().replace("$WCREV$",revstr)
|
||||||
|
template.close()
|
||||||
|
|
||||||
|
outfile = open(output, 'w')
|
||||||
|
outfile.write(tmpstr +"\n")
|
||||||
|
outfile.close()
|
||||||
|
|
||||||
|
return
|
||||||
|
|
|
@ -17,8 +17,9 @@
|
||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
#if defined(_WIN32)
|
|
||||||
#include "svnrev.h"
|
#include "svnrev.h"
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
#include "OS/Win32.h"
|
#include "OS/Win32.h"
|
||||||
#endif
|
#endif
|
||||||
#include "GLInit.h"
|
#include "GLInit.h"
|
||||||
|
@ -101,16 +102,13 @@ BOOL Callback_PeekMessages()
|
||||||
|
|
||||||
void UpdateFPSDisplay(const char *text)
|
void UpdateFPSDisplay(const char *text)
|
||||||
{
|
{
|
||||||
|
char temp[512];
|
||||||
|
sprintf(temp, "SVN R%s: GL: %s", SVN_REV_STR, text);
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
char temp[512];
|
|
||||||
sprintf(temp, "SVN R%i: GL: %s", SVN_REV, text);
|
|
||||||
SetWindowText(EmuWindow::GetWnd(), temp);
|
SetWindowText(EmuWindow::GetWnd(), temp);
|
||||||
OpenGL_SetWindowText(temp);
|
|
||||||
#else
|
|
||||||
char temp[512];
|
|
||||||
sprintf(temp, "SVN %s: GL: %s", "Linux", text); //TODO: Set to svn rev //
|
|
||||||
OpenGL_SetWindowText(temp);
|
|
||||||
#endif
|
#endif
|
||||||
|
OpenGL_SetWindowText(temp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue