Skip to content

Commit 7a6dc2b

Browse files
authored
add vc runtime to wix / msi package (#431)
* fix hook panicking (#393) * add vc merge module to msi Co-authored-by: Stephan Dilly <[email protected]>
1 parent a1a3ff5 commit 7a6dc2b

File tree

5 files changed

+200
-2
lines changed

5 files changed

+200
-2
lines changed

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
if: matrix.os == 'windows-latest'
6464
run: |
6565
cargo install cargo-wix
66-
cargo wix init
6766
cargo wix --no-build --nocapture --output ./target/wix/gitui.msi
6867
ls -l ./target/wix/gitui.msi
6968

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/target
22
/release
3-
/wix
43
.DS_Store
54
/.idea/
65
flamegraph.svg

wix/License.rtf

1.23 KB
Binary file not shown.

wix/Microsoft_VC142_CRT_x64.msm

1.15 MB
Binary file not shown.

wix/main.wxs

+200
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
<?xml version='1.0' encoding='windows-1252'?>
2+
<!--
3+
Copyright (C) 2017 Christopher R. Field.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<!--
19+
Please do not remove these pre-processor If-Else blocks. These are used with
20+
the `cargo wix` subcommand to automatically determine the installation
21+
destination for 32-bit versus 64-bit installers. Removal of these lines will
22+
cause installation errors.
23+
-->
24+
<?if $(var.Platform) = x64 ?>
25+
<?define Win64 = "yes" ?>
26+
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
27+
<?else ?>
28+
<?define Win64 = "no" ?>
29+
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
30+
<?endif ?>
31+
32+
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
33+
34+
<Product
35+
Id='*'
36+
Name='gitui'
37+
UpgradeCode='C1CADE63-A601-4E02-96CC-FB921D5B174E'
38+
Manufacturer='Stephan Dilly'
39+
Language='1033'
40+
Codepage='1252'
41+
Version='$(var.Version)'>
42+
43+
<Package Id='*'
44+
Keywords='Installer'
45+
Description='blazing fast terminal-ui for git'
46+
Manufacturer='Stephan Dilly'
47+
InstallerVersion='450'
48+
Languages='1033'
49+
Compressed='yes'
50+
InstallScope='perMachine'
51+
SummaryCodepage='1252'
52+
Platform='$(var.Platform)'/>
53+
54+
<MajorUpgrade
55+
Schedule='afterInstallInitialize'
56+
DowngradeErrorMessage='A newer version of [ProductName] is already installed. Setup will now exit.'/>
57+
58+
<Media Id='1' Cabinet='media1.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1'/>
59+
<Property Id='DiskPrompt' Value='gitui Installation'/>
60+
61+
<Directory Id='TARGETDIR' Name='SourceDir'>
62+
<Directory Id='$(var.PlatformProgramFilesFolder)' Name='PFiles'>
63+
<Directory Id='APPLICATIONFOLDER' Name='gitui'>
64+
<!--
65+
Disabling the license sidecar file in the installer is a two step process:
66+
67+
1. Comment out or remove the `Component` tag along with its contents.
68+
2. Comment out or remove the `ComponentRef` tag with the "License" Id
69+
attribute value further down in this file.
70+
-->
71+
<Component Id='License' Guid='*' Win64='$(var.Win64)'>
72+
<File Id='LicenseFile'
73+
Name='License.rtf'
74+
DiskId='1'
75+
Source='wix\License.rtf'
76+
KeyPath='yes'/>
77+
</Component>
78+
79+
<Directory Id='Bin' Name='bin'>
80+
<Component Id='Path' Guid='6FDC3234-CA26-4127-8EB2-6B88F4C5507A' Win64='$(var.Win64)' KeyPath='yes'>
81+
<Environment
82+
Id='PATH'
83+
Name='PATH'
84+
Value='[Bin]'
85+
Permanent='no'
86+
Part='last'
87+
Action='set'
88+
System='yes'/>
89+
</Component>
90+
<Component Id='binary0' Guid='*' Win64='$(var.Win64)'>
91+
<File
92+
Id='exe0'
93+
Name='gitui.exe'
94+
DiskId='1'
95+
Source='target\$(var.Profile)\gitui.exe'
96+
KeyPath='yes'/>
97+
</Component>
98+
</Directory>
99+
</Directory>
100+
</Directory>
101+
102+
</Directory>
103+
<!--
104+
added by hand to force the installation of VC runtime
105+
-->
106+
<DirectoryRef Id="TARGETDIR">
107+
<Merge Id="VCRedist" SourceFile="wix\Microsoft_VC142_CRT_x64.msm" DiskId="1" Language="0"/>
108+
</DirectoryRef>
109+
<Feature
110+
Id='Binaries'
111+
Title='Application'
112+
Description='Installs all binaries and the license.'
113+
Level='1'
114+
ConfigurableDirectory='APPLICATIONFOLDER'
115+
AllowAdvertise='no'
116+
Display='expand'
117+
Absent='disallow'>
118+
<!--
119+
Comment out or remove the following `ComponentRef` tag to remove
120+
the license sidecar file from the installer.
121+
-->
122+
<ComponentRef Id='License'/>
123+
124+
<ComponentRef Id='binary0'/>
125+
126+
<Feature
127+
Id='Environment'
128+
Title='PATH Environment Variable'
129+
Description='Add the install location of the [ProductName] executable to the PATH system environment variable. This allows the [ProductName] executable to be called from any location.'
130+
Level='1'
131+
Absent='allow'>
132+
<ComponentRef Id='Path'/>
133+
</Feature>
134+
<!--
135+
added by hand to force the installation of VC runtime
136+
-->
137+
<Feature Id="VCRedist" Title="Visual C++ Runtime" AllowAdvertise="no" Display="hidden" Level="1">
138+
<MergeRef Id="VCRedist"/>
139+
</Feature>
140+
</Feature>
141+
142+
<SetProperty Id='ARPINSTALLLOCATION' Value='[APPLICATIONFOLDER]' After='CostFinalize'/>
143+
144+
145+
<!--
146+
Uncomment the following `Icon` and `Property` tags to change the product icon.
147+
148+
The product icon is the graphic that appears in the Add/Remove
149+
Programs control panel for the application.
150+
-->
151+
<!--<Icon Id='ProductICO' SourceFile='wix\Product.ico'/>-->
152+
<!--<Property Id='ARPPRODUCTICON' Value='ProductICO' />-->
153+
154+
<Property Id='ARPHELPLINK' Value='https://github.com/extrawurst/gitui'/>
155+
156+
<UI>
157+
<UIRef Id='WixUI_FeatureTree'/>
158+
<!--
159+
Disabling the EULA dialog in the installer is a two step process:
160+
161+
1. Uncomment the following two `Publish` tags
162+
2. Comment out or remove the `<WiXVariable Id='WixUILicenseRtf'...` tag further down
163+
164+
-->
165+
<!--<Publish Dialog='WelcomeDlg' Control='Next' Event='NewDialog' Value='CustomizeDlg' Order='99'>1</Publish>-->
166+
<!--<Publish Dialog='CustomizeDlg' Control='Back' Event='NewDialog' Value='WelcomeDlg' Order='99'>1</Publish>-->
167+
168+
</UI>
169+
170+
<!--
171+
Disabling the EULA dialog in the installer requires commenting out
172+
or removing the following `WixVariable` tag
173+
-->
174+
<WixVariable Id='WixUILicenseRtf' Value='wix\License.rtf'/>
175+
176+
177+
<!--
178+
Uncomment the next `WixVaraible` tag to customize the installer's
179+
Graphical User Interface (GUI) and add a custom banner image across
180+
the top of each screen. See the WiX Toolset documentation for details
181+
about customization.
182+
183+
The banner BMP dimensions are 493 x 58 pixels.
184+
-->
185+
<!--<WixVariable Id='WixUIBannerBmp' Value='wix\Banner.bmp'/>-->
186+
187+
188+
<!--
189+
Uncomment the next `WixVariable` tag to customize the installer's
190+
Graphical User Interface (GUI) and add a custom image to the first
191+
dialog, or screen. See the WiX Toolset documentation for details about
192+
customization.
193+
194+
The dialog BMP dimensions are 493 x 312 pixels.
195+
-->
196+
<!--<WixVariable Id='WixUIDialogBmp' Value='wix\Dialog.bmp'/>-->
197+
198+
</Product>
199+
200+
</Wix>

0 commit comments

Comments
 (0)