summaryrefslogtreecommitdiff
path: root/os/windows/dobuild.cmd
diff options
context:
space:
mode:
authorBruce Cran <bruce@cran.org.uk>2012-02-20 20:18:19 +0100
committerJens Axboe <axboe@kernel.dk>2012-02-20 20:18:19 +0100
commit93bcfd20e37cef8cec350fe06d3a086724c9f257 (patch)
treefee8b2da5b190b0d4fd940f7cef5e58cd7faa113 /os/windows/dobuild.cmd
parent16de1bf91ca80e62ce257a24cae471fab140bbe0 (diff)
downloadfio-93bcfd20e37cef8cec350fe06d3a086724c9f257.tar.gz
fio-93bcfd20e37cef8cec350fe06d3a086724c9f257.tar.bz2
Move Windows port to MinGW
- Add calls to WSAStartup in the network code as required by Winsock. - Add Windows-specific init_random_state function which uses the Crypto API. - Move Windows port to MinGW and update build system to create a 64-bit binary by default. - Install text files as .rtf so they won't open in Notepad by default (Wordpad understands Unix line endings; Notepad doesn't). - Simplify WiX installer code. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os/windows/dobuild.cmd')
-rw-r--r--[-rwxr-xr-x]os/windows/dobuild.cmd30
1 files changed, 26 insertions, 4 deletions
diff --git a/os/windows/dobuild.cmd b/os/windows/dobuild.cmd
index 95543d75..43e5db4d 100755..100644
--- a/os/windows/dobuild.cmd
+++ b/os/windows/dobuild.cmd
@@ -1,4 +1,26 @@
-"%WIX%bin\candle" cygwin.wxs
-"%WIX%bin\candle" install.wxs
-"%WIX%bin\candle" examples.wxs
-"%WIX%bin\light" install.wixobj cygwin.wixobj examples.wixobj -ext WixUIExtension -out fio.msi \ No newline at end of file
+@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
+)
+
+if "%1"=="x86" set FIO_ARCH=x86
+if "%1"=="x64" set FIO_ARCH=x64
+
+if not defined FIO_ARCH (
+ echo Error: must specify the architecture.
+ echo Usage: dobuild x86
+ echo Usage: dobuild x64
+ goto end
+)
+
+"%WIX%bin\candle" -nologo -arch %FIO_ARCH% install.wxs
+@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
+:end \ No newline at end of file