Commit bb4b6885 authored by Joshua Milas's avatar Joshua Milas Committed by Ralph Giles

Add ~ 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 ~ 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.
Signed-off-by: default avatarRalph Giles <>
parent 7b8ae17a
......@@ -23,10 +23,10 @@ set version=!version: =!
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..\"
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"
del "%1_temp"
del "%~1_temp"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment