Mac build ... builds and zips

Okay, the Mac build at this point finishes and has all the pieces
correctly where they ought to be.  However there is something wrong with
swt.  I can't get any version of it I've tried to work.  I can get the
app to start but the GUI doesn't work once you load a file.  And the
only way it starts like that from the app bundle is if the line adding
SWT to the classpath of the bundle is removed.

However it's not SWT's jar itself since if you run the jarfile by hand
and add the same SWT to the classpath, it doesn't immediately crash.  It
runs with the same GUI problem as if yu didn't specify it in the
classpath at all.

Something fishy is going on here.  But it builds, so perhaps others can
assist in figuring out the nature of the problem.  That's enough for me
to move on to the Linux build.
This commit is contained in:
T. Joseph Carter 2017-11-01 12:45:56 -07:00
parent c11a437b08
commit 160c888e0f
2 changed files with 23 additions and 24 deletions

View File

@ -6,8 +6,8 @@
# support files for local builds.
#
swtJarPathWin=C:/Program Files/Eclipse 2.1.x/plugins/org.eclipse.swt.win32_2.1.3/ws/win32/swt.jar
swtJarPathMac=/Users/Shared/eclipse/plugins/org.eclipse.swt.carbon.macosx_3.3.3.v3349.jar
swtJarPathMac=/Users/Shared/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64_3.106.1.v20170926-0519.jar
junitPathWin=C:/Java/lib/junit3.8.1/junit.jar
junitPathMac=/Users/Shared/eclipse/plugins/org.junit_3.8.2.v200706111738/junit.jar
keyconf=${user.home}/.secret
alias=name
alias=name

View File

@ -13,6 +13,8 @@
<property name="web" value="web"/>
<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"/>
<condition property="swtjar"
@ -131,38 +133,35 @@
</target>
<target name="macBundle" depends="init,jars" description="Build Mac application bundle.">
<property name="mac.dir" value="mac"/>
<property name="mac.app" value="${dist}/AppleCommander.app"/>
<!--
<property name="mac.Contents" value="${mac.app}/Contents"/>
<property name="mac.Java" value="${mac.Contents}/Resources/Java"/>
NB: This seems like the only obvious way to turn ${swtjar}
into something we can install using jarbundler to both
copy and add to classpath. If you have a better way… :)
-->
<jarbundler dir="${dist}" verbose="true" showPlist="true"
name="AppleCommander"
<copy file="${swtjar}" todir="${mac.dir}/swt" />
<mkdir dir="${mac.work}" />
<jarbundler dir="${mac.work}"
name="AppleCommander" version="${acVersion}"
verbose="true" showPlist="true"
mainclass="com.webcodepro.applecommander.ui.AppleCommander"
bundleid="com.webcodepro.applecommander"
jar="${dist}/AppleCommander-${acVersion}.jar"
version="${acVersion}" build="${acVersion}"
stubfile="${mac.dir}/universalJavaApplicationStub"
icon="${mac.dir}/AppleCommander.icns"
useJavaXKey="true"
developmentregion="English"
copyright="Copyright 2002-2008 Rob Greene and John B. Matthews."
jvmversion="1.6+"
/>
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" />
</jarbundler>
<!--
TODO: Let's not re-enable this. We can do it better.
<copy file="${cmdjar}" tofile="${user.home}/bin/ac.jar"/>
-->
<!--
<zip destfile="${maczip}">
<zipfileset dir="${mac.app}" prefix="AppleCommander.app"/>
<zipfileset dir="${mac.app}" prefix="AppleCommander.app"
includes="Contents/MacOS/JavaApplicationStub" filemode="755"/>
<zipfileset dir="${mac.work}" prefix="AppleCommander-${acVersion}-mac" />
<zipfileset dir="${dist}" prefix="AppleCommander-${acVersion}-mac">
<include name="AppleCommander-${acVersion}-ac.jar" />
</zipfileset>
</zip>
-->
</target>
<target name="sourceZip" depends="init" description="Build source ZIP archive">