forked from vdemydiuk/mtapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProduct.wxs
executable file
·130 lines (101 loc) · 5.43 KB
/
Product.wxs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductName="MtApi5" ?>
<?if $(var.Platform) = x64 ?>
<?define ProductPathNative="..\build\products\$(var.Configuration)\x64\"?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define PlatformSystemFolder = "System64Folder" ?>
<?else ?>
<?define ProductPathNative="..\build\products\$(var.Configuration)\"?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define PlatformSystemFolder = "SystemFolder" ?>
<?endif ?>
<?define ProductVersion=!(bind.FileVersion.MtApi5.dll) ?>
<?define Manufacturer="DW"?>
<?define ProductPath="..\build\products\$(var.Configuration)\"?>
<Product Id="*"
Name="$(var.ProductName) $(var.ProductVersion)"
Language="1033"
Version="$(var.ProductVersion)"
Manufacturer="$(var.Manufacturer)"
UpgradeCode="d72d346e-e6f7-4c23-85c6-1c42b3175599">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<WixVariable Id="WixUILicenseRtf" Value="..\LICENSE.rtf" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<Feature Id="MtApi5" Title="$(var.ProductName)" Level="1">
<ComponentGroupRef Id="MtApi5Components"/>
</Feature>
<Feature Id="MT5Connector" Title="MT5 Connector" Level="1">
<ComponentGroupRef Id="MT5ConnectorComponents"/>
</Feature>
<Property Id="WIXUI_INSTALLDIR">INSTALLFOLDER</Property>
<UIRef Id="WixUI_Mondo" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="INSTALLFOLDER" Name="$(var.ProductName)">
<Directory Id="ExpertFolder" Name="Experts">
</Directory>
<Directory Id="GAC" Name="GAC">
</Directory>
</Directory>
</Directory>
<Directory Id="$(var.PlatformSystemFolder)">
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)">
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="MtApi5Components">
<Component Id="MtApi5Dll" Directory="INSTALLFOLDER">
<File Id="MtApi5.dll" Name="MtApi5.dll" KeyPath="yes"
Source="$(var.ProductPath)MtApi5.dll" />
<RegistryKey Root="HKLM"
Key="Software\Microsoft\.NetFramework\v4.0.30319\AssemblyFoldersEx\$(var.ProductName)"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="[INSTALLFOLDER]"/>
</RegistryKey>
</Component>
<Component Id="NewtonsoftJsondll" Directory="INSTALLFOLDER">
<File Id="Newtonsoft.Json.dll" Name="Newtonsoft.Json.dll" KeyPath="yes"
src="$(var.ProductPath)Newtonsoft.Json.dll"/>
</Component>
<Component Id="MTApiServiceDll" Directory="INSTALLFOLDER">
<File Id="GAC_MTApiService.dll" Name="MTApiService.dll" KeyPath="yes"
src="$(var.ProductPath)MTApiService.dll"/>
</Component>
<Component Id="MtApi5Expert" Directory="ExpertFolder">
<File Id="MtApi5.ex5" Name="MtApi5.ex5" KeyPath="yes"
Source="..\mq5\MtApi5.ex5" />
</Component>
<Component Id="AppShortcutConnMgr" Guid="*" Directory="ApplicationProgramsFolder">
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\$(var.ProductName)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</ComponentGroup>
<ComponentGroup Id="MT5ConnectorComponents">
<Component Id="ConnectionProfileRegistryKey" Guid="*" Directory="INSTALLFOLDER">
<RegistryKey Root="HKCU"
Key="Software\MtApi\ConnectionProfiles\Local"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="Host" Value=""/>
<RegistryValue Type="integer" Name="Port" Value="8222" KeyPath="yes"/>
</RegistryKey>
</Component>
<Component Id="MTApiServiceDllGAC" Guid="6CD24D64-7DA1-4015-A5B3-B17C2488998C" Directory="GAC">
<File Id="MTApiService.dll" Name="MTApiService.dll" KeyPath="yes"
src="$(var.ProductPath)MTApiService.dll" Checksum="yes"
Assembly=".net" AssemblyManifest="MTApiService.dll" Vital="yes" />
</Component>
<Component Id="MT5ConnectorDll" Directory="$(var.PlatformSystemFolder)">
<File Id="MT5Connector5.dll" Name="MT5Connector.dll" KeyPath="yes"
Source="$(var.ProductPathNative)MT5Connector.dll" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>