mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Revert changes made for 3.0 release
This commit is contained in:
@ -4,6 +4,17 @@ Import('env')
|
||||
import os
|
||||
import sys
|
||||
|
||||
def createVersion(env, target, source):
|
||||
tmpstr = open(source[0].path, 'r').read().\
|
||||
replace("$WCMODS?$WCREV$M:$WCREV$$", env['svnrev'])
|
||||
outfile = open(target[0].path, 'w')
|
||||
outfile.write(tmpstr + '\n')
|
||||
outfile.close()
|
||||
|
||||
Execute(Delete('Src/svnrev.h'))
|
||||
env.Command('Src/svnrev.h', 'Src/svnrev_template.h',
|
||||
[Delete('${TARGET.srcpath}'), createVersion])
|
||||
|
||||
files = [
|
||||
'Src/ABI.cpp',
|
||||
'Src/BreakPoints.cpp',
|
||||
|
63
Source/Core/Common/SVNRevGen.vcxproj
Normal file
63
Source/Core/Common/SVNRevGen.vcxproj
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="make_svnrev.h.js">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cscript /nologo /E:JScript "make_svnrev.h.js"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Updating svnrev.h</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">dummy</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Src\svnrev.h" />
|
||||
<ClInclude Include="Src\svnrev_template.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{69F00340-5C3D-449F-9A80-958435C6CF06}</ProjectGuid>
|
||||
<RootNamespace>SVNRevGen</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<CustomBuild>
|
||||
<Outputs>
|
||||
</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -19,11 +19,11 @@
|
||||
#include "svnrev.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
const char *svn_rev_str = "Dolphin Debug " SVN_REV_STR;
|
||||
const char *svn_rev_str = "Dolphin Debug r" SVN_REV_STR;
|
||||
#elif defined DEBUGFAST
|
||||
const char *svn_rev_str = "Dolphin Debugfast " SVN_REV_STR;
|
||||
const char *svn_rev_str = "Dolphin Debugfast r" SVN_REV_STR;
|
||||
#else
|
||||
const char *svn_rev_str = "Dolphin " SVN_REV_STR;
|
||||
const char *svn_rev_str = "Dolphin r" SVN_REV_STR;
|
||||
#endif
|
||||
|
||||
#ifdef _M_X64
|
||||
|
@ -1 +0,0 @@
|
||||
#define SVN_REV_STR "3.0"
|
1
Source/Core/Common/Src/svnrev_template.h
Normal file
1
Source/Core/Common/Src/svnrev_template.h
Normal file
@ -0,0 +1 @@
|
||||
#define SVN_REV_STR "$WCMODS?$WCREV$M:$WCREV$$"
|
BIN
Source/Core/Common/SubWCRev.exe
Normal file
BIN
Source/Core/Common/SubWCRev.exe
Normal file
Binary file not shown.
79
Source/Core/Common/make_svnrev.h.js
Normal file
79
Source/Core/Common/make_svnrev.h.js
Normal file
@ -0,0 +1,79 @@
|
||||
var wshShell = new ActiveXObject("WScript.Shell")
|
||||
var oFS = new ActiveXObject("Scripting.FileSystemObject");
|
||||
|
||||
var outfile = "./Src/svnrev.h";
|
||||
var svncmd = "SubWCRev ../../.. ./Src/svnrev_template.h " + outfile;
|
||||
var svntestcmd = "SubWCRev ../../..";
|
||||
var hgcmd = "hg svn info";
|
||||
|
||||
var SVN = 1, HG = 2;
|
||||
var file_rev = 0, cur_rev = 0, cur_cms = 0;
|
||||
|
||||
function RunCmdGetMatch(cmd, regex)
|
||||
{
|
||||
// run the command
|
||||
try
|
||||
{
|
||||
var cmdexec = wshShell.Exec(cmd);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// catch "the system cannot find the file specified" error
|
||||
return 0;
|
||||
}
|
||||
// ReadLine is synchronous
|
||||
while (!cmdexec.StdOut.AtEndOfStream)
|
||||
{
|
||||
var reg_exec = regex.exec(cmdexec.StdOut.ReadLine())
|
||||
if (reg_exec)
|
||||
return reg_exec[1]; // return first capture group
|
||||
}
|
||||
// failed
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (oFS.FileExists(outfile))
|
||||
{
|
||||
// file exists, read the value of SVN_REV_STR
|
||||
file_rev = oFS.OpenTextFile(outfile).ReadLine().match(/\d+/);
|
||||
}
|
||||
else
|
||||
{
|
||||
// file doesn't exist, create it
|
||||
oFS.CreateTextFile(outfile);
|
||||
}
|
||||
|
||||
// get the "Last commited at revision" from SubWCRev's output
|
||||
cur_rev = RunCmdGetMatch(svntestcmd, /^Last .*?(\d+)/);
|
||||
if (cur_rev)
|
||||
cur_cms = SVN;
|
||||
else
|
||||
{
|
||||
// SubWCRev failed, so use hg
|
||||
cur_rev = RunCmdGetMatch(hgcmd, /Revision.*?(\d+)/);
|
||||
if (cur_rev)
|
||||
cur_cms = HG;
|
||||
else
|
||||
{
|
||||
WScript.Echo("Neither SVN or Hg revision info found!");
|
||||
WScript.Quit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// check if svnrev.h needs updating
|
||||
if (cur_rev == file_rev)
|
||||
{
|
||||
WScript.Echo("svnrev.h doesn't need updating (already at " + cur_rev + ")");
|
||||
WScript.Quit(0);
|
||||
}
|
||||
else if (cur_cms == SVN)
|
||||
{
|
||||
// update using SubWCRev and template file
|
||||
var ret = wshShell.run(svncmd, 0, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// manually create the file
|
||||
oFS.CreateTextFile(outfile, true).WriteLine("#define SVN_REV_STR \"" + cur_rev + "\"");
|
||||
}
|
||||
WScript.Echo("svnrev.h updated (" + cur_rev + ")");
|
Reference in New Issue
Block a user