提交 e7e9b9e2 编写于 作者: K Kohsuke Kawaguchi

renaming MSI package

上级 8a1a8828
#!/bin/bash -ex #!/bin/bash -ex
if [ ! -e "$1" ]; then if [ ! -e "$1" ]; then
echo "Usage: build-on-hudson path/to/war" echo "Usage: build-on-jenkins path/to/war"
exit 1 exit 1
fi fi
if [ "$HUDSON_URL" == "" ]; then if [ "$HUDSON_URL" == "" ]; then
export HUDSON_URL=http://hudson.sfbay/ export HUDSON_URL=http://hudson.sfbay/
fi fi
tar cvzf bundle.tgz FindJava.java build.sh hudson.wxs tar cvzf bundle.tgz FindJava.java build.sh jenkins.wxs
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 java -jar jenkins-cli.jar dist-fork -z bundle.tgz -f jenkins.war="$1" -l windows -Z result.tgz bash -ex build.sh jenkins.war
# hack until we fix distfork to avoid pointless intermediate directory # hack until we fix distfork to avoid pointless intermediate directory
rm -rf distfork* rm -rf distfork*
tar xvzf result.tgz tar xvzf result.tgz
mv distfork*/hudson-*.msi . mv distfork*/jenkins-*.msi .
...@@ -3,17 +3,17 @@ export PATH=~/tools/native/wix:$PATH ...@@ -3,17 +3,17 @@ export PATH=~/tools/native/wix:$PATH
war="$1" war="$1"
if [ ! -e "$war" ]; then if [ ! -e "$war" ]; then
echo "build.sh path/to/hudson.war" echo "build.sh path/to/jenkins.war"
exit 1 exit 1
fi fi
rm -rf tmp || true rm -rf tmp || true
mkdir tmp || true mkdir tmp || true
unzip -p "$war" 'WEB-INF/lib/hudson-core-*.jar' > tmp/core.jar unzip -p "$war" 'WEB-INF/lib/jenkins-core-*.jar' > tmp/core.jar
unzip -p tmp/core.jar windows-service/hudson.exe > tmp/hudson.exe unzip -p tmp/core.jar windows-service/jenkins.exe > tmp/jenkins.exe
unzip -p tmp/core.jar windows-service/hudson.xml > tmp/hudson.xm_ unzip -p tmp/core.jar windows-service/jenkins.xml > tmp/jenkins.xm_
# replace executable name to the bundled JRE # replace executable name to the bundled JRE
sed -e 's|executable.*|executable>%BASE%\\jre\\bin\\java</executable>|' < tmp/hudson.xm_ > tmp/hudson.xml sed -e 's|executable.*|executable>%BASE%\\jre\\bin\\java</executable>|' < tmp/jenkins.xm_ > tmp/jenkins.xml
# capture JRE # capture JRE
javac FindJava.java javac FindJava.java
...@@ -25,9 +25,9 @@ heat dir "$JREDIR" -o jre.wxs -sfrag -sreg -nologo -srd -gg -cg JreComponents -d ...@@ -25,9 +25,9 @@ heat dir "$JREDIR" -o jre.wxs -sfrag -sreg -nologo -srd -gg -cg JreComponents -d
v=$(unzip -p "$war" META-INF/MANIFEST.MF | grep Implementation-Version | cut -d ' ' -f2 | tr -d '\r') v=$(unzip -p "$war" META-INF/MANIFEST.MF | grep Implementation-Version | cut -d ' ' -f2 | tr -d '\r')
echo version=$v echo version=$v
candle -dVERSION=$v -dJreDir="$JREDIR" -dWAR="$war" -nologo -ext WixUIExtension -ext WixUtilExtension hudson.wxs jre.wxs candle -dVERSION=$v -dJreDir="$JREDIR" -dWAR="$war" -nologo -ext WixUIExtension -ext WixUtilExtension jenkins.wxs jre.wxs
# '-sval' skips validation. without this, light somehow doesn't work on automated build environment # '-sval' skips validation. without this, light somehow doesn't work on automated build environment
light -o hudson-$v.msi -sval -nologo -dcl:high -ext WixUIExtension -ext WixUtilExtension hudson.wixobj jre.wixobj light -o jenkins-$v.msi -sval -nologo -dcl:high -ext WixUIExtension -ext WixUtilExtension jenkins.wixobj jre.wixobj
# avoid bringing back files that we don't care # avoid bringing back files that we don't care
rm -rf tmp *.class *.wixpdb *.wixobj rm -rf tmp *.class *.wixpdb *.wixobj
<?xml version="1.0"?> <?xml version="1.0"?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Hudson $(var.VERSION)' Id='*' UpgradeCode='ca304bcd-a9a4-4178-8fac-e0505b1e05f3' <Product Name='Jenkins $(var.VERSION)' Id='*' UpgradeCode='ca304bcd-a9a4-4178-8fac-e0505b1e05f3'
Language='1033' Codepage='1252' Version='0.$(var.VERSION).0' Manufacturer='Hudson project'> Language='1033' Codepage='1252' Version='0.$(var.VERSION).0' Manufacturer='Jenkins project'>
<Package Id='*' Keywords='Installer' Description="Hudson" <Package Id='*' Keywords='Installer' Description="Jenkins"
Comments='Continuous Integration Server' Comments='Continuous Integration Server'
InstallerVersion='100' Compressed='yes' SummaryCodepage='1252' /> InstallerVersion='100' Compressed='yes' SummaryCodepage='1252' />
<Media Id='1' Cabinet='hudson.cab' EmbedCab='yes'/> <Media Id='1' Cabinet='jenkins.cab' EmbedCab='yes'/>
<Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'> <Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='HudsonDir' Name='Hudson' FileSource="."> <Directory Id='JenkinsDir' Name='Jenkins' FileSource=".">
<Directory Id='JreDir' Name='jre'/> <Directory Id='JreDir' Name='jre'/>
<Component Id='Main' Guid='8fd00c9c-e018-46d6-9135-67696ea0bcbf'> <Component Id='Main' Guid='8fd00c9c-e018-46d6-9135-67696ea0bcbf'>
<File Name="hudson.exe" Source='tmp/hudson.exe' KeyPath='yes'/> <File Name="jenkins.exe" Source='tmp/jenkins.exe' KeyPath='yes'/>
<File Name="hudson.xml" Source='tmp/hudson.xml' DiskId='1' /> <File Name="jenkins.xml" Source='tmp/jenkins.xml' DiskId='1' />
<File Name="hudson.war" Source='$(var.WAR)' DiskId='1' /> <File Name="jenkins.war" Source='$(var.WAR)' DiskId='1' />
<ServiceInstall Id="HudsonService" <ServiceInstall Id="JenkinsService"
Name="Hudson" Name="Jenkins"
DisplayName="Hudson" DisplayName="Jenkins"
Type="ownProcess" Type="ownProcess"
Start="auto" Start="auto"
ErrorControl="normal" ErrorControl="normal"
Description="Hudson Continuous Integration Server" Description="Jenkins Continuous Integration Server"
Account="[SERVICEACCOUNT]" Account="[SERVICEACCOUNT]"
Password="[SERVICEPASSWORD]" /> Password="[SERVICEPASSWORD]" />
<ServiceControl Id="ControlHudsonService" Name="Hudson" Start="install" Stop="both" Wait="yes" Remove="uninstall"/> <ServiceControl Id="ControlJenkinsService" Name="Jenkins" Start="install" Stop="both" Wait="yes" Remove="uninstall"/>
</Component> </Component>
</Directory> </Directory>
</Directory> </Directory>
......
#!/bin/bash -ex #!/bin/bash -ex
tar cvzf send.tgz FindJava.java build.sh hudson.wxs tar cvzf send.tgz FindJava.java build.sh jenkins.wxs
java -jar hudson-cli.jar dist-fork -z send.tgz -l windows -f hudson.war="$1" -Z result.tgz bash build.sh hudson.war java -jar jenkins-cli.jar dist-fork -z send.tgz -l windows -f jenkins.war="$1" -Z result.tgz bash build.sh jenkins.war
...@@ -8,5 +8,5 @@ var args = WScript.Arguments; ...@@ -8,5 +8,5 @@ var args = WScript.Arguments;
signer.Load(args(1)); signer.Load(args(1));
sc.FileName = args(0); sc.FileName = args(0);
sc.Description = args(2); sc.Description = args(2);
sc.DescriptionURL = "http://hudson-ci.org/"; sc.DescriptionURL = "http://jenkins-ci.org/";
sc.Sign(signer); sc.Sign(signer);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册