When I first got the compile errors I spent a few minutes poking around
on the internet looking for those classes. The conclusion that I came
to was that they are proprietary to Apple and are not redistributable
(at least in our open source arena) because of copywrite issues.
I must confess that I have not tried to run the ant script to build
Squirrel, so that may actually work correctly. The errors that I am
seeing are from the Eclipse IDE when I load all the code in. At some
point (a couple of weeks from now) I'll try the Ant build, and if it has
problems we'll deal with it then.
On a more general note, this raises two questions for me:
- Are there any code changes needed to run on the mac other than the mac
plugin?
- Is it possible to compile the Mac-specific code on Linux/Windows and
run it on the Mac?
Speaking from the perspective of someone who may actually have to create
a release of the Squirrel product (and do that on a Linux system using
the standard Java SDK), it would be nice to have only one version that
needs to be kept up to date. For example, the Mac plugin appears to
reference only two Mac-specific classes, and it uses them in a way that
could be done using reflection. If we changed that code to use
reflection, it would compile on Linux and (hopefully) still run on the
Mac. If there is nothing else special about running Squirrel on the
Mac, then we should be able to build the code on Linux/Windows still run
it on the Mac
Gerd is thinking about creating separate "basic" and "standard"
packages, where the "basic" package contains no plugins and the
"standard" package contains a subset of the more commonly used plugins
(mostly related to SQL editing). If we are able to compile the Mac code
on Linux/Windows and we do create multiple downloadable packages as part
of the release, we should also be able to automatically create a
"basic-for-Mac" package consisting of the basic code plus the mac
plugin, and a similar "standard-for-Mac" package.
This seems fairly straight-forward to me, so I've probably not
understood the problem. :-) Is there anything that would block us from
using reflection (or possibly a proxy) in the mac plugin, building the
code on Linux and running it on a Mac?
Glenn
Rowe, Neville wrote:
> Hmmm. I don't know if those classes are redistributable (com.apple.eawt.*)
> so previously I checked in the compiled code (under the
> plugins/macosx/deliver directory). Changing the ant plugin_build.xml to
> either recompile or use the checked in code as appropriate seems best.
>
> I'm away from a machine which has write access to Squirrel SQL CVS, however
> if you replace plugin_build.xml with the below then it should do the right
> thing. I've tried it on both Mac and Windows - running:
> ant compile_app
> ant -Dp_internal_name=macosx init build_plugin
> ant mac_dist
> which produces a package which then runs successfully on my mac.
>
>>From memory I think I still have to make a change to the mac_dist target in
> the main build.xml to get some of the documentation appearing in the right
> place. I might get a chance to take a look at that later.
>
> Neville
>
> ================ plugins/macosx/plugin_build.xml ==================
>
> <?xml version="1.0"?>
> <!--
> This is an Apache Ant build file to build the macosx plugin
> for distribution.
> -->
> <project name="plugin-macosx" default="build" basedir=".">
>
> <target name="init">
> <tstamp/>
> <condition property="macos"><os family="mac" /></condition>
> <property name="internal_name" value="macosx"/>
> <property name="version" value="0.1"/>
>
> <property name="debug" value="on"/>
> <property name="optimize" value="off"/>
> <property name="deprecation" value="on"/>
>
> <property name="p_plugin.work_dir"
> value="${dist_dir}/${internal_name}"/>
> <property name="p_plugin.core_libs_dir"
> value="${core_dist_lib_dir}"/>
> <property name="p_plugin.dist_dir"
> value="${core_dist_dir}/plugins"/>
>
>
> <echo message="---------------- ${internal_name} ${version}
> ----------------"/>
>
> <property environment="env"/>
> </target>
> <!--
> ==================================================================
> Compile the plugin.
> No parameters.
> ==================================================================
> -->
> <target name="build" depends="init,compile,fakecompile" />
>
> <target name="compile" if="macos">
> <property name="obj_dir" value="${p_plugin.work_dir}/obj"/>
> <mkdir dir="${obj_dir}"/>
>
> <javac srcdir="src"
> destdir="${obj_dir}"
> deprecation="${deprecation}"
> debug="${debug}"
> optimize="${optimize}"
> includeJavaRuntime="yes">
> <classpath>
> <fileset dir="${p_plugin.core_libs_dir}">
> <include name="fw.jar"/>
> <include name="squirrel-sql.jar"/>
> </fileset>
> </classpath>
> </javac>
> <copy todir="${obj_dir}" >
> <fileset dir="src" >
> <include name="**/*.gif"/>
> <include name="**/*.jpg"/>
> <include name="**/*.jpeg"/>
> <include name="**/*.xml"/>
> <include name="**/*.properties"/>
> </fileset>
> </copy>
> <jar jarfile="${p_plugin.dist_dir}/${internal_name}.jar"
> compress="false">
> <fileset dir="${obj_dir}">
> <include name="**/*.*"/>
> </fileset>
> </jar>
>
> <copy todir="${p_plugin.dist_dir}" >
> <fileset dir="doc" >
> <include name="**/*.*"/>
> </fileset>
> </copy>
> </target>
>
> <target name="fakecompile" unless="macos">
> <copy todir="${p_plugin.dist_dir}" file="deliver/macosx.jar"
> />
> <copy todir="${p_plugin.dist_dir}" >
> <fileset dir="doc" >
> <include name="**/*.*"/>
> </fileset>
> </copy>
> </target>
>
> </project>
>
>
> --------------------------------------------------------------------------------
> The information contained herein is confidential and is intended solely for the
> addressee. Access by any other party is unauthorised without the express
> written permission of the sender. If you are not the intended recipient, please
> contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
> via e-mail return. If you have received this e-mail in error or wish to read our
> e-mail disclaimer statement and monitoring policy, please refer to
> http://www.drkw.com/disc/email/ or contact the sender. 3166
> --------------------------------------------------------------------------------
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
> online with coworkers and clients while avoiding the high cost of travel and
> communications. There is no equipment to buy and you can meet as often as
> you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
> _______________________________________________
> Squirrel-sql-users mailing list
> Squ...@li...
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
>
>
|