Skip to content

Commit 9460baf

Browse files
author
kohsuke
committedJan 26, 2010
finally got to the working MSI
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@26474 71c3de6d-444a-0410-be80-ed276b4c234a
1 parent 24e03cc commit 9460baf

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed
 

‎msi/build-on-hudson.sh

+5
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ if [ "$HUDSON_URL" == "" ]; then
88
fi
99
tar cvzf bundle.tgz FindJava.java build.sh hudson.wxs
1010
java -jar hudson-cli.jar dist-fork -z bundle.tgz -f hudson.war="$1" -l windows -Z result.tgz bash -ex build.sh hudson.war
11+
12+
# hack until we fix distfork to avoid pointless intermediate directory
13+
rm -rf distfork*
14+
tar xvzf result.tgz
15+
mv distfork*/hudson-*.msi .

‎msi/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ candle -dVERSION=$v -dJreDir="$JREDIR" -dWAR="$war" -nologo -ext WixUIExtension
3030
light -o hudson-$v.msi -sval -nologo -dcl:high -ext WixUIExtension -ext WixUtilExtension hudson.wixobj jre.wixobj
3131

3232
# avoid bringing back files that we don't care
33-
rm -rf tmp *.class *.wixpdb *.wixobj *.wxs
33+
rm -rf tmp *.class *.wixpdb *.wixobj

‎msi/hudson.wxs

+22-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
Description="Hudson Continuous Integration Server"
2525
Account="[SERVICEACCOUNT]"
2626
Password="[SERVICEPASSWORD]" />
27-
<ServiceControl Id="StartHudsonService" Name="Hudson" Start="install" Wait="no" />
28-
<ServiceControl Id="StopHudsonService" Name="Hudson" Stop="both" Wait="yes" Remove="uninstall" />
27+
<ServiceControl Id="ControlHudsonService" Name="Hudson" Start="install" Stop="both" Wait="yes" Remove="uninstall"/>
2928
</Component>
3029
</Directory>
3130
</Directory>
@@ -35,7 +34,27 @@
3534
<UpgradeVersion Minimum="0.0.0" Maximum="99.99.99" Property="PREVIOUSVERSIONINSTALLED" />
3635
</Upgrade>
3736
<InstallExecuteSequence>
38-
<RemoveExistingProducts After="InstallFinalize"/>
37+
<!--
38+
Earlier I suffered a problem where after an upgrade, all the JRE files are removed
39+
(if I then repair the installation, it'll work, so it's not the missing definitions in the msi file.)
40+
41+
I'm still new to MSI/WiX to be able to really understand what's going on, but
42+
http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg32537.html seems to explain the problem,
43+
(as caused by the interaction between deferred removal), and the take away from this thread
44+
as a whole seems to be that for auto-generated wxs files (from heat), it's just not possible
45+
to get the file updates done right (WTF?!).
46+
47+
The InstallInitialize seems to work. My naive hypothesis is that this stops the service and
48+
deletes all the files before new ones are added (OTOH, I still get a dialog that some files
49+
are in use and I need to reboot, so I could be all wrong, or maybe the installer is showing
50+
this dialog incorrectly as a precaution, as alluded in http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg06878.html)
51+
52+
I remember seeing another e-mail on the wix-users list about <ServiceControl> not actually
53+
waiting until the full termination of the service, and if so, this still might not work.
54+
55+
In any case, noting my experiments so that future changes to this value will be done very carefully.
56+
-->
57+
<RemoveExistingProducts After="InstallInitialize"/>
3958
</InstallExecuteSequence>
4059

4160
<Feature Id='Complete' Level='1'>

0 commit comments

Comments
 (0)
Please sign in to comment.