1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <project name="PosterDivider" basedir="." default="build">
3 <property environment="env"/>
4 <property name="VERSION" value="1.0.2.20110602"/>
5 <property name="SHORTVERSION" value="1.0.2"/>
6 <property name="ITEXTJAR" value="itextpdf-5.1.0.jar"/>
7 <path id="PosterDivider.classpath">
8 <pathelement location="bin"/>
9 <pathelement location="iText.jar"/>
10 <pathelement location="lib/AppleJavaExtensions.jar"/>
14 <copy includeemptydirs="false" todir="bin">
15 <fileset dir="src" excludes="**/*.launch, **/*.java"/>
17 <exec executable="ln">
19 <arg value="../${ITEXTJAR}"/>
20 <arg value="iText.jar"/>
23 <target name="build" depends="build-subprojects,build-project"/>
24 <target name="build-subprojects"/>
25 <target name="build-project" depends="init">
26 <javac destdir="bin" encoding="UTF-8">
28 <classpath refid="PosterDivider.classpath"/>
31 <target name="build-refprojects"/>
32 <target name="run" depends="build">
33 <java classname="jp.sourceforge.posterdivider.Program" failonerror="true" fork="yes">
34 <classpath refid="PosterDivider.classpath"/>
37 <target name="srczip">
38 <zip destfile="PosterDivider-src-${VERSION}.zip">
39 <fileset dir="." includes="build.xml, build_win.bat, History.txt, MANIFEST.MF, PosterDivider.app/**, Readme.txt, src/**, Todo.txt" defaultexcludes="yes"/>
42 <target name="jar" depends="build">
43 <jar destfile="PosterDivider-${VERSION}.jar" basedir="bin" manifest="MANIFEST.MF"/>
45 <target name="exe" depends="jar">
46 <mkdir dir="win/PosterDivider"/>
47 <mkdir dir="win/PosterDivider/Jar"/>
48 <copy file="../${ITEXTJAR}" tofile="win/PosterDivider/Jar/iText.jar"/>
49 <copy file="PosterDivider-${VERSION}.jar" tofile="win/PosterDivider/Jar/PosterDivider.jar"/>
50 <concat destfile="win/PosterDivider/Jar/fileversion.txt">iText.jar
PosterDivider.jar
</concat>
51 <replace file="win/PosterDivider/Jar/fileversion.txt" token="iText.jar" value="iText.jar -> ${ITEXTJAR}"/>
52 <replace file="win/PosterDivider/Jar/fileversion.txt" token="PosterDivider.jar" value="PosterDivider.jar -> PosterDivider-${VERSION}.jar"/>
53 <copy file="Readme.txt" todir="win/PosterDivider"/>
55 <target name="zip" depends="exe">
56 <zip destfile="PosterDivider-${VERSION}.zip" basedir="win/PosterDivider" defaultexcludes="yes"/>
58 <target name="app" depends="jar">
59 <mkdir dir="mac/PosterDivider"/>
60 <copy todir="mac/PosterDivider/PosterDivider.app">
61 <fileset dir="PosterDivider.app" defaultexcludes="yes"/>
63 <chmod file="mac/PosterDivider/PosterDivider.app/Contents/MacOS/JavaApplicationStub" perm="+x"/>
64 <copy file="../${ITEXTJAR}" todir="mac/PosterDivider/PosterDivider.app/Contents/Resources/Java"/>
65 <exec executable="ln">
67 <arg value="${ITEXTJAR}"/>
68 <arg value="mac/PosterDivider/PosterDivider.app/Contents/Resources/Java/iText.jar"/>
70 <copy file="PosterDivider-${VERSION}.jar" todir="mac/PosterDivider/PosterDivider.app/Contents/Resources/Java"/>
71 <exec executable="ln">
73 <arg value="PosterDivider-${VERSION}.jar"/>
74 <arg value="mac/PosterDivider/PosterDivider.app/Contents/Resources/Java/PosterDivider.jar"/>
76 <copy file="Readme.txt" todir="mac/PosterDivider"/>
78 <target name="dmg" depends="app">
79 <exec executable="hdiutil">
81 <arg value="-srcfolder"/>
82 <arg value="mac/PosterDivider"/>
83 <arg value="-volname"/>
84 <arg value="PosterDivider"/>
85 <arg value="PosterDivider-${VERSION}.dmg"/>
88 <target name="all" depends="srczip, jar, dmg"/>
89 <target name="updateversion">
90 <replaceregexp file="src/jp/sourceforge/posterdivider/Message.properties" match="App\.Version=[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" replace="App\.Version=${VERSION}" encoding="UTF-8"/>
91 <replaceregexp file="src/jp/sourceforge/posterdivider/Message.properties" match="App\.ShortVersion=[0-9]+\.[0-9]+\.[0-9]+" replace="App\.ShortVersion=${SHORTVERSION}" encoding="UTF-8"/>
92 <replaceregexp file="PosterDivider.app/Contents/Info.plist" match="<string>PosterDivider [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+</string>" replace="<string>PosterDivider ${VERSION}</string>" encoding="UTF-8"/>
93 <replaceregexp file="PosterDivider.app/Contents/Info.plist" match="<string>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+</string>" replace="<string>${VERSION}</string>" encoding="UTF-8"/>
94 <replaceregexp file="Readme.txt" match="PosterDivider [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" replace="PosterDivider ${VERSION}" encoding="UTF-8"/>
96 <target name="release" depends="all">
97 <copy file="PosterDivider-src-${VERSION}.zip" tofile="PosterDivider-src.zip"/>
98 <copy file="PosterDivider-${VERSION}.jar" tofile="PosterDivider.jar"/>
99 <copy file="PosterDivider-${VERSION}.dmg" tofile="PosterDivider.dmg"/>
101 <target name="clean">
104 <fileset dir="." includes="iText.jar, **/._*, **/.DS_Store, **/*~, **/#*#" defaultexcludes="no"/>
107 <target name="cleanall" depends="clean">
111 <fileset dir="." includes="PosterDivider-src*.zip, PosterDivider*.jar, PosterDivider*.zip, PosterDivider*.dmg"/>