forked from jenkinsci/jenkins
/
jenkins.wxs
107 lines (87 loc) · 5.52 KB
/
jenkins.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
<?xml version="1.0"?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Jenkins $(var.VERSION)' Id='*' UpgradeCode='415933d8-4104-47c3-aee9-66b31de07a57'
Language='1033' Codepage='1252' Version='0.$(var.VERSION).0' Manufacturer='Jenkins project'>
<Package Id='*' Keywords='Installer' Description="Jenkins"
Comments='Continuous Integration Server'
InstallerVersion='100' Compressed='yes' SummaryCodepage='1252' />
<Media Id='1' Cabinet='jenkins.cab' EmbedCab='yes'/>
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='JenkinsDir' Name='Jenkins' FileSource=".">
<Directory Id='JreDir' Name='jre'/>
<Component Id='Main' Guid='e4a652bf-c210-4a45-95c4-5dc875b4880b'>
<File Name="jenkins.exe" Source='tmp/jenkins.exe' KeyPath='yes'/>
<File Name="jenkins.xml" Source='tmp/jenkins.xml' DiskId='1' />
<File Name="jenkins.war" Source='$(var.WAR)' DiskId='1' />
<ServiceInstall Id="JenkinsService"
Name="Jenkins"
DisplayName="Jenkins"
Type="ownProcess"
Start="auto"
ErrorControl="normal"
Description="Jenkins Continuous Integration Server"
Account="[SERVICEACCOUNT]"
Password="[SERVICEPASSWORD]" />
<ServiceControl Id="ControlJenkinsService" Name="Jenkins" Start="install" Stop="both" Wait="yes" Remove="uninstall"/>
</Component>
</Directory>
</Directory>
</Directory>
<Upgrade Id="415933d8-4104-47c3-aee9-66b31de07a57">
<UpgradeVersion Minimum="0.0.0" Maximum="99.99.99" Property="PREVIOUSVERSIONINSTALLED" />
</Upgrade>
<InstallExecuteSequence>
<!--
Earlier I suffered a problem where after an upgrade, all the JRE files are removed
(if I then repair the installation, it'll work, so it's not the missing definitions in the msi file.)
I'm still new to MSI/WiX to be able to really understand what's going on, but
http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg32537.html seems to explain the problem,
(as caused by the interaction between deferred removal), and the take away from this thread
as a whole seems to be that for auto-generated wxs files (from heat), it's just not possible
to get the file updates done right (WTF?!).
The InstallInitialize seems to work. My naive hypothesis is that this stops the service and
deletes all the files before new ones are added (OTOH, I still get a dialog that some files
are in use and I need to reboot, so I could be all wrong, or maybe the installer is showing
this dialog incorrectly as a precaution, as alluded in http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg06878.html)
I remember seeing another e-mail on the wix-users list about <ServiceControl> not actually
waiting until the full termination of the service, and if so, this still might not work.
In any case, noting my experiments so that future changes to this value will be done very carefully.
-->
<RemoveExistingProducts After="InstallInitialize"/>
</InstallExecuteSequence>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='Main' />
<ComponentGroupRef Id='JreComponents' />
</Feature>
<UI>
<UIRef Id="WixUI_Common" />
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="Minimal" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<DialogRef Id="WelcomeDlg" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="PrepareDlg">1</Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
<Property Id="ARPNOMODIFY" Value="1" />
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">NOT installed</Publish>
</UI>
<!-- launch a browser at the end of the installation -->
<Property Id="WixShellExecTarget" Value="http://localhost:8080/"/>
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
</Product>
</Wix>