From 361691c2a6bb658d2e623375eb84fe906df09112 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexander=20K=C3=B6plinger?= Date: Mon, 7 Dec 2015 02:16:54 +0100 Subject: [PATCH] [msvc] Automatically update (win-)config.h with the correct version number A small powershell command grabs the version number from configure.ac and uses it during winsetup.bat, this way we don't have to manually keep them in sync. --- msvc/winsetup.bat | 1 + winconfig.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/msvc/winsetup.bat b/msvc/winsetup.bat index f67a8545693..336778204f2 100755 --- a/msvc/winsetup.bat +++ b/msvc/winsetup.bat @@ -4,6 +4,7 @@ if exist config.h if not exist cygconfig.h copy config.h cygconfig.h if exist eglib\config.h if not exist eglib\cygconfig.h copy eglib\config.h eglib\cygconfig.h copy winconfig.h config.h copy eglib\winconfig.h eglib\config.h +powershell -Command "(Get-Content config.h) -replace '#MONO_VERSION#', (Select-String -path configure.ac -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value | Set-Content config.h" goto end :error echo fatal error: the VSDepenancies directory was not found in the "mono" directory diff --git a/winconfig.h b/winconfig.h index 21f4fe7b1bb..64c8ba1b3a5 100644 --- a/winconfig.h +++ b/winconfig.h @@ -645,5 +645,5 @@ /* #undef USE_MONO_MUTEX */ /* Version number of package */ -#define VERSION "4.1.0" +#define VERSION "#MONO_VERSION#" #endif -- 2.25.1