Skip to content

Commit

Permalink
New Ant build scripts for Windows.
Browse files Browse the repository at this point in the history
Work in progress: packaging installer does not yet work.

git-svn-id: https://valelab.ucsf.edu/svn/micromanager2/trunk@11546 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd
  • Loading branch information
mark committed Aug 14, 2013
1 parent d4e720b commit 307202b
Show file tree
Hide file tree
Showing 55 changed files with 619 additions and 929 deletions.
13 changes: 0 additions & 13 deletions acqEngine/build.bat

This file was deleted.

12 changes: 12 additions & 0 deletions acqEngine/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<project name="MMAcqEngine">
<property name="namespace" value="org.micromanager.acq-engine"/>

<import file="../buildscripts/clojurebuild.xml"/>

<path id="project.classpath">
<pathelement location="${mm.java.lib.imagej}"/>
<pathelement location="${mm.java.lib.mmcorej}"/>
<pathelement location="${mm.java.lib.mmstudio}"/>
<pathelement location="${mm.java.lib.beanshell}"/>
</path>
</project>
120 changes: 34 additions & 86 deletions autofocus/build.xml
Original file line number Diff line number Diff line change
@@ -1,86 +1,34 @@
<!-- Ant makefile for the Micro-Manager Autofocus plugin -->
<!-- This file assumes Micro-Manager project tree structure -->

<project name="Autofocus" default="build">

<!-- Specify the system path to the ImageJ root directory -->
<property name="InstallRoot" value="../Install_AllPlatforms/micro-manager"/>

<!-- Do not modify from this point on -->
<property name="IJ" value="../../3rdpartypublic/classext/ij.jar"/>
<property name="beanshell" value="../../3rdpartypublic/classext/bsh-2.0b4.jar"/>
<property name="commonsmath" value="../../3rdpartypublic/classext/commons-math-2.0.jar"/>
<property name="MMCoreJ" value="../bin_Win32/MMCoreJ.jar"/>
<property name="mmautofocus-inst" value="${InstallRoot}/mmautofocus"/>
<property name="Runtime" value="../bin_Win32"/>

<path id="project.class.path">
<pathelement location="${IJ}" />
<pathelement location="${beanshell}" />
<pathelement location="${MMCoreJ}" />
<pathelement location="${commonsmath}" />
<pathelement location="../mmstudio/MMJ_.jar"/>
</path>

<target name="compile" description="Compile MM Autofocus plugins.">
<mkdir dir="build" />
<mkdir dir="buildTB" />
<mkdir dir="buildDuo" />
<mkdir dir="buildOughta" />
<javac srcdir="." destdir="./build" optimize="on" source="1.5" target="1.5" debug="off">
<include name="*.java"/>
<exclude name="*TB*.java"/>
<exclude name="*Duo*.java"/>
<classpath refid="project.class.path" />
</javac>
<javac srcdir="." destdir="./buildTB" optimize="on" source="1.5" target="1.5" debug="off">
<include name="*TB*.java"/>
<exclude name="Autofocus.java"/>
<classpath refid="project.class.path" />
</javac>
<javac srcdir="." destdir="./buildDuo" optimize="on" source="1.5" target="1.5" debug="off">
<include name="*Duo*.java"/>
<classpath refid="project.class.path" />
</javac>
<javac srcdir="." destdir="./buildOughta" optimize="on" source="1.5" target="1.5" debug="off">
<include name="*OughtaFocus*.java"/>
<classpath refid="project.class.path" />
</javac>
</target>

<target name="build" description="Build MMAutofocus.jar">

<jar jarfile="MMAutofocus.jar" basedir="build" />

<copy file="MMAutofocus.jar" todir="${Runtime}" />
<copy file="MMAutofocus.jar" todir="${mmautofocus-inst}/" />

<jar jarfile="MMAutofocusTB.jar" basedir="buildTB" />

<copy file="MMAutofocusTB.jar" todir="${Runtime}" />
<copy file="MMAutofocusTB.jar" todir="${mmautofocus-inst}/" />

<jar jarfile="MMAutofocusDuo.jar" basedir="buildDuo" />

<copy file="MMAutofocusDuo.jar" todir="${Runtime}" />
<copy file="MMAutofocusDuo.jar" todir="${mmautofocus-inst}/" />

<jar jarfile="MMOughtaFocus.jar" basedir="buildOughta" />

<copy file="MMOughtaFocus.jar" todir="${Runtime}" />
<copy file="MMOughtaFocus.jar" todir="${mmautofocus-inst}/" />
</target>

<target name="clean" description="Delete the MMAutofocus build files.">
<delete dir="build" />
<delete file="MMAutofocus.jar" />
<delete dir="buildTB" />
<delete file="MMAutofocusTB.jar" />
<delete dir="buildDuo" />
<delete file="MMAutofocusDuo.jar" />
<delete dir="buildOughta" />
<delete file="MMOughtaFocus.jar" />

</target>

</project>
<project name="mm.autofocus.plugins" basedir="." default="jar">
<macrodef name="run-all">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<fileset dir="buildscripts" includes="*.xml" excludes="autofocusbuild.xml"/>
</subant>
</sequential>
</macrodef>

<target name="prerequisites">
<run-all target="prerequisites"/>
</target>

<target name="compile">
<run-all target="compile"/>
</target>

<target name="copy-files">
<run-all target="copy-files"/>
</target>

<target name="jar">
<run-all target="jar"/>
</target>

<target name="install">
<run-all target="install"/>
</target>

<target name="clean">
<run-all target="clean"/>
</target>
</project>
4 changes: 4 additions & 0 deletions autofocus/buildscripts/Autofocus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<project name="MMAutofocus" default="jar">
<property name="sourcefile" value="Autofocus.java"/>
<import file="autofocusbuild.xml"/>
</project>
4 changes: 4 additions & 0 deletions autofocus/buildscripts/AutofocusDuo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<project name="MMAutofocusDuo" default="jar">
<property name="sourcefile" value="AutofocusDuo.java"/>
<import file="autofocusbuild.xml"/>
</project>
4 changes: 4 additions & 0 deletions autofocus/buildscripts/AutofocusTB.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<project name="MMAutofocusTB" default="jar">
<property name="sourcefile" value="AutofocusTB.java"/>
<import file="autofocusbuild.xml"/>
</project>
4 changes: 4 additions & 0 deletions autofocus/buildscripts/OughtaFocus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<project name="MMOughtaFocus" default="jar">
<property name="sourcefile" value="OughtaFocus.java"/>
<import file="autofocusbuild.xml"/>
</project>
23 changes: 23 additions & 0 deletions autofocus/buildscripts/autofocusbuild.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<project name="mm.autofocusbuild">
<include file="../../buildscripts/buildprops.xml"/>

<property name="srcdir" location=".."/>
<property name="installdir" location="${mm.java.autofocus.installdir}"/>

<import file="../../buildscripts/javabuild.xml"/>

<path id="project.classpath">
<pathelement location="${mm.java.lib.commons-math}"/>
<pathelement location="${mm.java.lib.imagej}"/>
<pathelement location="${mm.java.lib.mmcorej}"/>
<pathelement location="${mm.java.lib.mmstudio}"/>
</path>

<target name="compile" depends="prerequisites" description="Compile Java source">
<mkdir dir="${intdir}"/>
<mm-javac srcdir="${srcdir}" destdir="${intdir}">
<include name="${sourcefile}"/>
<classpath refid="project.classpath"/>
</mm-javac>
</target>
</project>
117 changes: 117 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<!-- Build all components of Micro-Manager -->
<!-- Run 'ant -p' for usage -->
<project name="mm" basedir="." default="build">
<include file="buildscripts/buildprops.xml"/>

<presetdef name="buildcpp">
<exec executable="cmd">
<arg value="/c"/>
<arg value="buildscripts\buildCpp.bat"/>
<arg value="${mm.architecture}"/>
</exec>
</presetdef>

<target name="build-cpp" description="Build all C++ components">
<buildcpp/>
</target>

<target name="build-mmcorej" description="Build MMCoreJ Java package">
<!-- Until we update the C++ build and separte out the Java
compilation, just use the results generated by
MMCoreJ_wrap.vcproj -->
<mkdir dir="${mm.java.outdir}"/>
<copy todir="${mm.java.outdir}" file="${mm.cpp.outdir}/MMCoreJ.jar"/>
</target>

<macrodef name="run-all-java-projects">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<filelist dir=".">
<!-- Note: Order matters -->
<file name="mmstudio/build.xml"/>
<file name="acqEngine/build.xml"/>
<file name="plugins/build.xml"/>
<file name="autofocus/build.xml"/>
</filelist>
</subant>
</sequential>
</macrodef>

<target name="build" depends="build-cpp,build-mmcorej" description="Build all components">
<run-all-java-projects target="jar"/>
</target>

<target name="stage" depends="build" description="Assemble files to install">
<run-all-java-projects target="install"/>

<!-- Until we update the C++ build, just copy all output files
here -->
<copy todir="${mm.installdir}">
<fileset dir="${mm.cpp.outdir}" includes="*"/>
</copy>

<!-- XXX Remaining files to copy; should put elsewhere -->
<copy todir="${mm.installdir}" file="${mm.basedir}/../3rdpartypublic/JavaLauncher/ImageJ.exe"/>
<copy todir="${mm.installdir}" file="${mm.java.lib.imagej}"/>
<copy todir="${mm.java.installdir}">
<!-- XXX Should limit to the Jars that are actually
used. Use Ivy? -->
<fileset dir="${mm.java.libs}" includes="*.jar" excludes="ij.jar"/>
</copy>
<mkdir dir="${mm.scripts.installdir}"/>
<copy todir="${mm.scripts.installdir}">
<filelist dir="${mm.scripts.srcdir}">
<!-- XXX By what criteria are we including scripts? -->
<!-- XXX We are out of sync with the Unix build -->
<file name="AutoExpose.bsh"/>
<file name="Init.bsh"/>
<file name="camera_test.bsh"/>
<file name="config_test.bsh"/>
<file name="image_snap_example.bsh"/>
<file name="image_snap_example_2.bsh"/>
<file name="live_demo.bsh"/>
<file name="manualAcq.bsh"/>
<file name="mm_beanshell_startup.bsh"/>
<file name="mm_inspector.bsh"/>
<file name="mm_load_docs.bsh"/>
<file name="mm_test_all.bsh"/>
<file name="mm_test_camera.bsh"/>
<file name="mm_test_properties.bsh"/>
<file name="mm_test_shutter.bsh"/>
<file name="mm_test_xystage.bsh"/>
<file name="mm_test_zstage.bsh"/>
<file name="sdemo1.bsh"/>
<file name="sdemo2.bsh"/>
<file name="setZoom.bsh"/>
<file name="slm_demo.bsh"/>
</filelist>
</copy>
</target>

<target name="package" depends="stage">
<exec dir="${mm.installdir}" executable="${mm.basedir}/../3rdparty/Inno_Setup_5/iscc.exe">
<!-- TODO 32 vs 64 -->
<arg line="/FMMSetup_ ${mm.basedir}/Install_${mm.architecture}/MM-ImageJ-Install64.iss"/>
</exec>
</target>

<target name="clean">
<!-- <delete dir="${mm.cpp.outdir}"/> -->
<delete dir="${mm.cpp.intdir}"/>
<run-all-java-projects target="clean"/>
</target>

<target name="clean-all">
<delete dir="${mm.outdir}"/>
<delete dir="${mm.intdir}"/>
</target>

<target name="unstage">
<delete dir="${mm.installdir}"/>
</target>

<target name="unstage-all">
<delete dir="${mm.stagedir}"/>
</target>
</project>
Loading

0 comments on commit 307202b

Please sign in to comment.