kopia lustrzana https://github.com/maccasoft/z80-tools
242 wiersze
10 KiB
XML
242 wiersze
10 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<project default="build">
|
|
<tstamp>
|
|
<format property="timestamp" pattern="yyyyMMdd-HHmm"/>
|
|
</tstamp>
|
|
<property name="app" value="swtapp"/>
|
|
<property name="version" value="1.0.0"/>
|
|
<property name="folder" value="z80-tools"/>
|
|
<property name="mac-folder" value="Z80 Tools"/>
|
|
<property name="package" value="com.maccasoft.tools_${version}.v${timestamp}"/>
|
|
<property name="work" value="build/work"/>
|
|
|
|
<property name="launch4j.dir" location="/opt/launch4j" />
|
|
<taskdef name="launch4j"
|
|
classname="net.sf.launch4j.ant.Launch4jTask"
|
|
classpath="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar" />
|
|
|
|
<property name="bundleapp.dir" location="build/macosx" />
|
|
<taskdef name="bundleapp"
|
|
classname="com.oracle.appbundler.AppBundlerTask"
|
|
classpath="${bundleapp.dir}/appbundler-1.0.jar" />
|
|
|
|
<target name="build">
|
|
<antcall target="build-linux64" />
|
|
<antcall target="build-windows" />
|
|
<antcall target="build-windows64" />
|
|
<antcall target="build-macosx" />
|
|
</target>
|
|
|
|
<!-- Linux x86/64 -->
|
|
<target name="build-linux64">
|
|
<delete dir="${work}" includeemptydirs="true"/>
|
|
<mkdir dir="${work}/${folder}" />
|
|
|
|
<mkdir dir="${work}/bin" />
|
|
<javac target="1.8" source="1.8" destdir="${work}/bin" srcdir="src" debug="true" includeantruntime="false">
|
|
<classpath refid="lib.path.ref"/>
|
|
<classpath>
|
|
<pathelement location="lib/org.eclipse.swt.gtk.linux.x86_64_3.104.2.v20160212-1350.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
|
|
<antcall target="copy-common-files" />
|
|
<copy todir="${work}/${folder}/lib">
|
|
<fileset file="lib/org.eclipse.swt.gtk.linux.x86_64_3.104.2.v20160212-1350.jar"/>
|
|
<fileset file="build/linux/desktop.template" />
|
|
</copy>
|
|
<copy todir="${work}/${folder}/lib/icons">
|
|
<fileset dir="build/linux/icons" />
|
|
</copy>
|
|
<copy todir="${work}/${folder}">
|
|
<fileset file="build/linux/launcher" />
|
|
<fileset file="build/linux/launcher.png" />
|
|
<fileset file="build/linux/install.sh" />
|
|
<fileset file="build/linux/uninstall.sh" />
|
|
</copy>
|
|
<chmod file="${work}/${folder}/launcher" perm="755"/>
|
|
<chmod file="${work}/${folder}/install.sh" perm="755"/>
|
|
<chmod file="${work}/${folder}/uninstall.sh" perm="755"/>
|
|
|
|
<exec executable="tar" dir="${work}" failonerror="true">
|
|
<arg value="czf"/>
|
|
<arg value="../${folder}-linux64-${version}.tar.gz"/>
|
|
<arg value="${folder}"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- Windows x86 -->
|
|
<target name="build-windows">
|
|
<delete dir="${work}" includeemptydirs="true"/>
|
|
<mkdir dir="${work}/${folder}" />
|
|
|
|
<mkdir dir="${work}/bin" />
|
|
<javac target="1.8" source="1.8" destdir="${work}/bin" srcdir="src" debug="true" includeantruntime="false">
|
|
<classpath refid="lib.path.ref"/>
|
|
<classpath>
|
|
<pathelement location="lib/org.eclipse.swt.win32.win32.x86_3.104.2.v20160212-1350.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
|
|
<antcall target="copy-common-files" />
|
|
<copy todir="${work}/${folder}/lib">
|
|
<fileset file="lib/org.eclipse.swt.win32.win32.x86_3.104.2.v20160212-1350.jar"/>
|
|
</copy>
|
|
<copy todir="${work}/${folder}">
|
|
<fileset file="build/windows/launcher.l4j.ini" />
|
|
</copy>
|
|
|
|
<launch4j configFile="build/windows/config.xml"
|
|
outfile="${work}/${folder}/launcher.exe"
|
|
fileVersion="${version}.0"
|
|
txtFileVersion="${version}.0"
|
|
productVersion="${version}.0"
|
|
txtProductVersion="${version}.0" />
|
|
|
|
<exec executable="zip" dir="${work}" failonerror="true">
|
|
<arg value="-q"/>
|
|
<arg value="-r"/>
|
|
<arg value="../${folder}-windows-${version}.zip"/>
|
|
<arg value="${folder}"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- Windows x86/64 -->
|
|
<target name="build-windows64">
|
|
<delete dir="${work}" includeemptydirs="true"/>
|
|
<mkdir dir="${work}/${folder}" />
|
|
|
|
<mkdir dir="${work}/bin" />
|
|
<javac target="1.8" source="1.8" destdir="${work}/bin" srcdir="src" debug="true" includeantruntime="false">
|
|
<classpath refid="lib.path.ref"/>
|
|
<classpath>
|
|
<pathelement location="lib/org.eclipse.swt.win32.win32.x86_64_3.104.2.v20160212-1350.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
|
|
<antcall target="copy-common-files" />
|
|
<copy todir="${work}/${folder}/lib">
|
|
<fileset file="lib/org.eclipse.swt.win32.win32.x86_64_3.104.2.v20160212-1350.jar"/>
|
|
</copy>
|
|
<copy todir="${work}/${folder}">
|
|
<fileset file="build/windows/launcher.l4j.ini" />
|
|
</copy>
|
|
|
|
<launch4j configFile="build/windows/config64.xml"
|
|
outfile="${work}/${folder}/launcher.exe"
|
|
fileVersion="${version}.0"
|
|
txtFileVersion="${version}.0"
|
|
productVersion="${version}.0"
|
|
txtProductVersion="${version}.0" />
|
|
|
|
<exec executable="zip" dir="${work}" failonerror="true">
|
|
<arg value="-q"/>
|
|
<arg value="-r"/>
|
|
<arg value="../${folder}-windows64-${version}.zip"/>
|
|
<arg value="${folder}"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- MacOS/X -->
|
|
<target name="build-macosx">
|
|
<delete dir="${work}" includeemptydirs="true"/>
|
|
<mkdir dir="${work}/${folder}" />
|
|
|
|
<mkdir dir="${work}/bin" />
|
|
<javac target="1.8" source="1.8" destdir="${work}/bin" srcdir="src" debug="true" includeantruntime="false">
|
|
<classpath refid="lib.path.ref"/>
|
|
<classpath>
|
|
<pathelement location="lib/org.eclipse.swt.cocoa.macosx.x86_64_3.104.2.v20160212-1350.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
|
|
<antcall target="copy-common-files" />
|
|
<copy todir="${work}/${folder}/lib" file="lib/org.eclipse.swt.cocoa.macosx.x86_64_3.104.2.v20160212-1350.jar"/>
|
|
|
|
<bundleapp
|
|
outputdirectory="${work}"
|
|
name="${mac-folder}"
|
|
displayname="${mac-folder}"
|
|
identifier="com.maccasoft.tools"
|
|
icon="build/macosx/app.icns"
|
|
shortversion="${version}"
|
|
signature="????"
|
|
copyright="Marco Maccaferri"
|
|
applicationCategory="public.app-category.development"
|
|
mainclassname="com.maccasoft.tools.Application">
|
|
|
|
<classpath file="${work}/${folder}/lib/*.jar"/>
|
|
|
|
<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>
|
|
<option value="-Xms128M"/>
|
|
<option value="-Xmx512M"/>
|
|
</bundleapp>
|
|
|
|
<copy todir="${work}/${mac-folder}.app/Contents/Java" includeemptydirs="false">
|
|
<fileset dir="${work}/${folder}" excludes="**/*.jar" />
|
|
</copy>
|
|
|
|
<exec executable="tar" dir="${work}" failonerror="true">
|
|
<arg value="czf"/>
|
|
<arg value="../${folder}-macosx-${version}.tar.gz"/>
|
|
<arg value="${mac-folder}.app"/>
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
<path id="lib.path.ref">
|
|
<pathelement location="lib/org.eclipse.core.commands_3.7.0.v20150422-0725.jar"/>
|
|
<pathelement location="lib/org.eclipse.core.databinding_1.5.0.v20150422-0725.jar"/>
|
|
<pathelement location="lib/org.eclipse.core.databinding.beans_1.3.0.v20150422-0725.jar"/>
|
|
<pathelement location="lib/org.eclipse.core.databinding.observable_1.5.0.v20150422-0725.jar"/>
|
|
<pathelement location="lib/org.eclipse.core.databinding.property_1.5.0.v20150422-0725.jar"/>
|
|
<pathelement location="lib/org.eclipse.equinox.common_3.7.0.v20150402-1709.jar"/>
|
|
<pathelement location="lib/org.eclipse.jface_3.11.1.v20160128-1644.jar"/>
|
|
<pathelement location="lib/org.eclipse.jface.databinding_1.7.0.v20150406-2148.jar"/>
|
|
<pathelement location="lib/org.eclipse.jface.text_3.10.0.v20150603-1752.jar"/>
|
|
<pathelement location="lib/jackson-annotations-2.7.0.jar"/>
|
|
<pathelement location="lib/jackson-core-2.7.0.jar"/>
|
|
<pathelement location="lib/jackson-databind-2.7.0.jar"/>
|
|
<pathelement location="lib/jssc-2.8.0.jar"/>
|
|
</path>
|
|
|
|
<target name="copy-common-files">
|
|
<jar destfile="${work}/${folder}/lib/${package}.jar">
|
|
<fileset dir="${work}/bin"/>
|
|
<fileset dir="src">
|
|
<exclude name="**/*.java"/>
|
|
</fileset>
|
|
</jar>
|
|
|
|
<copy todir="${work}/${folder}/lib">
|
|
<fileset dir="lib" includes="org.eclipse.core.commands_3.7.0.v20150422-0725.jar"/>
|
|
<fileset dir="lib" includes="org.eclipse.core.databinding_1.5.0.v20150422-0725.jar"/>
|
|
<fileset dir="lib" includes="org.eclipse.core.databinding.beans_1.3.0.v20150422-0725.jar"/>
|
|
<fileset dir="lib" includes="org.eclipse.core.databinding.observable_1.5.0.v20150422-0725.jar"/>
|
|
<fileset dir="lib" includes="org.eclipse.core.databinding.property_1.5.0.v20150422-0725.jar"/>
|
|
<fileset dir="lib" includes="org.eclipse.equinox.common_3.7.0.v20150402-1709.jar"/>
|
|
<fileset dir="lib" includes="org.eclipse.jface_3.11.1.v20160128-1644.jar"/>
|
|
<fileset dir="lib" includes="org.eclipse.jface.databinding_1.7.0.v20150406-2148.jar"/>
|
|
<fileset dir="lib" includes="org.eclipse.jface.text_3.10.0.v20150603-1752.jar"/>
|
|
<fileset dir="lib" includes="jackson-annotations-2.7.0.jar"/>
|
|
<fileset dir="lib" includes="jackson-core-2.7.0.jar"/>
|
|
<fileset dir="lib" includes="jackson-databind-2.7.0.jar"/>
|
|
<fileset dir="lib" includes="jssc-2.8.0.jar"/>
|
|
</copy>
|
|
|
|
<copy todir="${work}/${folder}/examples">
|
|
<fileset dir="examples">
|
|
<include name="**/*.ASM"/>
|
|
</fileset>
|
|
</copy>
|
|
|
|
<copy todir="${work}/${folder}">
|
|
<fileset file="LICENSE"/>
|
|
<fileset file="LICENSE.glass"/>
|
|
<fileset file="LICENSE.z80core"/>
|
|
<fileset file="NOTICE.glass"/>
|
|
</copy>
|
|
</target>
|
|
|
|
</project>
|