Merge pull request #2297 from akoeplinger/msvc-autoupdate-config.h
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 8 Dec 2015 22:54:10 +0000 (23:54 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 8 Dec 2015 22:54:10 +0000 (23:54 +0100)
[msvc] Automatically update (win-)config.h with the correct version number

msvc/.gitignore
msvc/winsetup.bat
winconfig.h

index 13fa9cfd9ef4a5bf862dab11a461941741707644..486f7866be2d0b45c247cbe011dae9bbe459afc0 100644 (file)
@@ -6,4 +6,5 @@
 /*.opensdf
 /ipch/
 /Win32/
-/x64/
\ No newline at end of file
+/x64/
+/include/
\ No newline at end of file
index f67a854569327dcbd8fb0d344ea2ed97de89c1f3..336778204f2a5dc3507a880bef2062e5bd669801 100755 (executable)
@@ -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
index 21f4fe7b1bb0a019a19265b46e40519a8c3dccde..64c8ba1b3a5247a7838b3b82d6bf093759bd9f86 100644 (file)
 /* #undef USE_MONO_MUTEX */
 
 /* Version number of package */
-#define VERSION "4.1.0"
+#define VERSION "#MONO_VERSION#"
 #endif