windows: minor windows installer improvements
authorSitsofe Wheeler <sitsofe@yahoo.com>
Wed, 21 Feb 2018 14:41:14 +0000 (14:41 +0000)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Wed, 21 Feb 2018 19:04:34 +0000 (19:04 +0000)
- Stop hard coding fio version in the Windows installer build file and try and
  use the generated version instead
- Make installer build use sys.BUILDARCH rather than env.FIO_ARCH
- Change IO to I/O in descriptions to match other packages

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
os/windows/dobuild.cmd
os/windows/eula.rtf
os/windows/install.wxs

index fd54a9c..ef12d82 100644 (file)
@@ -6,6 +6,16 @@ for /f "tokens=3" %%i in (..\..\FIO-VERSION-FILE) do (
  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
 if "%1"=="x64" set FIO_ARCH=x64\r
 \r
@@ -16,7 +26,7 @@ if not defined FIO_ARCH (
   goto end\r
 )\r
 \r
-"%WIX%bin\candle" -nologo -arch %FIO_ARCH% install.wxs\r
+"%WIX%bin\candle" -nologo -arch %FIO_ARCH% -dFioVersionNumbers="%FIO_VERSION_NUMBERS%" 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
index 1c92932..b2798bb 100755 (executable)
Binary files a/os/windows/eula.rtf and b/os/windows/eula.rtf differ
index 577af55..73b2810 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
 
-       <?if $(env.FIO_ARCH) = x86 ?>
+       <?if $(sys.BUILDARCH) = x86 ?>
                <?define ProgramDirectory = ProgramFilesFolder ?>
        <?else?>
                <?define ProgramDirectory = ProgramFiles64Folder ?>
@@ -10,9 +10,9 @@
        <Product Id="*"
          Codepage="1252" Language="1033"
          Manufacturer="fio" Name="fio"
-         UpgradeCode="2338A332-5511-43CF-B9BD-5C60496CCFCC" Version="3.5">
+         UpgradeCode="2338A332-5511-43CF-B9BD-5C60496CCFCC" Version="$(var.FioVersionNumbers)">
                <Package
-                 Description="Flexible IO Tester"
+                 Description="Flexible I/O Tester"
                  InstallerVersion="301" Keywords="Installer,MSI,Database"
                  Languages="1033" Manufacturer="fio"
                  InstallScope="perMachine" InstallPrivileges="elevated" Compressed="yes"/>
@@ -48,7 +48,7 @@
                        </Directory>
        </Directory>
 
-       <Feature Id="AlwaysInstall" Absent="disallow" ConfigurableDirectory="INSTALLDIR" Display="hidden" Level="1" Title="Flexible IO Tester">
+       <Feature Id="AlwaysInstall" Absent="disallow" ConfigurableDirectory="INSTALLDIR" Display="hidden" Level="1" Title="Flexible I/O Tester">
                <ComponentRef Id="fio.exe"/>
                <ComponentRef Id="HOWTO"/>
                <ComponentRef Id="README"/>