1 Star 0 Fork 10

newyear-ly/freemind

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.xml 29.36 KB
一键复制 编辑 原始数据 按行查看 历史
lixuheng 提交于 2020-11-04 13:56 . init
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
<project name="freemind" default="dist" basedir=".">
<!-- read version number from java source: -->
<loadfile property="ver" srcfile="freemind/main/FreeMind.java">
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex pattern='.*new VersionInformation\("(.*?)".*' replace="\1" flags="s" />
</tokenfilter>
<!-- Replace spaces by underscores. -->
<tokenfilter><replaceregex pattern=" " replace="_" flags="g"/></tokenfilter>
</filterchain>
</loadfile>
<property name="freemind.buildnumber.file" value="version.properties"/>
<property name="freemind.installer_year" value="2009"/>
<property name="src" location="."/>
<property name="src_base_for_post" location="../" />
<property name="build" location="../bin/classes" />
<property name="testbuild" location="../bin/testclasses" />
<property name="acc_build" location="accessories/plugins/build.xml" />
<property name="dist" location="../bin/dist" />
<property name="dist.lib" location="${dist}/lib" />
<property name="dist_macos_name" value="FreeMind_${ver}" />
<property name="dist_macos_base" location="../bin/dist_macos" />
<property name="dist_macos" location="${dist_macos_base}/${dist_macos_name}" />
<property name="dist_macos_app_name" value="FreeMind.app" />
<property name="dist_macos_app" location="${dist_macos}/${dist_macos_app_name}"/>
<property name="dist_macos_contents" location="${dist_macos_app}/Contents"/>
<property name="dist_macos_info" location="${dist_macos_contents}/Info.plist"/>
<property name="icns_extension" value="Modern"/>
<property name="FM.jar" location="${dist.lib}/freemind.jar"/>
<property name="test.reports" location="../bin/reports/" />
<property name="post" location="../post" />
<property name="debug" value="on" />
<property name="java_source_version" value="1.6" />
<property name="java_target_version" value="1.6" />
<property name="build.compiler" value="modern" />
<property name="appbundler.jar" value = "appbundler-1.0.jar"/>
<property name="freemind_socket" location="${user.home}/.freemind/freemind.socket"/>
<!-- begin generator part -->
<property name="jibxhome" location="lib/jibx"/>
<property name="jibxjar" location="lib/bindings.jar"/>
<property name="jibxruntimelibs" value="${jibxhome}/jibx-run.jar:${jibxhome}/xpp3.jar"/>
<property name="jibxlibs" value="${jibxhome}/bcel.jar:${jibxhome}/jibx-bind.jar:${jibxhome}/jibx-extras.jar:${jibxruntimelibs}"/>
<taskdef name="bind" classname="org.jibx.binding.ant.CompileTask">
<classpath path="${jibxlibs}"/>
<classpath location="binding/classes"/>
</taskdef>
<property name="formsLib" location="lib/forms-1.0.5.jar:lib/SimplyHTML/SimplyHTML.jar"/>
<property name="simplyHtml" location="lib/SimplyHTML/SimplyHTML.jar"/>
<property name="spellLib" location="lib/jortho.jar"/>
<property name="xsltLib" location="lib/xalan.jar"/>
<property name="xsltLib2" location="lib/serializer.jar"/>
<property name="xsltLib3" location="lib/xml-apis.jar"/>
<property name="xsltLib4" location="lib/xercesImpl.jar"/>
<property name="classpath" value="${jibxruntimelibs}:${jibxjar}:${formsLib}:${simplyHtml}:${spellLib}:${xsltLib}:${xsltLib2}:${xsltLib3}:${xsltLib4}"/>
<path id="jars.path">
<fileset dir="${src}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="xmlbind.checkStatusOfGeneration">
<uptodate property="xmlbind.isUpToDate"
srcfile="freemind_actions.xsd"
targetfile="${jibxjar}"/>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: init
- - - - - - - - - - - - - - - - - -->
<target name="init">
<buildnumber file="${freemind.buildnumber.file}"/>
<loadproperties srcfile="${freemind.buildnumber.file}"></loadproperties>
<property name="version" value="${ver}_${build.number}"/>
<property environment="env" />
<echo>FreeMind Version = ${ver}, build ${build.number}.</echo>
<echo>Checking for duplicate Resource strings</echo>
<exec os="Linux" executable="${src}/check_for_duplicate_resources.sh"></exec>
</target>
<!-- =================================
target: gen
================================= -->
<target name="gen" depends="xmlbind.checkStatusOfGeneration" description="--> Generates the JixB binding jar." unless="xmlbind.isUpToDate">
<mkdir dir="binding" />
<mkdir dir="binding/src" />
<mkdir dir="binding/run" />
<mkdir dir="binding/classes" />
<javac includeantruntime="false" destdir="binding/run"
srcdir="${src}"
classpath="${classpath}"
debug="${debug}"
source="${java_source_version}"
target="${java_target_version}">
<include name="de/foltin/**" />
</javac>
<java fork="true" classpath="binding/run" classname="de.foltin.CompileXsdStart"></java>
<delete dir="binding/run" quiet="true"/>
<!-- Special file for String encoding. -->
<mkdir dir="binding/src/de/foltin"/>
<copy todir="binding/src/de/foltin" file="${src}/de/foltin/StringEncoder.java"/>
<javac includeantruntime="false" srcdir="binding/src" destdir="binding/classes" source="${java_source_version}" target="${java_target_version}" debug="on" />
<echo message="Running binding compiler..." />
<bind verbose="false" load="true">
<bindingfileset dir="binding/src">
<include name="**/*.xml" />
</bindingfileset>
<classpathset dir="binding/classes" />
</bind>
<!-- jar the bindings -->
<jar destfile="${jibxjar}">
<fileset dir="binding/classes">
<include name="**/*.class" />
</fileset>
<fileset dir="binding/src">
<include name="**/*.java" />
<include name="**/*.xml" />
</fileset>
</jar>
<delete dir="binding">
</delete>
<delete failonerror="false" file="${src}/accessories/plugins/MacChanges.java" quiet="true"/>
<delete failonerror="false" file="${src}/accessories/plugins/MacChanges.xml" quiet="true"/>
</target>
<target name="patterns">
<xslt style="patterns_updater.xslt" in="patterns.xml" out="patterns_new.xml" force="true" />
</target>
<!-- end generator part -->
<target name="build" depends="init,gen">
<!-- Perform Mac Changes as a plugin. -->
<exec dir="${src}/accessories/plugins" executable="ln" os="Mac OS X">
<arg value="-s"/>
<arg value="MacChanges.java.not_here"/>
<arg value="MacChanges.java"/>
</exec>
<exec dir="${src}/accessories/plugins" executable="ln" os="Mac OS X">
<arg value="-s"/>
<arg value="MacChanges.xml.not_here"/>
<arg value="MacChanges.xml"/>
</exec>
<!-- end mac changes. -->
<mkdir dir="${build}"/>
<javac includeantruntime="false" srcdir="${src}"
destdir="${build}"
classpath="${classpath}"
debug="${debug}"
source="${java_source_version}"
target="${java_target_version}"
>
<exclude name="${gen.dir}/**" />
<exclude name="accessories/plugins/**" />
<!-- Currently, JUnit tests are only supported inside eclipse due to
classpath problems of the plugins. -->
<exclude name="tests/**" />
<exclude name="plugins/**" />
</javac>
<!-- Starter should work with java 1.1, too as it checks the java version.-->
<delete failonerror="false" file="${build}/freemind/main/FreeMindStarter.class"></delete>
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpath="${classpath}" debug="${debug}" source="1.3" target="1.1">
<include name="freemind/main/FreeMindStarter.java"/>
</javac>
<ant antfile="${acc_build}" target="build"/>
<ant antfile="plugins/build.xml" target="build"/>
</target>
<target name="build_tests" depends="build">
<mkdir dir="${testbuild}"/>
<javac includeantruntime="false" srcdir="${src}"
destdir="${testbuild}"
debug="${debug}"
source="${java_source_version}"
target="${java_target_version}"
>
<classpath refid="jars.path"></classpath>
<exclude name="${gen.dir}/**" />
<exclude name="plugins/collaboration/jabber/**" />
</javac>
<copy todir="${testbuild}" file="${src}/freemind.properties"/>
</target>
<!-- =================================
target: test
================================= -->
<target name="test" depends="build_tests" description="Carries out all unit tests">
<delete dir="${test.reports}" />
<mkdir dir="${test.reports}" />
<junit printsummary="withOutAndErr" fork="yes" haltonfailure="no">
<classpath refid="jars.path"></classpath>
<classpath path="${testbuild}"></classpath>
<classpath path="${src}"></classpath>
<formatter type="xml" />
<batchtest todir="${test.reports}">
<fileset dir="${src}">
<include name="tests/**/AllTests.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="dist" depends="jar, browser">
<copy todir="${dist}">
<fileset dir="${src}">
<include name="freemind.bat"/>
<include name="freemindw.bat"/>
<include name="freemind.sh"/>
<include name="license"/>
<include name="patterns.xml"/>
<include name="dictionaries.properties"/>
<include name="dictionary_??.ortho"/>
</fileset>
</copy>
<chmod file="${dist}/freemind.sh" perm="u+rx"/>
<copy todir="${dist}">
<fileset dir="${src}/windows-launcher">
<include name="FreeMind.exe"/>
<include name="FreeMind64.exe"/>
</fileset>
</copy>
<mkdir dir="${dist}/doc" />
<copy todir="${dist}/doc">
<fileset dir="${src}/doc/">
<include name="freemind*.mm"/>
<include name="FM_Key_Mappings_Quick_Guide*.pdf"/>
<include name="FM_Key_Mappings_Quick_Guide*.odt"/>
</fileset>
</copy>
<mkdir dir="${dist}/accessories" />
<mkdir dir="${dist}/plugins" />
<copy todir="${dist}/accessories" >
<fileset dir="${src}/accessories" excludes="plugins" includes="*"/>
<!-- exclude jars too!
<fileset dir="${build}/accessories"/> -->
</copy>
<!-- third party libs -->
<mkdir dir="${dist.lib}" />
<copy todir="${dist.lib}">
<fileset dir="${src}/lib">
<include name="jortho.jar"/>
<include name="xalan.jar"/>
<include name="serializer.jar"/>
<include name="xml-apis.jar"/>
<include name="xercesImpl.jar"/>
<include name="forms-1.0.5.jar"/>
<include name="bindings.jar"/>
<include name="jibx/jibx-run.jar"/>
<include name="jibx/xpp3.jar"/>
<include name="SimplyHTML/gnu-regexp-1.1.4.jar"/>
<include name="SimplyHTML/SimplyHTML.jar"/>
<include name="SimplyHTML/SimplyHTMLHelp.jar"/>
<include name="SimplyHTML/jhall.jar"/>
</fileset>
</copy>
<ant antfile="${acc_build}" target="dist"/>
<ant antfile="plugins/build.xml" target="dist"/>
<!-- Mac OS X -->
<condition property="isMacOs">
<os family="mac"/>
</condition>
<antcall target="dist_icon"/>
<antcall target="dist_macos"/>
</target>
<target name="dist_icon">
<!-- <copy file="${src}/windows-launcher/Freemind_light_bulb.exe"
tofile="${dist}/Freemind.exe" overwrite="true"/> -->
</target>
<target name="dist_macos" if="isMacOs">
<delete dir="${dist_macos}" followsymlinks="false"/>
<mkdir dir="${dist_macos}"/>
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="${src}/lib/${appbundler.jar}" />
<bundleapp outputdirectory="${dist_macos}"
name="FreeMind"
displayname="FreeMind"
shortversion="${ver} (build: ${build.number})"
copyright="FreeMind ${ver} (build: ${build.number}) application (c) ${freemind.installer_year}"
icon="${src}/images/FreeMindWindowIcon${icns_extension}.icns"
identifier="freemind.main.FreeMind"
mainclassname="freemind.main.FreeMindStarter"
>
<runtime dir="${env.JAVA_HOME}"/>
<classpath dir="${dist}">
<include name="**/*.jar" />
<include name="." />
<exclude name="accessories/**" />
<exclude name="plugins/**" />
<exclude name="browser/**" />
<exclude name="**/freemindbrowser.jar" />
</classpath>
<option value="-Xms64m"/>
<option value="-Xmx512m"/>
<option value="-Xss8M"/>
<option value="-Dapple.laf.useScreenMenuBar=true"/>
</bundleapp>
<copy todir="${dist_macos_contents}/Resources">
<fileset dir="${src}/images">
<include name="FreeMindWindowIconModern-MM.icns"/>
</fileset>
</copy>
<copy todir="${dist_macos_contents}/Resources/Java">
<fileset dir="${dist}">
<include name="doc/*" />
<include name="dictionar*" />
</fileset>
</copy>
<!-- change freemind.properties -->
<copy todir="${dist_macos}" file="${src}/freemind.properties"/>
<replaceregexp byline="true" file="${dist_macos}/freemind.properties" match="^keystroke(.*)=(.*)\bcontrol\b" replace="keystroke\1=\2meta" flags="gim">
</replaceregexp>
<replaceregexp byline="true" file="${dist_macos}/freemind.properties" match="^keystroke(.*)=(.*)\binsert\b" replace="keystroke\1=\2TAB" flags="gim">
</replaceregexp>
<replaceregexp byline="true" file="${dist_macos}/freemind.properties" match="^#freemind.base.dir.*$" replace="freemind.base.dir=${dist_macos_app_name}" flags="gim">
</replaceregexp>
<!-- update jar -->
<jar file="${dist_macos_contents}/Java/freemind.jar" update="true">
<fileset dir="${dist_macos}">
<include name="freemind.properties"/>
</fileset>
<fileset dir="${dist}">
<include name="accessories/*" />
<include name="accessories/**/*" />
<include name="browser/**" />
</fileset>
</jar>
<delete file="${dist_macos}/freemind.properties"/>
<copy todir="${dist_macos_contents}/Java">
<fileset dir="${dist}">
<include name="plugins/*" />
<include name="plugins/**/*" />
</fileset>
</copy>
<!-- Associate Freemind with mm
-->
<xslt style="mac_file_association.xslt"
in ="${dist_macos_info}"
out="${dist_macos_info}2"/>
<move file="${dist_macos_info}2"
tofile="${dist_macos_info}"/>
<!-- Done. -->
</target>
<!-- installs the application directly on this mac. -->
<target name="install_macos" if="isMacOs" depends="dist">
<!-- Remove old application -->
<delete dir="/Applications/FreeMind.app" failonerror="off"/>
<exec dir="." executable="mv" os="Mac OS X">
<arg path="${dist_macos_app}"/>
<arg path="/Applications"/>
</exec>
</target>
<target name="post" depends="dist,browser">
<mkdir dir="${post}" />
<!-- <tar tarfile="${post}/freemind-bin.tar"
basedir="${dist}"
longfile="gnu"
excludes="doc/javadoc/,plugins/**" />
<gzip src="${post}/freemind-bin.tar"
zipfile="${post}/freemind-bin-${ver}.tar.gz" />
<tar tarfile="${post}/freemind-browser.tar"
longfile="gnu"
basedir="${dist}/browser" />
<gzip src="${post}/freemind-browser.tar"
zipfile="${post}/freemind-browser-${ver}.tar.gz" /> -->
<tar tarfile="${post}/freemind-src.tar"
longfile="gnu"
basedir="${src_base_for_post}"
includes="freemind/**,.classpath,.project" excludes="freemind/bin/**" />
<gzip src="${post}/freemind-src.tar"
zipfile="${post}/freemind-src-${ver}.tar.gz" />
<delete>
<fileset dir="${post}" includes="*.tar" />
</delete>
<zip destfile="${post}/freemind-bin-${ver}.zip"
basedir="${dist}"
excludes="doc/javadoc/,plugins/**" />
<!-- fc, 14.2.2005: new max export -->
<zip destfile="${post}/freemind-bin-max-${ver}.zip"
basedir="${dist}"
excludes="doc/javadoc/" />
<!-- <zip destfile="${post}/freemind-src-${ver}.zip"
basedir="${src_base_for_post}"
includes="freemind/**,.classpath,.project" /> -->
<zip destfile="${post}/freemind-browser-${ver}.zip"
basedir="${dist}/browser" />
<ant antfile="plugins/build.xml" target="post"/>
<antcall target="post_macos">
</antcall>
</target>
<target name="post_macos" if="isMacOs">
<copy todir="${dist_macos}" verbose="true">
<fileset dir="../admin/installer/mac/dmg/">
<include name=".VolumeIcon.icns"/>
</fileset>
<fileset dir="../admin/installer/mac/QuickLook/build/Debug/">
<include name="**"/>
</fileset>
</copy>
<chmod perm="ugo+rx" file="${dist_macos}/FreemindQL.qlgenerator/Contents/MacOS/FreemindQL" verbose="true"/>
<exec executable="cp">
<arg value="../admin/installer/mac/dmg/.DS_Store"/>
<arg value="${dist_macos}"/>
</exec>
<exec executable="ln">
<arg line="-s /Library/QuickLook"/>
<arg value="${dist_macos}"/>
</exec>
<exec executable="ln">
<arg line="-s /Applications"/>
<arg value="${dist_macos}"/>
</exec>
<!-- <delete file="${dist_macos_contents}/MacOS/JavaApplicationStub"/>
<exec executable="ln">
<arg line="-s /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub"/>
<arg value="${dist_macos_contents}/MacOS/JavaApplicationStub"/>
</exec> -->
<exec dir="." executable="zsh" os="Mac OS X">
<arg value="./mkdmg.sh"/>
<arg path="${dist_macos}"/>
</exec>
<exec dir="." executable="mv" os="Mac OS X">
<arg path="/tmp/${dist_macos_name} Archive.dmg"/>
<arg path="${post}/${dist_macos_name}.dmg"/>
</exec>
<exec executable="rm">
<arg value="${dist_macos}/QuickLook"/>
</exec>
<exec executable="rm">
<arg value="${dist_macos}/Applications"/>
</exec>
</target>
<target name="jar" depends="build">
<mkdir dir="${dist.lib}" />
<tempfile prefix="manifest" property="temp.manifest.file"/>
<manifest file="${temp.manifest.file}">
<attribute name="Built-By" value="${user.name}" />
<attribute name="Built-Number" value="${build.number}" />
<attribute name="Created-By" value="Joerg Mueller, Daniel Polansky, Christian Foltin, Dimitry Polivaev, and others." />
<attribute name="Main-Class" value="freemind.main.FreeMindStarter" />
<attribute name="Class-Path" value="freemind.jar .. commons-lang-2.0.jar forms-1.0.5.jar jibx/jibx-run.jar jibx/xpp3.jar jibx-run.jar xpp3.jar bindings.jar jortho.jar xalan.jar serializer.jar xml-apis.jar xercesImpl.jar SimplyHTML/gnu-regexp-1.1.4.jar gnu-regexp-1.1.4.jar SimplyHTML/SimplyHTML.jar SimplyHTML.jar"/>
</manifest>
<jar jarfile="${FM.jar}"
manifest="${temp.manifest.file}"
update="true">
<fileset dir="${build}">
<exclude name="accessories/**"/>
<exclude name="plugins/**"/>
<exclude name="**/*.jar"/>
</fileset>
<fileset dir="${src}">
<include name="images/*"/>
<include name="images/icons/*.png"/>
<include name="freemind.properties"/>
<include name="version.properties"/>
<include name="patterns.xml"/>
<include name="patterns_updater.xslt"/>
<include name="Resources*"/>
<include name="mindmap_menus.xml"/>
<include name="**/freemind_version_updater.xslt"/>
<include name="dictionar*"/>
</fileset>
</jar>
<delete file="${temp.manifest.file}" failonerror="false"/>
<ant antfile="${acc_build}" target="jar"/>
</target>
<target name="browser" depends="build">
<mkdir dir="${dist}/browser" />
<jar jarfile="${dist}/browser/freemindbrowser.jar" >
<fileset dir="${build}">
<include name="freemind/common/TextTranslator.class"/>
<include name="freemind/common/NamedObject.class"/>
<include name="freemind/view/*"/>
<include name="freemind/view/mindmapview/*"/>
<include name="freemind/view/mindmapview/attributeview/*"/>
<include name="freemind/main/*"/>
<include name="freemind/controller/*"/>
<include name="freemind/controller/filter/**"/>
<include name="freemind/extensions/*"/>
<include name="freemind/preferences/*"/>
<include name="freemind/preferences/layout/*"/>
<include name="freemind/modes/*"/>
<include name="freemind/modes/attributes/*"/>
<include name="freemind/modes/browsemode/*"/>
<include name="freemind/modes/common/**"/>
<include name="freemind/modes/viewmodes/*"/>
</fileset>
<fileset dir="${src}">
<include name="images/*"/>
<include name="images/icons/*.png"/>
<include name="*.properties"/>
<exclude name="Resources_*.properties"/>
<!-- <include name="*.xml"/>
<exclude name="build.xml"/> -->
<exclude name="images/*.svg"/>
<exclude name="images/splash.JPG"/>
<exclude name="images/Freemind_Splash_Butterfly_Modern.png"/>
<exclude name="images/FreeMindWindowIcon.icns"/>
</fileset>
<fileset dir="${src}">
<include name="Resources_en.properties"/>
</fileset>
</jar>
<copy todir="${dist}/browser" >
<fileset dir="${src}/html">
<include name="*.*html"/>
</fileset>
<fileset dir="${src}">
<include name="license*"/>
</fileset>
<fileset dir="${src}/doc">
<include name="freemind.mm"/>
</fileset>
</copy>
</target>
<target name="doc" depends="gen">
<mkdir dir="${dist}/doc/javadoc" />
<javadoc sourcepath="${src}"
destdir="${dist}/doc/javadoc"
breakiterator="yes"
classpath="${classpath}"
packagenames="freemind.*" />
</target>
<target name="clean">
<!-- Eclipse target: -->
<delete dir="bin/classes" quiet="true"/>
<delete dir="${build}" quiet="true"/>
<delete dir="${dist}" quiet="true"/>
<delete dir="${dist_macos_base}" quiet="true"/>
<delete dir="${gen.dir}" quiet="true"/>
<delete dir="${post}" quiet="true"/>
<delete file="${jibxjar}" quiet="true"/>
<delete>
<fileset defaultexcludes="no" dir="${src}" includes="**/*~"/>
</delete>
<delete file="${src}/accessories/plugins/MacChanges.java" quiet="true"/>
<delete file="${src}/accessories/plugins/MacChanges.xml" quiet="true"/>
</target>
<target name="run" depends="dist">
<antcall target="_run">
<param name="spawn" value="false"/>
</antcall>
</target>
<target name="_run">
<!-- failonerror is false here, as we want to
make runWithoutPreferences safe. -->
<java classname="freemind.main.FreeMindStarter"
fork="yes"
dir="${dist}" spawn="${spawn}" failonerror="false">
<!-- <jvmarg value="-Djava.util.logging.config.file=logging.properties" /> -->
<classpath>
<!--<pathelement location="${dist}"/>-->
<pathelement location="${FM.jar}"/>
<pathelement location="${jibxjar}"/>
<pathelement location="${spellLib}"/>
<pathelement path="${jibxruntimelibs}"/>
</classpath>
</java>
</target>
<target name="runSharingScenario" depends="dist">
<delete file="${freemind_socket}" quiet="true"/>
<antcall target="_run">
<param name="spawn" value="true"/>
</antcall>
<!-- Wait for the socket file to appear: -->
<waitfor maxwait="30" maxwaitunit="second">
<available file="${freemind_socket}"/>
</waitfor>
<sleep milliseconds="500"/>
<!-- Remove it such that a second instance appears: -->
<delete file="${freemind_socket}" quiet="true"/>
<antcall target="_run">
<param name="spawn" value="true"/>
</antcall>
</target>
<!-- =================================
target: runWithoutPreferences
================================= -->
<target name="runWithoutPreferences" description="Starts the application moving the current preferences temporarily away.">
<rename dest="${user.home}/.freemind_bak" src="${user.home}/.freemind"/>
<mkdir dir="${user.home}/.freemind"/>
<antcall target="run"></antcall>
<exec dir="${user.home}/.freemind" executable="cat" os="Linux" failifexecutionfails="no" failonerror="false">
<arg value="auto.properties"/>
</exec>
<delete dir="${user.home}/.freemind" failonerror="false"></delete>
<rename src="${user.home}/.freemind_bak" dest="${user.home}/.freemind" replace="yes"></rename>
</target>
<property name="log_file" location="${user.home}/.freemind/log.0"/>
<target name="runmac" depends="dist" description="Starts the application under Mac (using the open method).">
<move file="${log_file}" tofile="${log_file}.bak" failonerror="false"></move>
<exec dir="." executable="open" os="Mac OS X">
<arg path="${dist_macos_app}"/>
</exec>
<waitfor><available file="${log_file}"></available></waitfor>
<exec dir="." executable="tail" os="Mac OS X">
<arg line="-f ${log_file}"/>
</exec>
</target>
<!-- does not work!! -->
<target name="val">
<xmlvalidate lenient="false"
failonerror="no" warn="true" classname="org.apache.xerces.parsers.SAXParser"
classpath="plugins/svg/xerces_2_5_0.jar">
<fileset dir="." includes="**/*.mm"/>
<attribute name="http://apache.org/xml/features/validation/schema"
value="true"/>
<attribute name="http://xml.org/sax/features/namespaces" value="true"/>
<property
name="http://apache.org/xml/properties/schema/external-schemaLocation"
value="freemind.xsd"/>
</xmlvalidate>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: all
- - - - - - - - - - - - - - - - - -->
<target name="all">
<antcall target="post"></antcall>
</target>
<!-- =================================
target: installers for everybody
================================= -->
<target name="installers_all" depends="" description="--> Creates all installers.">
<property name="InnoSetup" location="D:/Programme/Inno Setup 5/ISCC.exe" />
<!--
<property name="InnoSetup" location="/home/foltin/.wine/drive_c/Programme/Inno Setup 5/ISCC.exe" />
-->
<property name="inst.dir" location="../tmp/fm_installer"/>
<property name="inst.dest.dir" location="../installers"/>
<delete dir="${inst.dest.dir}" failonerror="false"/>
<!--
<delete dir="${inst.dir}" failonerror="false"/>
-->
<mkdir dir="${inst.dest.dir}"/>
<mkdir dir="${inst.dir}"/>
<exec dir="." executable="git">
<arg value="clone"/>
<arg value="${gitRoot}"/>
<arg value="${inst.dir}/"/>
</exec>
<ant dir="${inst.dir}/freemind" target="clean" ></ant>
<ant dir="${inst.dir}/freemind" target="post" ></ant>
<copy todir="${inst.dest.dir}">
<fileset dir="${inst.dir}/post">
<include name="*"/>
</fileset>
</copy>
<exec dir="${inst.dir}/admin/installer/windows/" executable="${InnoSetup}" osfamily="Windows">
<arg value="Freemind.iss"/>
</exec>
<exec dir="${inst.dir}/admin/installer/windows/" executable="wine" os="Linux">
<arg value="${InnoSetup}"/>
<arg value="Freemind.iss"/>
</exec>
<copy todir="${inst.dest.dir}">
<fileset dir="${inst.dir}/admin/installer/windows/Output/">
<include name="*.exe"/>
</fileset>
</copy>
<!--
<delete dir="${inst.dir}" failonerror="false"/>
-->
</target>
<!-- - - - - - - - - - - - - - - - - -
target: create_windows_installer
- - - - - - - - - - - - - - - - - -->
<target name="create_windows_installer">
<ant dir="${inst.windows.installer}" target="${inst.windows.variant}"></ant>
<exec dir="${inst.windows.installer}" executable="wine" os="Linux">
<arg value="/home/foltin/.wine/drive_c/Programme/Inno Setup 5/ISCC.exe"/>
<arg value="Freemind.iss"/>
</exec>
<exec dir="${inst.windows.installer}" executable="wine" os="Mac OS X">
<arg value="/Users/foltin/.wine/drive_c/Programme/Inno Setup 5/ISCC.exe"/>
<arg value="Freemind.iss"/>
</exec>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: installers_chris_mac
- - - - - - - - - - - - - - - - - -->
<target name="installers_chris_mac">
<exec dir="." executable="ssh" os="Linux">
<arg value="foltin@${macName}"/>
<arg value="export JAVA_HOME=`/usr/libexec/java_home` ; cd /tmp ; rm -rf fm_installers ; mkdir fm_installers ; cd fm_installers ; /opt/local/bin/git clone ${gitRoot} .; cd freemind ; /opt/local/bin/ant post"/>
</exec>
<exec dir="." executable="scp" os="Linux">
<arg value="foltin@${macName}:/tmp/fm_installers/post/*.dmg"/>
<arg value="${inst.dest.dir}/"/>
</exec>
</target>
<!-- =================================
target: installers, for Chris' computers
================================= -->
<target name="installers_chris" depends="" description="--> Creates all installers. This is a task that only works on Chris laptops. But it should be informative to others who want to build the installers">
<property name="gitRoot" value="git://git.code.sf.net/p/freemind/code"/>
<property name="macName" value="mahler.local"/>
<property name="inst.dir" location="/tmp/fm_installer"/>
<property name="inst.dest.dir" location="../installers"/>
<property name="inst.windows.installer" location="${inst.dir}/admin/installer/windows"/>
<mkdir dir="${inst.dest.dir}"/>
<delete dir="${inst.dir}" failonerror="false"/>
<mkdir dir="${inst.dir}"/>
<exec dir="." executable="git">
<arg value="clone"/>
<arg value="${gitRoot}"/>
<arg value="${inst.dir}/"/>
</exec>
<copy todir="${inst.dir}/freemind" file="${freemind.buildnumber.file}"></copy>
<ant dir="${inst.dir}/freemind" target="post" inheritall="false"></ant>
<copy todir="${inst.dest.dir}">
<fileset dir="${inst.dir}/post">
<include name="*"/>
</fileset>
</copy>
<copy todir="${inst.windows.installer}">
<fileset dir="../admin/installer/windows/">
<include name="jre_installer.exe"/>
<include name="jre/**"/>
</fileset>
</copy>
<property name="freemind.version" value="${ver}"/>
<antcall target="create_windows_installer">
<param name="inst.windows.variant" value="installer"/>
</antcall>
<antcall target="create_windows_installer">
<param name="inst.windows.variant" value="installer_min"/>
</antcall>
<antcall target="create_windows_installer">
<param name="inst.windows.variant" value="installer_java_installer_embedded"/>
</antcall>
<copy todir="${inst.dest.dir}">
<fileset dir="${inst.windows.installer}/Output/">
<include name="*.exe"/>
</fileset>
</copy>
<antcall target="installers_chris_mac"></antcall>
<delete dir="${inst.dir}" failonerror="false"/>
</target>
</project>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/newyear-ly/freemind.git
git@gitee.com:newyear-ly/freemind.git
newyear-ly
freemind
freemind
master

搜索帮助