diff options
| author | NeoBrainX <NeoBrainX@googlemail.com> | 2011-06-23 23:11:12 +0000 |
|---|---|---|
| committer | NeoBrainX <NeoBrainX@googlemail.com> | 2011-06-23 23:11:12 +0000 |
| commit | 35d1599724a4c41d0c93e4cbf05ba109feaa969c (patch) | |
| tree | e61bb32980e578915289b1f0f577d1a441c5b7ac /Source/Core/Common/make_svnrev.h.js | |
| parent | 2d1fef29892720b72bd4c20098a46679d2f08474 (diff) | |
Tag Dolphin 3.03.0
git-svn-id: https://dolphin-emu.googlecode.com/svn/tags/3.0@7615 8ced0084-cf51-0410-be5f-012b33b47a6e
3.0: Removed SVNRevGen stuff; changed revision string to 3.0; Removed installer since it was vastly outdated; Bumped CMake major version to 3
git-svn-id: https://dolphin-emu.googlecode.com/svn/tags/3.0@7616 8ced0084-cf51-0410-be5f-012b33b47a6e
3.0: Add the languages which were chosen to be release-worthy.
Uhm, unless I forgot something important, I guess we can declare 3.0 as officially released now and stuff. Cheers ;)
git-svn-id: https://dolphin-emu.googlecode.com/svn/tags/3.0@7617 8ced0084-cf51-0410-be5f-012b33b47a6e
3.0: Fix SCons build
git-svn-id: https://dolphin-emu.googlecode.com/svn/tags/3.0@7627 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/make_svnrev.h.js')
| -rw-r--r-- | Source/Core/Common/make_svnrev.h.js | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/Source/Core/Common/make_svnrev.h.js b/Source/Core/Common/make_svnrev.h.js deleted file mode 100644 index 38bcda312a..0000000000 --- a/Source/Core/Common/make_svnrev.h.js +++ /dev/null @@ -1,79 +0,0 @@ -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 + ")");
\ No newline at end of file |
