From: Bruce Cran Date: Mon, 16 Apr 2012 17:33:03 +0000 (+0200) Subject: Windows build fixes X-Git-Tag: gfio-0.1~2^2~6 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=84306c1d9ecd94e93436da62b41ef61ac6e281ac Windows build fixes Bruce writes: SIGUSR1 isn't defined on Windows so I've defined it. Also, MSI packages need a version string of x.x.x.x where x is between 0 and 65535 so we can't include the git hash. It's easier just to go back to hard-coding the version for now, and I'll update it (and the product GUID) when I create a new package (it doesn't need checked in each time). Also, Cygwin doesn't like $(SHELL_PATH) but $(SHELL) seems to work - does $(SHELL) cause a problem on other platforms? Signed-off-by: Jens Axboe --- diff --git a/Makefile b/Makefile index 61e2163f..f72bf8e2 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ all: .depend $(PROGS) $(SCRIPTS) FORCE .PHONY: FORCE cscope FIO-VERSION-FILE: FORCE - @$(SHELL_PATH) ./FIO-VERSION-GEN + @$(SHELL) ./FIO-VERSION-GEN -include FIO-VERSION-FILE CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"' diff --git a/os/os-windows.h b/os/os-windows.h index 8b801ed5..7b61d16c 100644 --- a/os/os-windows.h +++ b/os/os-windows.h @@ -82,6 +82,7 @@ typedef DWORD_PTR os_cpu_mask_t; #define POLLHUP 1 #define SIGCONT 0 +#define SIGUSR1 1 typedef int sigset_t; typedef int siginfo_t; diff --git a/os/windows/dobuild.cmd b/os/windows/dobuild.cmd index 43e5db4d..cbbe2cbc 100644 --- a/os/windows/dobuild.cmd +++ b/os/windows/dobuild.cmd @@ -1,11 +1,9 @@ @echo off setlocal enabledelayedexpansion -set /a counter=4 -for /f "tokens=3" %%i in (..\..\fio_version.h) do ( - if "!counter!"=="4" set FIO_MAJOR=%%i - if "!counter!"=="5" set FIO_MINOR=%%i - if "!counter!"=="6" set FIO_PATCH=%%i -set /a counter+=1 +set /a counter=1 +for /f "tokens=3" %%i in (..\..\FIO-VERSION-FILE) do ( + if "!counter!"=="1" set FIO_VERSION=%%i + set /a counter+=1 ) if "%1"=="x86" set FIO_ARCH=x86 @@ -22,5 +20,5 @@ if not defined FIO_ARCH ( @if ERRORLEVEL 1 goto end "%WIX%bin\candle" -nologo -arch %FIO_ARCH% examples.wxs @if ERRORLEVEL 1 goto end -"%WIX%bin\light" -nologo install.wixobj examples.wixobj -ext WixUIExtension -out fio-%FIO_MAJOR%.%FIO_MINOR%.%FIO_PATCH%-%FIO_ARCH%.msi +"%WIX%bin\light" -nologo install.wixobj examples.wixobj -ext WixUIExtension -out %FIO_VERSION%-%FIO_ARCH%.msi :end \ No newline at end of file diff --git a/os/windows/install.wxs b/os/windows/install.wxs index 18091bee..69753ba9 100755 --- a/os/windows/install.wxs +++ b/os/windows/install.wxs @@ -7,10 +7,10 @@ - + Manufacturer="fio" Name="fio" + UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.7">