Skip to content

Commit 1f89311

Browse files
author
Vlad Ionescu
committed
adding wxs source code to create windows installer .msm and .msi files; adding build-windows-install-msm and build-windows-install-msi nant targets
1 parent 0f6506f commit 1f89311

16 files changed

+1535
-1
lines changed

.hgignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ syntax: regexp
1010

1111
^src/wcf/RabbitMQ\.ServiceModel/RabbitMQ\.ServiceModel\.xml
1212
^src/wcf/RabbitMQ\.ServiceModel/AssemblyInfo\.cs$
13+
^src/wix/dotnet-client-merge-module\.wxs$
14+
^src/wix/dotnet-client-product\.wxs$
1315
~$
1416

License.rtf

Lines changed: 693 additions & 0 deletions
Large diffs are not rendered by default.

bitmaps/New.ico

318 Bytes
Binary file not shown.

bitmaps/Up.ico

318 Bytes
Binary file not shown.

bitmaps/bannrbmp.bmp

29.1 KB
Binary file not shown.

bitmaps/dlgbmp.bmp

152 KB
Binary file not shown.

bitmaps/exclamic.ico

766 Bytes
Binary file not shown.

bitmaps/info.ico

1.05 KB
Binary file not shown.

default.build

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<property name="build.dir" value="build"/>
99
<property name="bin.dir" value="${build.dir}/bin" />
1010
<property name="dist.dir" value="${build.dir}/dist" />
11+
<property name="wix.build.dir" value="${build.dir}/wix" />
1112
<property name="wcf.dist.dir" value="${dist.dir}/wcf" />
1213
<property name="doc.dir" value="${build.dir}/doc" />
1314
<property name="gendoc.xml.dir" value="${doc.dir}/xml" />
@@ -29,6 +30,18 @@
2930
<property name="wcf.bin.dir" value="src/wcf/RabbitMQ.ServiceModel/bin"/>
3031
<property name="wcf.test.bin.dir" value="src/wcf/Test/bin"/>
3132

33+
<property name="wix.mergemodule.src" value="src/wix/dotnet-client-merge-module.wxs.in" />
34+
<property name="wix.mergemodule.target" value="src/wix/dotnet-client-merge-module.wxs" />
35+
<property name="wix.mergemodule.obj" value="${wix.build.dir}/rabbitmq-dotnet-client-msm.wixobj" />
36+
<property name="wix.dotnet.client.msm" value="${wix.build.dir}/rabbitmq-dotnet-client.msm" />
37+
<property name="wix.product.src" value="src/wix/dotnet-client-product.wxs.in" />
38+
<property name="wix.product.target" value="src/wix/dotnet-client-product.wxs" />
39+
<property name="wix.product.obj" value="${wix.build.dir}/rabbitmq-dotnet-client-msi.wixobj" />
40+
<property name="wix.dotnet.client.msi" value="${wix.build.dir}/rabbitmq-dotnet-client.msi" />
41+
42+
<property name="wix.localization" value="src/wix/WixUI_en-us.wxl" />
43+
<property name="wix.ui.lib" value="lib/wixui.wixlib" />
44+
3245
<property name="hg.exec" value="/usr/bin/hg" />
3346

3447
<include buildfile="local.build" />
@@ -45,7 +58,7 @@
4558
<property name="web.url" value="http://stage.rabbitmq.com/" />
4659

4760
<target name="clean" description="remove all generated files"
48-
depends="clean-base,clean-wcf" />
61+
depends="clean-base,clean-wcf,clean-wix,stamp" />
4962

5063
<target name="clean-base" description="remove all generated files in the core client">
5164
<delete dir="${build.dir}" failonerror="false" />
@@ -64,6 +77,10 @@
6477
<delete dir="src/wcf/ConfigDemo/WcfServiceLibrary1/obj" failonerror="false"/>
6578
<delete file="${wcf.assemblyinfo.target}" failonerror="false"/> <!-- it's autogenerated -->
6679
</target>
80+
81+
<target name="clean-wix" description="remove all generated files in the .msm and .msi building process">
82+
<delete dir="${wix.build.dir}" failonerror="false" />
83+
</target>
6784

6885
<target name="generate-assemblyinfo">
6986
<if test="${(not file::up-to-date(gen.assemblyinfo.src, gen.assemblyinfo.target))}">
@@ -156,6 +173,8 @@
156173
<target name="stamp" description="removes the version identifier, so that the next build generates a fresh one">
157174
<delete file="${core.assemblyinfo.target}" failonerror="false" />
158175
<delete file="${wcf.assemblyinfo.target}" failonerror="false" />
176+
<delete file="${wix.mergemodule.target}" failonerror="false" />
177+
<delete file="${wix.product.target}" failonerror="false" />
159178
</target>
160179

161180
<target name="doc" description="produces HTML documentation from the code"
@@ -539,4 +558,56 @@
539558
<call target="src-dist"/>
540559
<call target="copy-deliverables"/>
541560
</target>
561+
562+
<target name="build-windows-install-msm" description="create windows installer merge module. This requires the .dll to be signed" >
563+
<call target="dist" />
564+
<if test="${(not file::up-to-date(wix.mergemodule.src, wix.mergemodule.target))}">
565+
<delete file="${wix.mergemodule.target}" failonerror="false" />
566+
<copy file="${wix.mergemodule.src}" tofile="${wix.mergemodule.target}">
567+
<filterchain>
568+
<replacetokens>
569+
<token key="VERSION" value="${fullversion}" />
570+
</replacetokens>
571+
</filterchain>
572+
</copy>
573+
</if>
574+
<mkdir dir="${wix.build.dir}" />
575+
<exec program="candle">
576+
<arg value="-out" />
577+
<arg value="${wix.mergemodule.obj}" />
578+
<arg value="${wix.mergemodule.target}" />
579+
</exec>
580+
<exec program="light">
581+
<arg value="-out" />
582+
<arg value="${wix.dotnet.client.msm}" />
583+
<arg value="${wix.mergemodule.obj}" />
584+
</exec>
585+
</target>
586+
587+
<target name="build-windows-install-msi" description="create windows installer file. This requires the .dll to be signed" >
588+
<call target="build-windows-install-msm" />
589+
<if test="${(not file::up-to-date(wix.product.src, wix.product.target))}">
590+
<delete file="${wix.product.target}" failonerror="false" />
591+
<copy file="${wix.product.src}" tofile="${wix.product.target}">
592+
<filterchain>
593+
<replacetokens>
594+
<token key="VERSION" value="${fullversion}" />
595+
</replacetokens>
596+
</filterchain>
597+
</copy>
598+
</if>
599+
<exec program="candle">
600+
<arg value="-out" />
601+
<arg value="${wix.product.obj}" />
602+
<arg value="${wix.product.target}" />
603+
</exec>
604+
<exec program="light">
605+
<arg value="-out" />
606+
<arg value="${wix.dotnet.client.msi}" />
607+
<arg value="${wix.product.obj}" />
608+
<arg value="${wix.ui.lib}" />
609+
<arg value="-loc" />
610+
<arg value="${wix.localization}" />
611+
</exec>
612+
</target>
542613
</project>

lib/wixca.dll

111 KB
Binary file not shown.

0 commit comments

Comments
 (0)