source: trunk/sln/HaliteWix/Product.wxs @ 558

Revision 558, 5.0 KB checked in by Eoin, 12 years ago (diff)

Settings stored in Application Folder if reg entry present.

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<?define VerGeneration = "0" ?>
4<?define VerMajor = "3" ?>
5<?define VerMinor = "1" ?>
6<?define VerUpdate = "5" ?>
7<?define VerBuild = "0550" ?>
8
9<?define GMmbVer = "$(var.VerGeneration).$(var.VerMajor).$(var.VerMinor).$(var.VerUpdate)" ?>
10<?define GMmbHex = "$(var.VerGeneration)$(var.VerMajor)$(var.VerMinor)$(var.VerUpdate)" ?>
11<?define UpgradeMinVer = "0.3.1" ?>
12
13<?define ProductName = "Halite" ?>
14
15<?if $(var.MyCPU) = "x64" ?>
16<?define CpuId = "2" ?>
17<?define PFilesFolder = "ProgramFiles64Folder" ?>
18<?define Platforms = "x64" ?>
19<?define CpuPostfix = " (x64 edition)" ?>
20<?define Is64 = "yes" ?>
21<?define ReleaseFolder = "x64\$(var.Configuration)\" ?>
22<?else ?>
23<?define CpuId = "1" ?>
24<?define PFilesFolder = "ProgramFilesFolder" ?>
25<?define Platforms = "Intel" ?>
26<?define CpuPostfix = "" ?>
27<?define Is64 = "no" ?>
28<?define ReleaseFolder = "$(var.Configuration)\" ?>
29<?endif ?>
30
31<?define BaseId = "E3A8BF7D-962F-476$(var.CpuId)" ?>
32<?define BaseIdVer = "$(var.BaseId)-$(var.GMmbHex)-$(var.VerBuild)" ?>
33<?define ProductId   = "$(var.BaseIdVer)01000000" ?>
34<?define PackageId   = "$(var.BaseIdVer)02000000" ?>
35<?define CompId      = "$(var.BaseIdVer)03000000" ?>
36<?define UpgradeCode = "$(var.BaseId)-0000-000004000000" ?>
37
38<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
39  <Product
40      Id="$(var.ProductId)"
41      UpgradeCode="$(var.UpgradeCode)"
42      Name="$(var.ProductName) $(var.GMmbVer)$(var.CpuPostfix)"
43      Language="1033"
44      Version="$(var.GMmbVer)"
45      Manufacturer="BinaryNotions.com">
46
47      <Package
48          Description="$(var.ProductName)$(var.CpuPostfix) Package"
49          Comments="$(var.ProductName)$(var.CpuPostfix) Package"
50          InstallerVersion="200"
51          Compressed="yes"
52          Platforms="$(var.Platforms)"
53        />
54
55                <Media Id="1" Cabinet="Halite.cab" EmbedCab="yes" />
56   
57    <Property Id="INSTALLDIR">
58      <RegistrySearch Id="MyHalitePath" Type="raw" Root="HKCU" Key="Software\Halite" Name="Path" />
59    </Property>
60
61    <Directory Id="TARGETDIR" Name="SourceDir">
62      <Directory Id="AppDataFolder" />
63      <Directory Id="DesktopFolder" />
64
65      <Directory Id="ProgramMenuFolder">       
66        <Directory Id="HaliteProgramMenuFolder" Name="Halite">
67         
68          <Component Id='HaliteExeStartMenuFolder' Guid='{D6B80025-50FC-4760-89B2-72340616AD19}'>
69            <RegistryKey Root="HKCU" Key="Software\Halite\Uninstall">
70              <RegistryValue Value="HaliteProgramMenuFolder"
71                             Type="string"
72                             KeyPath="yes" />
73              </RegistryKey>
74            <RemoveFolder Id="RemoveShorcutFolder" On="uninstall" />           
75          </Component>
76         
77        </Directory>
78      </Directory>
79
80      <Directory Id="$(var.PFilesFolder)" Name="Files">
81        <Directory Id="INSTALLDIR" Name="Halite">
82
83          <Component Id="InstallRegCU" Guid="{CE5457FD-CD23-48e6-A54E-4004E936AA86}" DiskId="1" Win64="$(var.Is64)">
84            <RegistryKey Root="HKCU" Key="Software\Halite">
85              <RegistryValue Value="[INSTALLDIR]"
86                             Type="string"
87                              Name="Path"
88                             KeyPath="yes" />
89            </RegistryKey>
90          </Component>
91
92          <Component Id='ReadMeText' Win64='$(var.Is64)' Guid='0E8E2FD3-7658-4429-BBD1-BBDF76E99D71'>
93            <File Id='Readme' Name='readme.txt' DiskId='1' Source='..\..\Readme.txt' />
94          </Component>
95
96          <Component Id='HaliteExe' Win64='$(var.Is64)' Guid='{601CEE5B-5AE0-462f-BB19-A6FDBD520E40}'>
97            <File Id='HaliteFile' Name='Halite.exe' DiskId='1' Source='$(var.ProjectDir)\..\..\$(var.ReleaseFolder)Halite.exe'>
98              <Shortcut Id="desktopHaliteFile" Directory="DesktopFolder" Name="Halite"
99                  WorkingDirectory='INSTALLDIR' Advertise="yes" Icon="HaliteIcon.exe" IconIndex="0" />
100              <Shortcut Id="startmenuHaliteFile" Directory="HaliteProgramMenuFolder" Name="Halite"
101                  WorkingDirectory='INSTALLDIR' Advertise="yes" Icon="HaliteIcon.exe" IconIndex="0" />
102            </File>
103
104            <ProgId Id='Halite.torrent' Advertise="no" Description='BitTorrent Torrent File'>
105              <Extension Id='torrent' ContentType='application/torrent'>
106                <Verb Id='open' Command='Open' TargetFile='HaliteFile' Argument='"%1"' />
107              </Extension>
108            </ProgId>
109          </Component>
110         
111                                </Directory>
112                        </Directory>
113     
114                </Directory>
115
116    <Feature Id="HaliteComponents" Title="Halite (Core)" Level="1" Absent="disallow" AllowAdvertise='no'
117             ConfigurableDirectory="INSTALLDIR">
118      <ComponentRef Id="HaliteExe" />
119      <ComponentRef Id="HaliteExeStartMenuFolder" />
120      <ComponentRef Id="InstallRegCU" />
121      <ComponentRef Id="ReadMeText" />
122    </Feature>
123
124    <Icon Id="HaliteIcon.exe" SourceFile="..\..\$(var.ReleaseFolder)Halite.exe" />
125
126    <UIRef Id="WixUI_FeatureTree" />
127   
128        </Product>
129</Wix>
Note: See TracBrowser for help on using the repository browser.