Merge branch 'win_build' of https://github.com/sitsofe/fio
authorJens Axboe <axboe@kernel.dk>
Wed, 28 Feb 2018 16:44:08 +0000 (09:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Feb 2018 16:44:08 +0000 (09:44 -0700)
* 'win_build' of https://github.com/sitsofe/fio:
  windows: document MinGW zlib install and remove custom zlib search
  windows: minor windows installer improvements
  appveyor: minor refactoring, clarifications

README
appveyor.yml
configure
os/windows/dobuild.cmd
os/windows/eula.rtf
os/windows/install.wxs

diff --git a/README b/README
index fc28b165ac1d96582396b897b4e968682402f412..fba5f102c1f74d589a820f938c87032d54cceb89 100644 (file)
--- a/README
+++ b/README
@@ -172,7 +172,9 @@ directory.
 How to compile fio on 64-bit Windows:
 
  1. Install Cygwin (http://www.cygwin.com/). Install **make** and all
-    packages starting with **mingw64-i686** and **mingw64-x86_64**.
+    packages starting with **mingw64-i686** and **mingw64-x86_64**. Ensure
+    **mingw64-i686-zlib** and **mingw64-x86_64-zlib** are installed if you wish
+    to enable fio's log compression functionality.
  2. Open the Cygwin Terminal.
  3. Go to the fio directory (source files).
  4. Run ``make clean && make -j``.
index 844afa59227380256a94cd287ecf0df61469a153..c6c36893931af8dd58109617e75a8003f1152b60 100644 (file)
@@ -1,30 +1,28 @@
-clone_depth: 1
+clone_depth: 1 # NB: this stops FIO-VERSION-GEN making tag based versions
+
 environment:
   CYG_MIRROR: http://cygwin.mirror.constant.com
   CYG_ROOT: C:\cygwin64
   MAKEFLAGS: -j 2
   matrix:
-    - platform: x86_64
-      BUILD_ARCH: x64
+    - platform: x64
       PACKAGE_ARCH: x86_64
       CONFIGURE_OPTIONS:
     - platform: x86
-      BUILD_ARCH: x86
       PACKAGE_ARCH: i686
       CONFIGURE_OPTIONS: --build-32bit-win
 
 install:
   - '%CYG_ROOT%\setup-x86_64.exe --quiet-mode --no-shortcuts --only-site --site "%CYG_MIRROR%" --packages "mingw64-%PACKAGE_ARCH%-zlib" > NULL'
+  - SET PATH=%CYG_ROOT%\bin;%PATH% # NB: Changed env variables persist to later sections
 
 build_script:
-  - SET PATH=%CYG_ROOT%\bin;%PATH%
   - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && ./configure --extra-cflags=\"-Werror\" ${CONFIGURE_OPTIONS} && make.exe'
 
 after_build:
-  - cd os\windows && dobuild.cmd %BUILD_ARCH%
+  - cd os\windows && dobuild.cmd %PLATFORM%
 
 test_script:
-  - SET PATH=%CYG_ROOT%\bin;%PATH%
   - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && file.exe fio.exe && make.exe test'
 
 artifacts:
index b6a9fb7e033bcd369313a1b37e531bce18b7ace4..2e8eb180ef50b20db7996c3bbac3e1f5330940fe 100755 (executable)
--- a/configure
+++ b/configure
@@ -320,18 +320,8 @@ CYGWIN*)
   if test -z "${CC}${cross_prefix}"; then
     if test ! -z "$build_32bit_win" && test "$build_32bit_win" = "yes"; then
       cc="i686-w64-mingw32-gcc"
-      if test -e "../zlib/contrib/vstudio/vc14/x86/ZlibStatReleaseWithoutAsm/zlibstat.lib"; then
-        echo "Building with zlib support"
-        output_sym "CONFIG_ZLIB"
-        echo "LIBS=../zlib/contrib/vstudio/vc14/x86/ZlibStatReleaseWithoutAsm/zlibstat.lib" >> $config_host_mak
-      fi
     else
       cc="x86_64-w64-mingw32-gcc"
-      if test -e "../zlib/contrib/vstudio/vc14/x64/ZlibStatReleaseWithoutAsm/zlibstat.lib"; then
-        echo "Building with zlib support"
-        output_sym "CONFIG_ZLIB"
-        echo "LIBS=../zlib/contrib/vstudio/vc14/x64/ZlibStatReleaseWithoutAsm/zlibstat.lib" >> $config_host_mak
-      fi
     fi
   fi
   if test ! -z "$build_32bit_win" && test "$build_32bit_win" = "yes"; then
@@ -359,7 +349,7 @@ CYGWIN*)
   static_assert="yes"
   ipv6="yes"
   mkdir_two="no"
-  echo "BUILD_CFLAGS=$CFLAGS -I../zlib -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
+  echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   ;;
 esac
 
index fd54a9c670888bdf7e0f123cd55c7b6eb151c8ef..ef12d82d7a36c8eabdf9e8716ce782b3acc84a64 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 1c929321d6875dce3fe09084b2f659aea04151f2..b2798bb5496f790005df8508d10f15fc3b24d7db 100755 (executable)
Binary files a/os/windows/eula.rtf and b/os/windows/eula.rtf differ
index 577af55328a6c3c4a6697551499dc225245fc9fb..73b281036f332b06dac0d78c2baa1554e7eaa08f 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"/>