docs: update for new data placement options
[fio.git] / os / windows / dobuild.cmd
index 43e5db4dad43f581e21a7da3483192d4124d0e96..7b9cb1ddad95d62713323fc7e3b1149a2fdec8e4 100644 (file)
@@ -1,11 +1,19 @@
 @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
+for /f "tokens=2 delims=-" %%i in ("%FIO_VERSION%") do (\r
+ set FIO_VERSION_NUMBERS=%%i\r
+)\r
+\r
+if not defined FIO_VERSION_NUMBERS (\r
+  echo Could not find version numbers in the string '%FIO_VERSION%'\r
+  echo Expected version to follow format 'fio-^([0-9]+.[0-9.]+^)'\r
+  goto end\r
 )\r
 \r
 if "%1"=="x86" set FIO_ARCH=x86\r
@@ -18,9 +26,30 @@ if not defined FIO_ARCH (
   goto end\r
 )\r
 \r
-"%WIX%bin\candle" -nologo -arch %FIO_ARCH% install.wxs\r
+if defined SIGN_FIO (\r
+  signtool sign /n "%SIGNING_CN%" /t http://timestamp.digicert.com ..\..\fio.exe\r
+  signtool sign /as /n "%SIGNING_CN%" /tr http://timestamp.digicert.com /td sha256 /fd sha256 ..\..\fio.exe\r
+\r
+  signtool sign /n "%SIGNING_CN%" /t http://timestamp.digicert.com ..\..\t\*.exe\r
+  signtool sign /as /n "%SIGNING_CN%" /tr http://timestamp.digicert.com /td sha256 /fd sha256 ..\..\t\*.exe\r
+)\r
+\r
+if exist ..\..\fio.pdb (\r
+  set FIO_PDB=true\r
+) else (\r
+  set FIO_PDB=false\r
+)\r
+\r
+"%WIX%bin\candle" -nologo -arch %FIO_ARCH% -dFioVersionNumbers="%FIO_VERSION_NUMBERS%" -dFioPDB="%FIO_PDB%" 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 install.wixobj examples.wixobj -ext WixUIExtension -out fio-%FIO_MAJOR%.%FIO_MINOR%.%FIO_PATCH%-%FIO_ARCH%.msi\r
-:end
\ No newline at end of file
+"%WIX%bin\candle" -nologo -arch %FIO_ARCH% WixUI_Minimal_NoEULA.wxs\r
+@if ERRORLEVEL 1 goto end\r
+\r
+"%WIX%bin\light" -nologo -sice:ICE61 install.wixobj examples.wixobj WixUI_Minimal_NoEULA.wixobj -loc WixUI_fio.wxl -ext WixUIExtension -out %FIO_VERSION%-%FIO_ARCH%.msi\r
+:end\r
+\r
+if defined SIGN_FIO (\r
+  signtool sign /n "%SIGNING_CN%" /tr http://timestamp.digicert.com /td sha256 /fd sha256 %FIO_VERSION%-%FIO_ARCH%.msi\r
+)\r