Sections hashtable should be case insensitive
[castle.git] / Setup / Setup.build
blobbfb735fef82aa4429c88a174f7f9ec3085f4d27c
1 <?xml version="1.0" encoding='iso-8859-1' ?>
2 <project
3 name="castle-setup"
4 default="build"
5 xmlns="http://nant.sf.net/release/0.85/nant.xsd"
8 <property name="root.dir" value=".." />
9 <include buildfile="${root.dir}/common-project.xml" />
11 <target name="init" depends="common.init">
12 <!-- Find WiX -->
13 <exec
14 program="${wix.dir}/candle.exe"
15 resultproperty="wix.found"
16 failonerror="false" />
17 <property name="wix.found" value="${wix.found == '0'}" />
19 <fail message="ERROR: WiX not found, unable to create MSI" unless="${wix.found}"/>
20 <echo message="INFO: Found WiX at ${wix.dir}" if="${wix.found}"/>
21 </target>
23 <target name="build" description="Build ${project::get-name()}" depends="init">
24 <if test="${wix.found}">
25 <property name="build.setup.dir" value="${path::get-full-path(build.base.dir)}/setup" overwrite="false" />
26 <mkdir dir="${build.setup.dir}" />
27 <call target="wix-location-gen-include" />
28 <call target="wix-version-gen-include" />
29 <copy todir="${build.setup.dir}">
30 <fileset>
31 <include name="${src.dir}/*.txt" />
32 <include name="${src.dir}/*.wxs" />
33 <include name="${src.dir}/*.wxi" />
34 <include name="License.rtf" />
35 <exclude name="Status.txt"/>
36 </fileset>
37 </copy>
38 <copy todir="${build.setup.dir}">
39 <fileset>
40 <include name="${src.dir}/Binary/*.*" />
41 </fileset>
42 </copy>
43 <property name="build.msi.dir" value="${build.setup.dir}" overwrite="false" />
44 <property name="build.msi.file" value="castleproject-${project.major}.${project.minor}.${project.build}.${project.revision}.msi" overwrite="false" />
45 <property name="build.msi.fullpath" value="${build.msi.dir}/${build.msi.file}" readonly="true" />
46 <exec
47 program="${wix.dir}/candle.exe"
48 workingdir="${build.setup.dir}"
49 commandline="-nologo Castle.wxs UI.wxs Bin.wxs Docs.wxs ReleaseNotes.wxs Samples.wxs Sources.wxs WizardVs2003.wxs WizardVs2005.wxs " />
50 <exec program="${wix.dir}/light.exe"
51 workingdir="${build.setup.dir}" verbose="true"
52 commandline='-wx -out ${build.msi.fullpath} Castle.wixobj UI.wixobj Bin.wixobj Docs.wixobj ReleaseNotes.wixobj Samples.wixobj Sources.wixobj WizardVs2003.wixobj WizardVs2005.wixobj" '>
53 </exec>
54 </if>
55 </target>
57 <target name="wix-location-gen-include">
58 <echo file="${build.setup.dir}/LocationInclude.wxi" append="false">&lt;?xml version="1.0" encoding="utf-8"?&gt;</echo>
59 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;Include Id="LocationInclude"&gt;</echo>
60 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;?define BuildBaseDir="${path::get-full-path(build.base.dir)}"?&gt;</echo>
61 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;?define BuildNet11Dir="${path::get-full-path(build.base.dir)}\net-1.1\${project.config}"?&gt;</echo>
62 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;?define BuildNet20Dir="${path::get-full-path(build.base.dir)}\net-2.0\${project.config}"?&gt;</echo>
63 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;?define ReleaseNotesDir="${releasenotes.dir}"?&gt;</echo>
64 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;?define SharedLibs="${path::get-full-path('${root.dir}\..\..\SharedLibs')}"?&gt;</echo>
66 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;?define WizardDir="${path::get-full-path(root.dir)}\Tools\VSNetWizards"?&gt;</echo>
67 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;?define VSTemplates70="${path::get-full-path(root.dir)}\Tools\VSNetWizards\CastleTemplates\VS7"?&gt;</echo>
68 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;?define VSTemplates80="${path::get-full-path(root.dir)}\Tools\VSNetWizards\CastleTemplates\VS8"?&gt;</echo>
70 <echo file="${build.setup.dir}/LocationInclude.wxi" append="true">&lt;/Include&gt;</echo>
71 </target>
73 <target name="wix-version-gen-include">
74 <echo file="${build.setup.dir}/VersionNumberInclude.wxi" append="false">&lt;?xml version="1.0" encoding="utf-8"?&gt;</echo>
75 <echo file="${build.setup.dir}/VersionNumberInclude.wxi" append="true">&lt;Include Id="VersionNumberInclude"&gt;</echo>
76 <echo file="${build.setup.dir}/VersionNumberInclude.wxi" append="true">&lt;?define MajorVersion="${project.major}"?&gt;</echo>
77 <echo file="${build.setup.dir}/VersionNumberInclude.wxi" append="true">&lt;?define MinorVersion="${project.minor}"?&gt;</echo>
78 <echo file="${build.setup.dir}/VersionNumberInclude.wxi" append="true">&lt;?define MicroVersion="${project.build}"?&gt;</echo>
79 <echo file="${build.setup.dir}/VersionNumberInclude.wxi" append="true">&lt;?define BuildVersion="${project.revision}"?&gt;</echo>
80 <echo file="${build.setup.dir}/VersionNumberInclude.wxi" append="true">&lt;/Include&gt;</echo>
81 </target>
83 </project>