-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoadRunner.wxs
117 lines (114 loc) · 4.97 KB
/
RoadRunner.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
<?xml version='1.0' encoding='utf-8'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='RoadRunner' Id='c5b9caf9-b30a-4b3e-9e18-f5fe62251cfc' UpgradeCode='83122f23-94ec-4699-bfbf-59c4918c0cdf' Language='1033' Codepage='utf-8' Version='1.00' Manufacturer='acvxqs'>
<Package Id='*' Keywords='Installer' Description="RoadRunner mIRC Script Installer" Comments='RoadRunner' Manufacturer='acvxqs' InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
<Property Id="MIRC">
<RegistrySearch
Id="MLOC"
Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\mIRC"
Name="InstallLocation"
Type="raw" />
</Property>
<Condition Message="This application requires mIRC. Please install mIRC then run this installer again.">
<![CDATA[Installed OR MIRC]]>
</Condition>
<Media Id='1' Cabinet='Main.cab' EmbedCab='yes' CompressionLevel='high' DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="RoadRunner Installation [1]" />
<!-- Step 1: Define the directory structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="AppDataFolder">
<Directory Id="APPLICATIONROOTDIRECTORY" Name="RoadRunner">
<Directory Id="CONFIG" Name="config"/>
<Directory Id="SCRIPT" Name="script">
<Directory Id="IMAGES" Name="images"/>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="RoadRunner"/>
</Directory>
</Directory>
<!-- Step 2: Add files to your installer package -->
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="*">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="RoadRunner"
Target="[MIRC]\mirc.exe"
Arguments="-r%APPDATA%\RoadRunner"
WorkingDirectory="APPLICATIONROOTDIRECTORY"
Icon="RoadRunner.ico">
<Icon Id="RoadRunner.ico" SourceFile=".\script\images\roadrunner.ico"/>
</Shortcut>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\acvxqs\RoadRunner" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
<Component Id='LICENSE' Guid='*'>
<File Id='LICENSE' Name='LICENSE' DiskId='1' Source='.\LICENSE' KeyPath='yes' />
</Component>
<Component Id='mirc.ini' Guid='*'>
<File Id='mirc.ini' Name='mirc.ini' DiskId='1' Source='.\mirc.ini' KeyPath='yes' />
</Component>
</DirectoryRef>
<DirectoryRef Id="CONFIG">
<Component Id='p.ini' Guid='*'>
<File Id='p.ini' Name='p.ini' DiskId='1' Source='.\config\p.ini' KeyPath='yes' />
</Component>
<Component Id='u.ini' Guid='*'>
<File Id='u.ini' Name='u.ini' DiskId='1' Source='.\config\u.ini' KeyPath='yes' />
</Component>
<Component Id='v.ini' Guid='*'>
<File Id='v.ini' Name='v.ini' DiskId='1' Source='.\config\v.ini' KeyPath='yes' />
</Component>
</DirectoryRef>
<DirectoryRef Id="SCRIPT">
<Component Id='a_01.mrc' Guid='*'>
<File Id='a_01.mrc' Name='a_01.mrc' DiskId='1' Source='.\script\a_01.mrc' KeyPath='yes' />
</Component>
<Component Id='r_01.mrc' Guid='*'>
<File Id='r_01.mrc' Name='r_01.mrc' DiskId='1' Source='.\script\r_01.mrc' KeyPath='yes' />
</Component>
<Component Id='r_02.mrc' Guid='*'>
<File Id='r_02.mrc' Name='r_02.mrc' DiskId='1' Source='.\script\r_02.mrc' KeyPath='yes' />
</Component>
<Component Id='r_03.mrc' Guid='*'>
<File Id='r_03.mrc' Name='r_03.mrc' DiskId='1' Source='.\script\r_03.mrc' KeyPath='yes' />
</Component>
</DirectoryRef>
<DirectoryRef Id="IMAGES">
<Component Id='roadrunner.ico' Guid='*'>
<File Id='roadrunner.ico' Name='roadrunner.ico' DiskId='1' Source='.\script\images\roadrunner.ico' KeyPath='yes' />
</Component>
<Component Id='roadrunner.png' Guid='*'>
<File Id='roadrunner.png' Name='roadrunner.png' DiskId='1' Source='.\script\images\roadrunner.png' KeyPath='yes' />
</Component>
</DirectoryRef>
<!-- Step 3: Tell WiX to install the files -->
<Feature Id="MainScript" Title="Main Script" Level="1">
<ComponentRef Id='ApplicationShortcut' />
<ComponentRef Id='LICENSE' />
<ComponentRef Id='mirc.ini' />
<ComponentRef Id='p.ini' />
<ComponentRef Id='u.ini' />
<ComponentRef Id='v.ini' />
<ComponentRef Id='a_01.mrc' />
<ComponentRef Id='r_01.mrc' />
<ComponentRef Id='r_02.mrc' />
<ComponentRef Id='r_03.mrc' />
<ComponentRef Id='roadrunner.ico' />
<ComponentRef Id='roadrunner.png' />
</Feature>
<Icon Id="icon.ico" SourceFile=".\script\images\roadrunner.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
<CustomAction Id="Cleanup_RoadRunner_dir" Directory="AppDataFolder"
ExeCommand="cmd /C "rmdir /s /q %appdata%\RoadRunner""
Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="Cleanup_RoadRunner_dir" Before="RemoveFiles" >
REMOVE="ALL"
</Custom>
</InstallExecuteSequence>
</Product>
</Wix>