[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] Xcode as IDE for swarm: how-to?
From: |
Bill Northcott |
Subject: |
Re: [Swarm-Support] Xcode as IDE for swarm: how-to? |
Date: |
Mon, 19 Jan 2004 09:29:10 +1100 |
On 18/01/2004, at 9:53 PM, Jurgen van der Pol wrote:
I've got swarm up & running on a G3 iMac running Panther (10.3.2).
This is probably a silly question (maybe already covered but I'm
unable to properly search the archives as Mail does not eat the raw
.mbox?): has anyone got any ideas/experience/how-to/pointers as to how
I should go about using/setting up (the wonderfully new to me) Xcode
as the IDE to develop new swarm applications?
It is very good question. How you would you like to work on it?
Basically Swarm uses a makefile build system. You will see in
$SWARMHOME/etc/swarm/ a number of makefiles generated as part of the
library build process. If you look at the source code of an app like
Heatbugs, you will see a makefile which incorporates one of the Swam
makefiles. These incorporated makefiles set up all the environment
variables and define the basic build operations for a Swarm
application. To build the app, you just cd to the source directory and
type 'make'.
So where does Xcode come in? Xcode is a full blown development
environment. It normally uses its own build system. By setting up a
project and adding the source files and necessary libraries to it, you
enable Xcode to do what the makefiles do in Swarm.
At a minimal level, you can get Xcode to drive the makefile build
system. Just create a new project for a 'Standard Tool'. All it needs
in the target is a single 'Shell Script Build Phase' which invokes make
with the makefile.
Why bother? Xcode does a nice job of indexing your files and relating
to a CVS server. It can also help with managing source files in other
ways. After building it enables you to use the class browser on your
code.
However, Xcode has a heap of other goodies: speculative recompilation,
distributed builds, zero link, fix and continue etc.. If you want
these to work then you need to use the Xcode build system. To do this
you need to set up a conventional 'Standard Tool' project referencing
all the source files and the relevant Swarm libraries and headers. It
is my intention at some point to create a template for such a project
that can be dropped into Xcode. If you would like to do it, it would
be very helpful.
For some clues, have a look at existing open source projects that have
a MacOS X build system like Tcl/Tk.
Finally a WARNING. Do not try to use Xcode with the existing Swarm
sources.
1. The existing Project Builder project can be opened in Xcode but it
will crash. As far as I can see any Xcode project which includes the
actual project bundle in its file list will crash Xcode when you try to
open it. This seems to be a problem if not a bug in Xcode.
2. Two files (src/activity/activity.h and src/gui/gui.h) in the Swarm
source crash the Xcode indexer. This appears to be because they
contain more than 40 Swarm style Protocol declarations. Less than 40
Swarm style declarations are OK, as are some large number of standard
Objective-C declarations. This is definitely a bug and I have reported
it to Apple as such.
Bill Northcott