-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.wxs
68 lines (58 loc) · 2.88 KB
/
app.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
<?xml version="1.0" encoding="UTF-8"?>
<?define Name = "YOUR APP" ?>
<?define InstallFolder = "YOUR APP FOLDER" ?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Language="1033"
Manufacturer="YOUR NAME"
Name="$(var.Name)"
Version="$(env.APP_VERSION).0"
UpgradeCode="74d42802-054a-4869-a703-658c361fe94c">
<!-- MSI versions require a 4-part, so we add a ".0" to the end of every version -->
<Icon Id="icon.ico" SourceFile="files/Icon.ico"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." Schedule="afterInstallInitialize" />
<!-- Pack all the files into the MSI instead of spreading this over .cab files -->
<MediaTemplate CompressionLevel="high" EmbedCab="yes" />
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="App" Guid="70aab056-7fbd-4a7a-9cbb-2275ee064f06">
<File Id="AppExe"
KeyPath="yes"
Checksum="yes"
Source="files/Unciv.exe">
</File>
</Component>
</DirectoryRef>
<ComponentGroup Id="AppFiles" Directory="INSTALLFOLDER">
<Files Include="files\**" />
</ComponentGroup>
<Component Id="AppShortcuts" Directory="INSTALLFOLDER" Guid="0eac8b63-1cab-4645-b0cb-ad7535f0e9ce">
<Shortcut Id="StartMenuShortcut"
Name="$(var.Name)"
Target="[#AppExe]"
Arguments="--data-dir=%APPDATA%\$(var.InstallFolder)"
Icon="icon.ico"
Directory="ApplicationProgramsFolder"
WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="CleanupStartMenuShortcut"
Directory="ApplicationProgramsFolder"
On="uninstall" />
<RemoveFolder Id="CleanupAppData"
Directory="APPDATAFOLDER"
On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\YOURNAME\YOURAPP" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
<Feature Id="ProductFeature" Title="$(var.Name)" Level="1" ConfigurableDirectory="INSTALLFOLDER">
<ComponentGroupRef Id="AppFiles" />
<ComponentRef Id="App" />
<ComponentRef Id="AppShortcuts" />
</Feature>
<StandardDirectory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.InstallFolder)" />
</StandardDirectory>
<StandardDirectory Id="AppDataFolder">
<Directory Id="APPDATAFOLDER" Name="$(var.InstallFolder)" />
</StandardDirectory>
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.InstallFolder)" />
</StandardDirectory>
</Package>
</Wix>