Improve Mac build process a bit

Copy swt.jar to a directory in ${work} rather than ${mac.dir} as there's
no need for droppings all over the build tree.  Also cleaned up building
${maczip} a bit to avoid extra file copying, to put the uncompressed
.app in ${dist}, etc.  Removed some cruft from .gitignore while I was at
it.

The conditional nature of building macBundle kind of bothers me a little
since if you have the correct swt.jar (which we could provide and have
in some versions of the build system), you could build self-contained
packages for macOS and for Windows.  A self-contained package for Linux
is also possible, but doesn't make much sense as Linux software
installation routinely involves installing dependencies, either manually
or automatically.
This commit is contained in:
T. Joseph Carter 2017-11-11 06:15:53 -08:00
parent 7d8be1d249
commit 72fb36478b
2 changed files with 8 additions and 12 deletions

2
.gitignore vendored
View File

@ -12,8 +12,6 @@ TODO.local
work
TestImage.*
**/Thumbs.db
mac/AppleCommander.app/Contents/Resources/Java/AppleCommander.jar
mac/AppleCommander.app/Contents/Info.plist
.settings/org.eclipse.jdt.ui.prefs
.settings/org.eclipse.jdt.core.prefs
build/ACBuild.properties

View File

@ -19,7 +19,6 @@
<property name="javadoc" value="${work}/javadoc"/>
<property name="builddir" value="${basedir}/build" />
<property name="mac.dir" value="${basedir}/mac"/>
<property name="mac.work" value="${work}/mac/AppleCommander-mac" />
<property file="${builddir}/ACBuild.properties"/>
<property file="${builddir}/ACBuild-default.properties"/>
@ -184,10 +183,9 @@
into something we can install using jarbundler to both
copy and add to classpath. If you have a better way… :)
-->
<copy file="${swtjar}" todir="${mac.dir}/swt" />
<copy file="${swtjar}" tofile="${work}/swt/swt.jar" />
<mkdir dir="${mac.work}" />
<jarbundler dir="${mac.work}"
<jarbundler dir="${dist}"
name="AppleCommander" version="${acVersion}"
verbose="true" showPlist="true"
mainclass="com.webcodepro.applecommander.ui.AppleCommander"
@ -197,15 +195,15 @@
jvmversion="1.6+" useJavaXKey="true" developmentregion="English"
copyright="Copyright 2002-2008 Rob Greene and John B. Matthews.">
<jarfilelist dir="${dist}" files="AppleCommander-${acVersion}.jar" />
<jarfileset dir="${mac.dir}/swt" />
<jarfilelist dir="${work}/swt" files="swt.jar" />
</jarbundler>
<zip destfile="${maczip}">
<zipfileset dir="${mac.work}" prefix="AppleCommander-${acVersion}-mac" />
<zipfileset dir="${dist}" prefix="AppleCommander-${acVersion}-mac">
<include name="AppleCommander-${acVersion}-ac.jar" />
<zip destfile="${maczip}">
<zipfileset dir="${dist}/AppleCommander.app" prefix="AppleCommander-${acVersion}-mac/AppleCommander.app" />
<zipfileset dir="${dist}" prefix="AppleCommander-${acVersion}-mac/jars">
<include name="AppleCommander-${acVersion}*.jar" />
</zipfileset>
</zip>
</zip>
</target>
<target name="sourceZip" depends="init" description="Build source ZIP archive">