Update the examples filenames in the Windows installer.
[fio.git] / os / windows / dobuild.cmd
old mode 100755 (executable)
new mode 100644 (file)
index fa855a2..166578a
@@ -1,4 +1,24 @@
-"%WIX%\bin\candle" cygwin.wxs\r
-"%WIX%\bin\candle" install.wxs\r
-"%WIX%\bin\candle" examples.wxs\r
-"%WIX%\bin\light" install.wixobj cygwin.wixobj examples.wixobj -ext WixUIExtension -out fio.msi
\ No newline at end of file
+@echo off\r
+setlocal enabledelayedexpansion\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
+if "%1"=="x64" set FIO_ARCH=x64\r
+\r
+if not defined FIO_ARCH (\r
+  echo Error: must specify the architecture.\r
+  echo Usage: dobuild x86\r
+  echo Usage: dobuild x64\r
+  goto end\r
+)\r
+\r
+"%WIX%bin\candle" -nologo -arch %FIO_ARCH% install.wxs\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 -sice:61 install.wixobj examples.wixobj -ext WixUIExtension -out %FIO_VERSION%-%FIO_ARCH%.msi\r
+:end
\ No newline at end of file