-
Notifications
You must be signed in to change notification settings - Fork 2
/
godot.wxs
64 lines (64 loc) · 3.49 KB
/
godot.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
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<!-- defines preprocessor variable validation -->
<?ifndef exe_path ?>
<?error exe_path must be passed to candle like 'candle -dexe_path=godot.windows.tools.64.exe' ?>
<?endif?>
<?ifndef version ?>
<?error version must be passed to candle like 'candle -dversion=3.0.0.0' ?>
<?endif?>
<Product Id="*" Name="Godot" Version="$(var.version)" Manufacturer="Godot" Language="1033" UpgradeCode="77B73DC6-24AB-4714-9C76-2E2B17336F08">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perUser" InstallPrivileges="limited"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of Godot is already installed." IgnoreRemoveFailure="no"/>
<Media Id="1" Cabinet="godot.cab" EmbedCab="yes" CompressionLevel="high"/>
<!-- defines icon in add remove programs -->
<Property Id="ARPPRODUCTICON" Value="godot.ico"/>
<!-- removes modify option in "add or remove programs" -->
<Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />
<!-- mandatory root directory -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="LocalAppDataFolder">
<Directory Id="APPROOTDIR" Name="Godot"/>
</Directory>
<!-- Special folder for start menu folder-->
<Directory Id="ProgramMenuFolder" Name="start_menu"/>
<!-- Special folder for your desktop-->
<Directory Id="DesktopFolder" Name="desktop"/>
</Directory>
<DirectoryRef Id="APPROOTDIR">
<Component Id="editor" Guid="22A5E8C0-B45B-4CC5-B23A-96F5F142AE50">
<RegistryValue Root="HKCU" Type="integer" Key="Software\Godot" Name="IsInstalled" Value="1" KeyPath="yes"/>
<File Id="godot.exe" Source="$(var.exe_path)" Checksum="yes"/>
<ProgId Id="proj.godot" Description="Godot Project File">
<Extension Id="godot">
<Verb Id="open" Command="Open" TargetFile="godot.exe" Argument=""%1""/>
<MIME ContentType="application/godot" Default="yes"/>
</Extension>
</ProgId>
<RemoveFolder Id="APPROOTDIR" On="uninstall"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="ProgramMenuFolder">
<Component Id="start_menu_shortcut">
<RegistryValue Root="HKCU" Type="integer" Key="Software\Godot" Name="IsMenuShortcutInstalled" Value="1" KeyPath="yes"/>
<Shortcut Id="menu_shortcut" WorkingDirectory="APPROOTDIR" Name="Godot" Description="Godot Editor" Icon="godot.ico" Target="[#godot.exe]"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="desktop_shortcut">
<RegistryValue Root="HKCU" Type="integer" Key="Software\Godot" Name="IsDesktopShortcutInstalled" Value="1" KeyPath="yes"/>
<Shortcut Id="desk_shortcut" WorkingDirectory="APPROOTDIR" Name="Godot" Description="Godot Editor" Icon="godot.ico" Target="[#godot.exe]"/>
</Component>
</DirectoryRef>
<Icon Id="godot.ico" SourceFile="godot.ico"/>
<Feature Id="godot_editor" Title="Godot Editor" Level="1">
<ComponentRef Id="editor"/>
<ComponentRef Id="start_menu_shortcut"/>
<ComponentRef Id="desktop_shortcut"/>
</Feature>
<InstallExecuteSequence>
<Custom Action="launch_godot" After="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
<CustomAction Id="launch_godot" FileKey="godot.exe" ExeCommand="" Execute="immediate" Impersonate="yes" Return="asyncNoWait"/>
</Product>
</Wix>