Windows build fixes
[fio.git] / os / windows / dobuild.cmd
index 43e5db4dad43f581e21a7da3483192d4124d0e96..cbbe2cbced20e1cad7464b328394d8388b2b0419 100644 (file)
@@ -1,11 +1,9 @@
 @echo off\r
 setlocal enabledelayedexpansion\r
 @echo off\r
 setlocal enabledelayedexpansion\r
-set /a counter=4\r
-for /f "tokens=3" %%i in (..\..\fio_version.h) do (\r
- if "!counter!"=="4" set FIO_MAJOR=%%i\r
- if "!counter!"=="5" set FIO_MINOR=%%i\r
- if "!counter!"=="6" set FIO_PATCH=%%i\r
-set /a counter+=1\r
+set /a counter=1\r
+for /f "tokens=3" %%i in (..\..\FIO-VERSION-FILE) do (\r
+ if "!counter!"=="1" set FIO_VERSION=%%i\r
+ set /a counter+=1\r
 )\r
 \r
 if "%1"=="x86" set FIO_ARCH=x86\r
 )\r
 \r
 if "%1"=="x86" set FIO_ARCH=x86\r
@@ -22,5 +20,5 @@ if not defined FIO_ARCH (
 @if ERRORLEVEL 1 goto end\r
 "%WIX%bin\candle" -nologo -arch %FIO_ARCH% examples.wxs\r
 @if ERRORLEVEL 1 goto end\r
 @if ERRORLEVEL 1 goto end\r
 "%WIX%bin\candle" -nologo -arch %FIO_ARCH% examples.wxs\r
 @if ERRORLEVEL 1 goto end\r
-"%WIX%bin\light" -nologo install.wixobj examples.wixobj -ext WixUIExtension -out fio-%FIO_MAJOR%.%FIO_MINOR%.%FIO_PATCH%-%FIO_ARCH%.msi\r
+"%WIX%bin\light" -nologo install.wixobj examples.wixobj -ext WixUIExtension -out %FIO_VERSION%-%FIO_ARCH%.msi\r
 :end
\ No newline at end of file
 :end
\ No newline at end of file