Skip to content

Commit

Permalink
added revision number to movie format, and fixed avi splitting (for r…
Browse files Browse the repository at this point in the history
…eal)
  • Loading branch information
[email protected] committed Jul 18, 2011
1 parent 95b176c commit 55fd3d2
Show file tree
Hide file tree
Showing 12 changed files with 210 additions and 54 deletions.
29 changes: 29 additions & 0 deletions src/shared/SubWCRev/SubWCRev.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@REM this batch file has to be run from the directory the vproj is in. all the paths are relative to that.
@ECHO OFF
SETLOCAL enabledelayedexpansion
..\shared\SubWCRev\SubWCRev.exe .. "..\shared\SubWCRev\svnrev_template.h" "..\shared\svnrev_temp.h"
IF EXIST "..\shared\svnrev_temp.h" (
set text1=
for /f "delims=" %%i in (..\shared\svnrev_temp.h) do (
set text1=!text1!%%i
)
set text2=
IF EXIST "..\shared\svnrev.h" (
for /f "delims=" %%i in (..\shared\svnrev.h) do (
set text2=!text2!%%i
)
)
if !text1!==!text2! (
echo decided not to modify svnrev.h
DEL "..\shared\svnrev_temp.h"
) else (
IF EXIST "..\shared\svnrev.h" (
echo updated svnrev.h
) else (
echo generated svnrev.h
)
MOVE /Y "..\shared\svnrev_temp.h" "..\shared\svnrev.h"
)
)
ENDLOCAL
exit 0
Binary file added src/shared/SubWCRev/SubWCRev.exe
Binary file not shown.
Binary file added src/shared/SubWCRev/intl3_tsvn.dll
Binary file not shown.
Binary file added src/shared/SubWCRev/libapr_tsvn.dll
Binary file not shown.
Binary file added src/shared/SubWCRev/libaprutil_tsvn.dll
Binary file not shown.
4 changes: 4 additions & 0 deletions src/shared/SubWCRev/svnrev.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// this should be overridden by the one generated in the "shared" directory,
// but this fallback version is here just in case (to prevent compiler errors)
#define SRCVERSION -1
#define SRCVERSIONSTRING "-1"
2 changes: 2 additions & 0 deletions src/shared/SubWCRev/svnrev_template.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define SRCVERSION $WCREV$
#define SRCVERSIONSTRING "$WCREV$"
5 changes: 1 addition & 4 deletions src/shared/ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct TasFlags
int allowLoadInstalledDlls, allowLoadUxtheme;
int storeVideoMemoryInSavestates;
int appLocale;
unsigned int movieVersion;
LogCategoryFlag includeLogFlags;
LogCategoryFlag excludeLogFlags;
#ifdef _USRDLL
Expand Down Expand Up @@ -113,8 +114,4 @@ struct TrustedRangeInfos
#define SUCCESSFUL_EXITCODE 4242
#endif

// at a minimum, this should be incremented whenever a change is made
// that requires the DLL and EXE to be updated together.
#define SRCDLLVERSION 46

#endif // IPC_H_INCL
6 changes: 4 additions & 2 deletions src/wintasee/wintasee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <vector>
#include <algorithm>

#include "svnrev.h" // defines SRCVERSION number

#ifdef UNITY_BUILD
#undef UNITY_BUILD
Expand Down Expand Up @@ -1602,8 +1603,7 @@ BOOL APIENTRY DllMain( HMODULE hModule,
SoundDllMainInit();
ModuleDllMainInit();

// in case the TASer tool needs to single out a version of this DLL for some reason
cmdprintf("SRCDLLVERSION: %d", SRCDLLVERSION); // must send before the DLLVERSION
cmdprintf("SRCDLLVERSION: %d", SRCVERSION); // must send before the DLLVERSION
cmdprintf("DLLVERSION: %d.%d, %s", 0, __LINE__, __DATE__);

// tell it where to put commands
Expand Down Expand Up @@ -1694,6 +1694,8 @@ BOOL APIENTRY DllMain( HMODULE hModule,
// SetCPGlobal(LocaleToCodePage(tasflags.appLocale));
}

debugprintf("version = %d, movie version = %d\n", SRCVERSION, tasflags.movieVersion);

detTimer.Initialize(tasflags.initialTime);
nonDetTimer.Initialize(tasflags.initialTime);

Expand Down
18 changes: 14 additions & 4 deletions src/wintasee/wintasee2008.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="ensuring svnrev.h is up to date"
CommandLine="..\shared\SubWCRev\SubWCRev.bat"
ExcludedFromBuild="true"
/>
<Tool
Name="VCCustomBuildTool"
Expand All @@ -43,7 +46,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="/Oy-"
Optimization="0"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="..\shared;..\shared\SubWCRev"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WINTASDLL_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0500;WINVER=0x0501"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
Expand Down Expand Up @@ -109,6 +112,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="ensuring svnrev.h is up to date"
CommandLine="..\shared\SubWCRev\SubWCRev.bat"
/>
<Tool
Name="VCCustomBuildTool"
Expand All @@ -131,7 +136,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="false"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="..\shared;..\shared\SubWCRev"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WINTASDLL_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0500;WINVER=0x0501"
RuntimeLibrary="0"
BufferSecurityCheck="false"
Expand Down Expand Up @@ -198,6 +203,9 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="ensuring svnrev.h is up to date"
CommandLine="..\shared\SubWCRev\SubWCRev.bat"
ExcludedFromBuild="true"
/>
<Tool
Name="VCCustomBuildTool"
Expand All @@ -215,7 +223,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="/Oy-"
Optimization="0"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="..\shared;..\shared\SubWCRev"
PreprocessorDefinitions="UNITY_BUILD;WIN32;_DEBUG;_WINDOWS;_USRDLL;WINTASDLL_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0500;WINVER=0x0501"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
Expand Down Expand Up @@ -282,6 +290,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="ensuring svnrev.h is up to date"
CommandLine="..\shared\SubWCRev\SubWCRev.bat"
/>
<Tool
Name="VCCustomBuildTool"
Expand All @@ -304,7 +314,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="false"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="..\shared;..\shared\SubWCRev"
PreprocessorDefinitions="UNITY_BUILD;WIN32;NDEBUG;_WINDOWS;_USRDLL;WINTASDLL_EXPORTS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0500;WINVER=0x0501"
RuntimeLibrary="0"
BufferSecurityCheck="false"
Expand Down
Loading

0 comments on commit 55fd3d2

Please sign in to comment.