Move Windows port to MinGW
[fio.git] / os / windows / install.wxs
index eecef144e93d42142b1184dc1e3f1024a2bfdc06..d3d683e72a9365a078862e865d932fa265458aec 100755 (executable)
@@ -1,79 +1,61 @@
 <?xml version="1.0" encoding="utf-8"?>\r
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">\r
-\r
-<?define VersionMajor = 1?>\r
-<?define VersionMinor = 99?>\r
-<?define VersionBuild = 10?>\r
+       \r
+       <?if $(env.FIO_ARCH) = x86 ?>\r
+               <?define ProgramDirectory = ProgramFilesFolder ?>\r
+       <?else?>\r
+               <?define ProgramDirectory = ProgramFiles64Folder ?>\r
+       <?endif?>\r
 \r
        <Product Id="*"\r
          Codepage="1252" Language="1033"\r
          Manufacturer="fio" Name="FIO"\r
-         UpgradeCode="{2338a332-5511-43cf-b9bd-5c60496ccfcc}" Version="$(var.VersionMajor).$(var.VersionMinor).$(var.VersionBuild)">\r
+         UpgradeCode="{2338A332-5511-43cf-b9BD-5C60496CCFCC}" Version="$(env.FIO_MAJOR).$(env.FIO_MINOR).$(env.FIO_PATCH)">\r
                <Package \r
                  Comments="Contact: Your local administrator"\r
                  Description="Flexible IO Tester"\r
                  InstallerVersion="200" Keywords="Installer,MSI,Database"\r
-                 Languages="1033" Manufacturer="fio" Platform="x86"\r
+                 Languages="1033" Manufacturer="fio"\r
                  InstallScope="perMachine" InstallPrivileges="elevated" Compressed="yes"/>\r
 \r
-               <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />\r
+               <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" CompressionLevel="high"/>\r
 \r
                <Directory Id="TARGETDIR" Name="SourceDir">\r
-                       <Directory Id="ProgramFilesFolder" SourceName="program files">\r
+                       <Directory Id="$(var.ProgramDirectory)">\r
                                <Directory Id="INSTALLDIR">\r
-                                       <Directory Id="cygwin" Name="FIO">\r
-                                               <Directory Id="bin" Name="bin">\r
-                                                       <Component Id="fio.exe" Location="either">\r
-                                                               <File Id="fio.exe" Name="fio.exe" KeyPath="yes" Source="..\..\fio.exe"/>\r
-                                                       </Component>\r
-                                               </Directory>\r
-                                               \r
-                                               <Component Id="fio.lnk" Location="either">\r
-                                                       <File Id="fio.lnk" Name="FIO.lnk" KeyPath="yes" Source="FIO.lnk"/>\r
-                                                       <Shortcut Id="FIO_SC" Name="FIO" Description="Opens an FIO shell" Directory="ApplicationProgramsFolder" Target="[cygwin]\FIO.lnk"/>\r
+                                       <Directory Id="fio" Name="fio">\r
+                                               <Component>\r
+                                                       <File Source="..\..\fio.exe"/>\r
                                                </Component>\r
-\r
-                                               <Directory Id="examples" Name="examples"/>\r
-                                               <Component Id="README">\r
-                                                       <File Id="README" Name="README.txt" KeyPath="yes" Source="..\..\README"/>\r
-                                                       <Shortcut Id="README_SC" Name="Readme" Description="Documentation" Directory="ApplicationProgramsFolder" Target="[#README]"/>\r
+                                               <Component>\r
+                                                       <File KeyPath="yes" Source="..\..\pthreadGC2.dll"/>\r
                                                </Component>\r
-                                               <Component Id="REPORTING_BUGS">\r
-                                                       <File Id="REPORTING_BUGS" Name="REPORTING-BUGS.txt" KeyPath="yes" Source="..\..\REPORTING-BUGS"/>\r
-                                                       <Shortcut Id="REPORTING_BUGS_SC" Name="Reporting bugs" Description="How to report bugs in FIO" Directory="ApplicationProgramsFolder" Target="[#REPORTING_BUGS]"/>\r
+                                               <Component>\r
+                                                       <File Id="README" Name="README.rtf" Source="..\..\README"/>\r
                                                </Component>\r
-                                               <Component Id="HOWTO">\r
-                                                       <File Id="HOWTO" Name="HOWTO.txt" KeyPath="yes" Source="..\..\HOWTO"/>\r
-                                                       <Shortcut Id="HOWTO_SC" Name="How to use FIO" Description="FIO Tutorial - how to setup FIO" Directory="ApplicationProgramsFolder" Target="[#HOWTO]"/>\r
+                                               <Component>\r
+                                                       <File Id="REPORTING_BUGS" Name="REPORTING-BUGS.rtf" Source="..\..\REPORTING-BUGS"/>\r
                                                </Component>\r
-                                               <Component Id="COPYING">\r
-                                                       <File Id="COPYING" Name="COPYING.txt" KeyPath="yes" Source="..\..\COPYING"/>\r
-                                                       <Shortcut Id="COPYING_SC" Name="License" Description="FIO license" Directory="ApplicationProgramsFolder" Target="[#COPYING]"/>\r
+                                               <Component>\r
+                                                       <File Id="HOWTO" Name="HOWTO.rtf" Source="..\..\HOWTO"/>\r
                                                </Component>\r
+                                               <Component>\r
+                                                       <File Id="COPYING" Name="COPYING.rtf" Source="..\..\COPYING"/>\r
+                                               </Component>\r
+                                               <Directory Id="examples" Name="examples"/>\r
                                        </Directory>\r
                                </Directory>\r
                        </Directory>\r
-                       <Directory Id="ProgramMenuFolder">\r
-                       <Directory Id="ApplicationProgramsFolder" Name="FIO">\r
-                               <Component Id="ShortcutDir" Guid="475862c2-ae75-4325-96c8-335edb490214">\r
-                                       <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>\r
-                               </Component>\r
-                       </Directory>\r
-               </Directory>\r
        </Directory>\r
 \r
-       <Feature Id="AlwaysInstall" Absent="disallow" ConfigurableDirectory="INSTALLDIR" Display="hidden" Level="1" Title="Always Install">\r
-               <ComponentRef Id="fio.exe" />\r
-               <ComponentRef Id="fio.lnk" />\r
-               <ComponentGroupRef Id="examples"/>\r
-               <ComponentGroupRef Id="cygwin"/>\r
-\r
+       <Feature Id="AlwaysInstall" Absent="disallow" ConfigurableDirectory="INSTALLDIR" Display="hidden" Level="1" Title="Flexible IO Tester">\r
+               <ComponentRef Id="fio.exe"/>\r
+               <ComponentRef Id="pthreadGC2.dll"/>\r
                <ComponentRef Id="HOWTO"/>\r
                <ComponentRef Id="README"/>\r
                <ComponentRef Id="REPORTING_BUGS"/>\r
                <ComponentRef Id="COPYING"/>\r
-\r
-               <ComponentRef Id="ShortcutDir"/>\r
+               <ComponentGroupRef Id="examples"/>\r
        </Feature>\r
                \r
        <Property Id="ARPURLINFOABOUT" Value="http://git.kernel.dk/?p=fio.git" />\r
@@ -85,7 +67,7 @@
 \r
        <UIRef Id="WixUI_Minimal"/>\r
 \r
-       <Condition Message="Per-User installations are not supported">\r
+       <Condition Message="Per-user installations are not supported">\r
                Installed OR\r
                ALLUSERS=1\r
        </Condition>\r