From 8d50b4f3c695935496f64b4a29a47709516bb2af Mon Sep 17 00:00:00 2001 From: Joshua Milas Date: Sun, 22 Jun 2014 20:24:48 -0600 Subject: [PATCH] Added ~ to the arguments of genversion.bat genversion.bat would fail if an argument was passed with quotations. This is because the quotations were not being stripped before using them as variables, causing the _temp files not being created. Adding the ~ to to the arguments causes windows to strip the quotations, enabling it to be used with path names containing spaces and the MSVS pre-build event. --- win32/genversion.bat | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/win32/genversion.bat b/win32/genversion.bat index a9b9353..cd1d4dc 100644 --- a/win32/genversion.bat +++ b/win32/genversion.bat @@ -23,10 +23,10 @@ set version=!version: =! :gotversion -set version_out=#define %2 "%version%" -set version_mk=%2 = "%version%" +set version_out=#define %~2 "%version%" +set version_mk=%~2 = "%version%" -echo %version_out%> "%1_temp" +echo %version_out%> "%~1_temp" if %version%==unknown goto :skipgenerate @@ -35,12 +35,12 @@ echo %version_mk%>> "%~dp0..\version.mk" :skipgenerate -echo n | comp "%1_temp" "%1" > NUL 2> NUL +echo n | comp "%~1_temp" "%~1" > NUL 2> NUL if not errorlevel 1 goto exit -copy /y "%1_temp" "%1" +copy /y "%~1_temp" "%~1" :exit -del "%1_temp" +del "%~1_temp" -- 1.8.4.msysgit.0