Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: b7e50f769a
Fetching contributors…

Cannot retrieve contributors at this time

108 lines (87 sloc) 5.52 KB
<?xml version="1.0"?>
<Wix xmlns=''>
<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='' 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"
Description="Jenkins Continuous Integration Server"
<ServiceControl Id="ControlJenkinsService" Name="Jenkins" Start="install" Stop="both" Wait="yes" Remove="uninstall"/>
<Upgrade Id="415933d8-4104-47c3-aee9-66b31de07a57">
<UpgradeVersion Minimum="0.0.0" Maximum="99.99.99" Property="PREVIOUSVERSIONINSTALLED" />
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 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
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"/>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='Main' />
<ComponentGroupRef Id='JreComponents' />
<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>
<!-- 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" />
Jump to Line
Something went wrong with that request. Please try again.