forked from gwdevhub/GWToolboxpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gwtoolbox.wxs.in
101 lines (92 loc) · 5.63 KB
/
gwtoolbox.wxs.in
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
<?xml version="1.0" encoding="UTF-8"?>
<?define var.DIRECTX_SDK_DIR = "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)" ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Version="@GWTOOLBOXDLL_VERSION@" Language="1033" Name="GWToolboxpp" Manufacturer="GWToolbox">
<Package InstallerVersion="300" Compressed="yes"/>
<Media Id="1" Cabinet="gwtoolboxpp.cab" EmbedCab="yes" />
<!-- Step 1: Define the directory structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="DesktopFolder" Name="Desktop" />
<Directory Id="AppDataFolder">
<Directory Id="APPLICATIONROOTDIRECTORY" Name="GWToolboxpp">
<Directory Id="LOGSDIRECTORY" Name="logs" />
<Directory Id="CRASHESDIRECTORY" Name="crashes" />
<Directory Id="PLUGINSDIRECTORY" Name="plugins" />
<Directory Id="DATADIRECTORY" Name="data" />
<Directory Id="BONDSDIRECTORY" Name="bonds" />
<!-- MVP files -->
<Component Id="GWToolbox.exe">
<File Id="GWToolbox.exe" Source="bin\RelWithDebInfo\GWToolbox.exe" KeyPath="yes" Checksum="yes">
<Shortcut Id="desktopGWToolboxpp" Directory="DesktopFolder" Name="GWToolbox++" WorkingDirectory='INSTALLDIR' Arguments="/localdll" Icon="GWToolbox.exe" IconIndex="0" />
</File>
</Component>
<Component Id="GWToolboxdll.dll">
<File Id="GWToolboxdll.dll" Source="bin\RelWithDebInfo\GWToolboxdll.dll" KeyPath="yes" Checksum="yes"/>
</Component>
<Component Id="Font.ttf">
<File Id="Font.ttf" Source="resources\Font.ttf" KeyPath="yes" Checksum="yes"/>
</Component>
<!-- DirectX -->
<Directory Id="DirectXRedistDirectory" Name="DirectX9.0c">
<Component Id="DirectXRedist" Guid="0BFCDDAB-5C65-47F5-9AC3-765A5A4ABCA6">
<File Id="DXSETUPEXE" Source="$(var.DIRECTX_SDK_DIR)\Redist\dxsetup.exe" KeyPath="yes" Checksum="yes"/>
<File Id="dxupdate.cab" Source="$(var.DIRECTX_SDK_DIR)\Redist\dxupdate.cab"/>
<File Id="dxdllreg_x86.cab" Source="$(var.DIRECTX_SDK_DIR)\Redist\dxdllreg_x86.cab"/>
<File Id="dsetup32.dll" Source="$(var.DIRECTX_SDK_DIR)\Redist\dsetup32.dll"/>
<File Id="dsetup.dll" Source="$(var.DIRECTX_SDK_DIR)\Redist\dsetup.dll"/>
<File Id="Jun2010_d3dx10_43_x86.cab" Source="$(var.DIRECTX_SDK_DIR)\Redist\Jun2010_d3dx10_43_x86.cab"/>
</Component>
</Directory>
</Directory>
</Directory>
<!-- Start menu shortcut -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="GWToolboxpp">
<Component Id="ApplicationShortcut" Guid="0BFCDDAB-5C65-47F5-9AC3-765A5A4ABCA7">
<Shortcut Id="ApplicationStartMenuShortcut" Name="GWToolbox++" Description="GWToolbox++" Target="[#GWToolbox.exe]" WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
</Component>
</Directory>
</Directory>
<!-- Visual studio redist -->
<Merge Id="VC140Redist" SourceFile="resources\Microsoft_VC140_CRT_x86.msm" DiskId="1" Language="0"/>
<Merge Id="VC142Redist" SourceFile="resources\Microsoft_VC142_CRT_x86.msm" DiskId="1" Language="0"/>
</Directory>
<!-- Step 2: Add the shortcut to your installer package -->
<DirectoryRef Id="ApplicationProgramsFolder">
</DirectoryRef>
<!-- Step 3: Tell WiX to install the files -->
<Feature Id="MainApplication" Title="GWToolboxpp" Level="1">
<ComponentRef Id="GWToolbox.exe" />
<ComponentRef Id="GWToolboxdll.dll" />
<ComponentRef Id="Font.ttf" />
<!-- Step 3: Tell WiX to install the shortcut -->
<ComponentRef Id="ApplicationShortcut" />
</Feature>
<!-- Visual studio redist v140 -->
<Feature Id="VC140Redist" Title="Visual C++ 2017 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VC140Redist"/>
</Feature>
<Feature Id="VC142Redist" Title="Visual C++ 2019 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VC142Redist"/>
</Feature>
<!-- DirectX -->
<Feature Id="DirectXRedist" AllowAdvertise="no" Display="hidden" Level="1">
<ComponentRef Id="DirectXRedist"/>
</Feature>
<CustomAction Id="InstallDirectX" FileKey="DXSETUPEXE" ExeCommand="/silent" Execute="deferred" Impersonate="no" Return="check"/>
<CustomAction Id="InstallViaExe" FileKey="GWToolbox.exe" ExeCommand="/install" Execute="deferred" Impersonate="no" Return="check"/>
<InstallExecuteSequence>
<Custom Action="InstallDirectX" Before="InstallFinalize">
<![CDATA[NOT REMOVE]]>
</Custom>
<Custom Action="InstallViaExe" Before="InstallFinalize">
<![CDATA[NOT REMOVE]]>
</Custom>
</InstallExecuteSequence>
<UI>
<ProgressText Action="InstallDirectX">Installing DirectX 9.0c</ProgressText>
<ProgressText Action="InstallViaExe">Installing GWToolbox</ProgressText>
</UI>
<Icon Id="GWToolbox.exe" SourceFile="bin\RelWithDebInfo\GWToolbox.exe" />
</Product>
</Wix>