SPU2ghz: Compiling without TortoiseSVN installed should work out-of-the-box now. The project will automatically fall back on the old-school behavior (no revision information inserted into the project info).

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@305 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
Jake.Stine 2008-11-06 02:53:54 +00:00 committed by Gregory Hainaut
parent 29bf736daa
commit 6930ed533c
6 changed files with 116 additions and 13 deletions

23
common/svnrev_generic.h Normal file
View File

@ -0,0 +1,23 @@
// svnrev_unknown.h --> svnrev.h
//
// This file acts as a placebo for people who do not have TortoiseSVN installed.
// It provides "empty" revision information to the Pcsx2 Playground projects in
// the absence of real revisions derived from the repository being built.
//
// This file does not affect application/dll builds in any significant manner,
// other than the lack of automatic revision tags inserted into the app (which
// is very convenient but hardly necessary).
//
// See svn_template.h for more information on how the process of revision
// templating works.
//
// If you would like to enable automatic revisin tagging, TortoiseSVN can be
// downloaded from http://tortoisesvn.tigris.org
#define SVN_REV_UNKNOWN
// The following defines are included so that code will still compile even if it
// doesn't check for the SVN_REV_UNKNOWN define.
#define SVN_REV 0
#define SVN_MODS ""

View File

@ -1,2 +1,18 @@
// svnrev_template.h --> svnrev.h
//
// This file acts as a template for the automatic SVN revision/version tag.
// It is used by the utility SubWCrev.exe to create an "svnrev.h" file for
// whichever project is being compiled (as indicated by command line options
// passed to SubWCRev.exe during the project's pre-build step).
//
// The SubWCRev.exe utility is part of TortoiseSVN and requires several DLLs
// installed by TortoiseSVN, so it will only be available if you have TortoiseSVN
// installed on your system. If you do not have it installed, a generic template
// is used instead (see svnrev_generic.h). Having TortoiseSVN is handy but not
// necessary. If you do not have it installed, everything will still compile
// fine except without the SVN revision tagged to the application/dll version.
//
// TortoiseSVN can be downloaded from http://tortoisesvn.tigris.org
#define SVN_REV $WCREV$
#define SVN_MODS $WCMODS?1:0$

23
common/svnrev_unknown.h Normal file
View File

@ -0,0 +1,23 @@
// svnrev_genric.h --> svnrev.h
//
// This file acts as a placebo for people who do not have TortoiseSVN installed.
// It provides "empty" revision information to the Pcsx2 Playground projects in
// the absence of real revisions derived from the repository being built.
//
// This file does not affect application/dll builds in any significant manner,
// other than the lack of automatic revision tags inserted into the app (which
// is very convenient but hardly necessary).
//
// See svn_template.h for more information on how the process of revision
// templating works.
//
// If you would like to enable automatic revisin tagging, TortoiseSVN can be
// downloaded from http://tortoisesvn.tigris.org
#define SVN_REV_UNKNOWN
// The following defines are included so that code will still compile even if it
// doesn't check for the SVN_REV_UNKNOWN define.
#define SVN_REV 0
#define SVN_MODS ""

10
common/updateRevision.cmd Normal file
View File

@ -0,0 +1,10 @@
@echo off
echo %1 %2 %3\svnrev_template.h %2\svnrev.h
%1 %2 %3\svnrev_template.h %2\svnrev.h
if not ERRORLEVEL 0 (
echo Automatic revision update unavailable, using generic template instead.
echo You can safely ignore this message - see svnrev.h for details.
copy /Y %3\svnrev_unknown.h %2\svnrev.h
)
set ERRORLEVEL=0

View File

@ -27,7 +27,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(SolutionDir)..\common\SubWCRev.exe $(ProjectDir) &quot;$(SolutionDir)..\common\svnrev_template.h&quot; &quot;$(ProjectDir)svnrev.h&quot;"
CommandLine="$(SolutionDir)..\common\updateRevision.cmd &quot;$(SolutionDir)..\common\SubWCRev.exe&quot; &quot;$(ProjectDir)\&quot; &quot;$(SolutionDir)..\common&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -133,7 +133,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(SolutionDir)..\common\SubWCRev.exe $(ProjectDir) &quot;$(SolutionDir)..\common\svnrev_template.h&quot; &quot;$(ProjectDir)svnrev.h&quot;"
CommandLine="$(SolutionDir)..\common\updateRevision.cmd &quot;$(SolutionDir)..\common\SubWCRev.exe&quot; &quot;$(ProjectDir)\&quot; &quot;$(SolutionDir)..\common&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -231,7 +231,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(SolutionDir)..\common\SubWCRev.exe $(ProjectDir) &quot;$(SolutionDir)..\common\svnrev_template.h&quot; &quot;$(ProjectDir)svnrev.h&quot;"
CommandLine="$(SolutionDir)..\common\updateRevision.cmd &quot;$(SolutionDir)..\common\SubWCRev.exe&quot; &quot;$(ProjectDir)\&quot; &quot;$(SolutionDir)..\common&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -340,7 +340,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(SolutionDir)..\common\SubWCRev.exe $(ProjectDir) &quot;$(SolutionDir)..\common\svnrev_template.h&quot; &quot;$(ProjectDir)svnrev.h&quot;"
CommandLine="$(SolutionDir)..\common\updateRevision.cmd &quot;$(SolutionDir)..\common\SubWCRev.exe&quot; &quot;$(ProjectDir)\&quot; &quot;$(SolutionDir)..\common&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -437,7 +437,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(SolutionDir)..\common\SubWCRev.exe $(ProjectDir) &quot;$(SolutionDir)..\common\svnrev_template.h&quot; &quot;$(ProjectDir)svnrev.h&quot;"
CommandLine="$(SolutionDir)..\common\updateRevision.cmd &quot;$(SolutionDir)..\common\SubWCRev.exe&quot; &quot;$(ProjectDir)\&quot; &quot;$(SolutionDir)..\common&quot;"
/>
<Tool
Name="VCCustomBuildTool"

View File

@ -130,15 +130,46 @@ void SysMessage(char *fmt, ...)
static void InitLibraryName()
{
sprintf_s( libraryName, 256, "GiGaHeRz SPU2 PPr %d%s"
#ifdef _DEBUG
#ifdef PUBLIC
// Public Release!
// Output a simplified string that's just our name:
strcpy( libraryName, "SPU2ghz Playground" );
#elif defined( SVN_REV_UNKNOWN )
// Unknown revision.
// Output a name that includes devbuild status but not
// subversion revision tags:
strcpy( libraryName, "SPU2ghz Playground"
# ifdef _DEBUG_FAST
"-Debug"
#elif !defined( PUBLIC )
# elif defined( DEBUG )
"-Debug/Strict" // strict debugging is slow!
# else
"-Dev"
#endif
# endif
);
#else
// Use TortoiseSVN's SubWCRev utility's output
// to label the specific revision:
sprintf_s( libraryName, 256, "SPU2ghz PPr %d%s"
# ifdef _DEBUG_FAST
"-Debug"
# elif defined( _DEBUG )
"-Debug/Strict" // strict debugging is slow!
# else
"-Dev"
# endif
,SVN_REV,
SVN_MODS ? "m" : ""
);
#endif
}
EXPORT_C_(u32) PS2EgetLibType()
@ -173,7 +204,7 @@ EXPORT_C_(s32) SPU2test() {
__forceinline s16 * __fastcall GetMemPtr(u32 addr)
{
#ifndef DEBUG_FAST
#ifndef _DEBUG_FAST
// In case you're wondering, this assert is the reason spu2ghz
// runs so incrediously slow in Debug mode. :P
assert(addr<0x100000);
@ -676,10 +707,10 @@ void __fastcall TimeUpdate(u32 cClocks, u32 syncType)
// If for some reason our clock value seems way off base, just mix
// out a little bit, skip the rest, and hope the ship "rights" itself later on.
if( dClocks > TickInterval*72 )
if( dClocks > TickInterval*96 )
{
ConLog( " * SPU2 > TimeUpdate Sanity Check (Tick Delta: %d) (PS2 Ticks: %d)\n", dClocks/TickInterval, cClocks/TickInterval );
dClocks = TickInterval*72;
dClocks = TickInterval*96;
lClocks = cClocks-dClocks;
}
@ -737,7 +768,7 @@ void __fastcall TimeUpdate(u32 cClocks, u32 syncType)
{
Cores[1].MADR=Cores[1].TADR;
Cores[1].DMAICounter=0;
ConLog( "* SPU2 > AutoDMA 7 Callback! %d\n", Cycles );
//ConLog( "* SPU2 > DMA 7 Callback! %d\n", Cycles );
if(dma7callback) dma7callback();
}
else {