From b4ce9c90b6a32e0cccfec528e74fae5e92f21776 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Thu, 22 Jul 2010 02:46:11 +0000 Subject: [PATCH] make generation of svnrev.h slightly more sane, by using vbscript instead of just batch script. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5932 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Common.vcproj | 12 ++++++------ Source/Core/Common/make_svnrev.h.vbs | 26 ++++++++++++++++++++++++++ Source/Core/DolphinWX/DolphinWX.vcproj | 12 ++++++------ 3 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 Source/Core/Common/make_svnrev.h.vbs diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj index bed43ae333..17fbd6de64 100644 --- a/Source/Core/Common/Common.vcproj +++ b/Source/Core/Common/Common.vcproj @@ -29,7 +29,7 @@ > 0 then ' Perhaps we should just check for 6? dunno/care... + set hgexec = wshShell.exec(hgcmd) + do while hgexec.status = 0 : wscript.sleep 100 : loop + do while true + line = hgexec.stdout.readline + if instr(line, "Revision") then + sline = split(line) + wscript.echo "Hg: Working copy at SVN revision " & sline(1) + set oFS = CreateObject("Scripting.fileSystemObject") + set oFile = oFS.CreateTextFile(outfile, true) + oFile.writeline("#define SVN_REV_STR """ & sline(1) & """") + set oFS = nothing + exit do + end if + if hgexec.stdout.atEndofStream then + wscript.echo "Neither SVN or Hg revision info found!" + wscript.quit 1 + end if + loop +end if diff --git a/Source/Core/DolphinWX/DolphinWX.vcproj b/Source/Core/DolphinWX/DolphinWX.vcproj index dad6f0f115..b2561681db 100644 --- a/Source/Core/DolphinWX/DolphinWX.vcproj +++ b/Source/Core/DolphinWX/DolphinWX.vcproj @@ -30,7 +30,7 @@ >