WWDC2001 Session 703
Transcript
Kind: captions
Language: en
ladies and gentlemen please welcome
Godfrey de Georgie good morning I'm glad
to see so many people were able to get
out of bed on this third day of WWDC
how's the show for you doing good
fantastic okay so this morning this is
the project builder in-depth session
where we're going to take you into some
of the more curious details of project
builder and show you how to get things
done and to that effect
I'll introduce right away Mike Farris
the manager of the project builder ID
development team hello so we have a lot
of stuff to cover today and so I'm gonna
go ahead and dive right in
basically we're gonna try to focus today
on some of the more advanced features in
project builder and we're gonna
concentrate on on features of the build
system
you know project builder you know does
pretty automatic support for most of
your needs in terms of the building of
your project but every project every
real project is probably going to have a
few things that fall a little bit
outside the scope of what PBE handles
really automatically and so we want to
do today is talk about you know what
features are there in project builder to
let you do the kind of things that we
haven't possibly anticipated or that
aren't directly supported and automatic
in project builder so small projects you
know may be very simple you create a
project template it builds everything
works fine but large projects often get
more complicated and an IDE has to be
able to build your projects the project
templates gets you started you're going
to add a bunch of stuff to that we have
to support you you
adding all that and we also have to be
prepared to let you get stuff done that
we don't even know about right now so
you know there may be some new
requirement that comes up you know at
six months and if you can't get project
builder - you know satisfy that
requirement you're kind of stuck and
when it comes to this future
extensibility the most important part is
the build system because if project
builder can't build your project it
doesn't matter what other features it
has all right so again we're going to
concentrate on the build system today
this is basically what we're going to go
through today we'll start with importing
projects and source code into project
builder this will give us a project that
we can then use throughout the rest of
the session to show you some of the more
advanced features once we get the
project up and running we're going to
talk a little bit about targets and then
start talking about some of the specific
features that go along with targets and
project builder build styles which let
you modify the way that a particular
target gets built so if you want to have
a target to build your application but
sometimes you'd like to build it for
debugging and sometimes you'd like to
build it for profiling and sometimes
you'd like to build it to put it on a CD
and ship to your customers you you would
use build styles to customize the way
that the target gets built build phases
are sort of the basic basic building
blocks of a target so a target is
basically a sequence of build phases and
build phases you know do different
things to the files that they contain
and we'll talk a little bit about what
that means and then at the end we're
gonna talk a little bit about legacy
targets and a legacy target is a special
kind of target and project builder which
basically circumvents project builders
building system altogether and so one
common use for a legacy target would be
if you have a project that's say an
open-source project and it has a make
file you can set up a legacy target that
will invoke make to build the project
instead of use
project builders built-in system alright
so let's get started on importing our
source code basically you have a few
different ways to get started with
project builder if you're starting a
brand new project okay great you just
pick a project template that's closest
to whatever you know you want to end up
building and you start with that and you
just start adding your code and writing
it and eventually you will be done but a
lot of you all have existing source code
and so then the question becomes how do
I get all this code I already have into
project builder and building and we
provide a couple different ways to do
that we can directly import projects
from two different ideas from code
warrior and from the old version of
project builder called project builder
wo these days the third way to get
source into your project is that you can
just directly import you know hold trees
folders full of source code in the
project builder in a fairly automated
way and we'll show a little bit of that
too so today what we're gonna do is
we're gonna start by importing a code
warrior project and to import a project
from code warrior you start in code
warrior because you're gonna have to
basically export your project as an XML
file and then project builder can read
in the XML file before you export the
project as XML it's important to set in
your project settings for code warrior
the little checkbox that says save
project entries is relative paths PB can
import this stuff a lot better if it has
the relative paths to the files once you
import the project project builder will
automatically get from this XML the
whole group structure of the code where
your project it will bring over any
targets that are in the code warrior
project and convert them into project
builder targets once it's all in there
you're almost certainly gonna have to do
a little bit of hand tuning of the
resulting project before it is complete
and buildable and project builder
so the other thing that we're going to
talk about a little bit today is
importing just folders full of source
code you can just drag a folder into
project builder from finder and project
builder will offer to sort of
recursively import all the stuff inside
the folder when you're going to do that
it's usually the best thing to create
the target that you want to use to build
that source code first because as
project builder is importing all this
stuff it can automatically add it to a
target so if the target already exists
you can say okay add it to my new target
and as it's processing all the files
it'll figure out which build phase each
file belongs in and put it in there
automatically once it's all in there you
probably have some more configuration to
do on the target before it actually
builds so alright let's get started with
the demo and to help me with the demo
we'll bring on ders fertile Ruud onto
the stage Andres is a member of the
project builder team so let's get
started by importing our codeword
project so the first thing we're going
to do is fire up code warrior and open
up this project this is a sample project
that you can get off of Apple's website
it's provided by the developer tech
services people and it's a simple little
application it actually ships with both
a code warrior version and a project
builder version we've thrown away the
project builder version so that we can
show you how to do the the importing so
first of all let's go ahead and make
sure that the checkbox is checked for
the relative paths and once we know that
that's all done we can go ahead and from
the file menu just choose export project
and this is going to save an XML file
and we'll go ahead and put it in the
actual folder that the project is in
so now we've generated this XML file
okay now we're done with code warriors
so let's go ahead and get out of code
we're and go to project builder and we
can choose import project and you get a
choice of what kind of project to import
so we're gonna import a code where your
project and then we just have to point
it at this XML file so okay and now
we're done we can just go ahead and let
the import happen you'll notice that it
imports and we get all the groups so we
can go ahead and check out and make sure
all the files got in there
okay now actually I'm a little bit lost
on the demo script here so yeah so now
with when code warrior builds this thing
it's going to build a path binary and so
it links against the carbon Lib
libraries and we're gonna build a mock
OH binaries so we're gonna go ahead and
get rid of the libraries that came over
from code warrior and we'll add in the
frameworks we need in a moment but first
let's go ahead and look at the target
that got imported and you'll notice that
in code where this target was called
something kind of funky so maybe we
should rename it to be something a
little bit more reasonable
okay and also if you go to the build
settings tab the the application that
code warrior was generating has this
weird PPC in parenthesis after it we
don't really need that so let's get rid
of that and okay now let's actually go
back to the files tab here and make sure
that we are linking against the
frameworks that we need so first okay we
have this Mac libraries group let's go
ahead and rename that to be frameworks
and then from the project menu you can
choose add frameworks and we'll go ahead
and find the the two that we need then
this example uses carbon and QuickTime
so we'll get the carbon framework and
the QuickTime framework and add them in
there make sure that they get added to
the target and you'll notice that they
appear there in the framework and
libraries build phase of the target so
for this example this is actually all we
have to do now we're ready to actually
you know build the things so let's go
ahead and build it make sure that it
actually works
okay it's built go ahead and run it just
to make sure so this example all it does
is it takes a screenshot of the screen
it lets you you know scale it and it
actually lets you save it which will you
know show a little bit more of later in
fact when you save it it saves as a
picked file interesting so that was not
part of the demo script
right so as shipped from Apple this
thing saves screenshots has picked files
and we thought well maybe it would be
nice to be able to save as a tiff file
so in order to do that first we're gonna
need some Tiff's handling code so what i
did as i went out to SGI's website and i
downloaded the free tiff library that
Sam Leffler wrote which is sort of the
standard implementation of the tiff
library and what we're gonna do now is
actually import that tiff library into
this project so that we can build a
library that handles Tiff's and then
we'll make the app link against it so
again to get started when you're gonna
import a bunch of raw source code it's
best to create the target that you want
first so let's go ahead and create a new
target
we're gonna build a static library here
so we'll create a library target let's
call it limp if dot a and when the
target gets created why don't you go
ahead and close the build tab up there
too so that we can see more it has no
files in it but that's okay because
we're gonna add the files right now
actually before we add the files let's
go ahead and look at the build settings
tab of the target and make sure that
everything is okay there so the thing is
going to be named Lib Tiff's dot a and
actually let's go ahead and set it to
install in slash applications not the
library you know what you're right
never mind so let's go back to the
snapshot target actually and do that
so this illustrates that even if we make
a mistake when you first start you can
always go back and change all right
there we go we're gonna install the lot
of the application in slash applications
and okay so now let's go back to the to
the tip target so that we can see all
the files as they get imported and we'll
switch to the file tab and then go to
finder okay can group these guys let's
group those together that's a good idea
so we'll go ahead and put all of the
source code for the snapshot stop into
its own group so that it doesn't get
confused with the TIFF source code now
we have a library or we have the folder
with all the source code here and finder
and we can just drag that in you get a
few options here let's go ahead and have
it copy that source code into our
project and we'll tell it to recursively
import all the contents of that folder
and we'll add it to the lid piff target
that we just created so all that stuff
comes in and you can see that it's all
been added to the build phases here we
have actually made some minor
modifications to the source code we got
from SGI the only thing that we've done
is we removed some files which are used
only for other platforms just to avoid
having to get rid of them once we've
imported it here so now we have a target
that builds the tiff library and let's
go ahead and build it just to make sure
so we make the active target be the new
TIFF target and go ahead and build now
this is actually going to take a moment
because this library has a lot of files
in it and we'll see that it does have
some warnings if we were going to be
conscientious about things we might go
in and fix those warnings but we'll let
let that be for now
so still building if you did want to fix
the warnings of course you can just
click on the lines and go to the code
and figure out what's wrong so the build
stuff the build is done so okay let's go
ahead and close up that build tab the
last thing I'd like to show in this
segment of the demo is we'd like for the
super snapshot application to link
against this TIFF library so to do that
we can go back to the target for a super
snapshot and if we go back to the final
stage again
the products group is sort of special
that has a reference in it to each thing
that is built by your project so every
target you add will typically cause
something to be added into that products
group and you can see that we have two
things in there the application and the
library that that we're building with
the TIFF target so one of the reasons
why this is available is so that you can
actually establish a linkage between the
different target products so to link
against the lib TIFF target we can just
set the active target to be in snapshot
target and then click in that left-hand
column and it will that library will be
added to the snapshot target in the
frameworks and libraries phase and when
we build the snapshot target the next
time it will link against the library
now one more thing that we actually
should do just to be complete is in the
targets tab we can establish a target
dependency so that every time we build
the snapshot target we'll make sure the
first build the tiff library so in case
we didn't build the TIFF library first
we can still link against it because it
will get built automatically so now we
have a complete project here and we'll
use this as the starting point for the
rest of the demos in the session but now
let's have onder's talk a little bit
about build styles okay let's go back to
the slides taken like
so if we could have the slides back on
the screen please
move the mouse pointer a bit here okay
okay so now we have a project that had
the sources imported into it and so we
can build it and what I'm going to talk
about now is the feature we call build
styles and this is a feature that we
added to help you maintain your project
in the long run so what is a build style
okay so the basics of a build style is
that it builds a allows you to build a
single target or a set of targets in
many different ways so if you have one
logical product that you want to build
let's say one application but you might
want to build it for profiling for
debugging you might want to try it out
using a hash table or a linked list
algorithm whatever you wouldn't want to
set up lots of different targets and
have all the same source files in all
those targets because then as you
maintain them if you had a source file
you have to remember to add it to each
of those targets if you change the build
setting that should not change between
the targets you've got to make the
change to all of them so so the build
style is just like a filter that gets
applied on top of the target settings at
Build time so here are some examples of
that you can enable disable features
experiment with different algorithms
different optimization levels etc okay
so how does this actually affect the
bill well the basics is that a build
style it changes the settings of the
target dynamically so it doesn't
actually modify the target it just
allows you to pick a different set of
settings to apply on top of them at
Build time and a targets build settings
like optimization level and what flags
to pass to the preprocessor that's just
really a dictionary of settings and so
even if you check a checkbox or choose a
menu item from a pop-up in the target
editor what you're really doing is just
changing the contents of that dictionary
so a build style just selectively places
where it pens to some of those entries
so we see an example here debugging
symbols equals no that would replace the
setting that was defining the target if
a build style has
uh sequels that means that it actually
just depends to the value of the setting
in the target and one very useful thing
is that one build setting can refer to
another one using a syntax that's fairly
should be fairly familiar to those who
have experience with make so you can say
a equals dollar B for example right to
refer to the value of the build setting
called B now obviously the build style
can refer to the target settings but
also the target settings can refer back
up to the builds to the build styles so
it's actually fairly flexible and it's
possible to configure your your settings
to do a variety of interesting things
the one thing that's not permitted is
circular references right you can't
define a build setting in terms of
itself because what would that mean so
since we have these different layers of
settings
you know the targets the build styles we
need a precedents for that so here's
here's summary of the precedents the
very highest level are the settings
passed to the PBX build command line
build tool now if you're running the IDE
there are no PBX build settings so that
part just goes away but this says also
intuitive to those using make anything
you pass on the command line to
relocation will overwrite anything else
anything that's not defined there the
build system looks in the build style
that's in effect and if it's not there
it goes on to the target settings etc so
by using this precedence you can set up
some really interesting at
configurations that like to just switch
the build style and give very very
interesting behavior changes and okay
great so now we configure the build
styles but how do we actually use them
well currently the IDE has a pop-up that
you can put in your tool bar using the
customize toolbar command and that's a
pop-up that's very similar to the target
selection pop-up the one that chooses
the active target this one sets the
active build style and the IDE currently
always has one build style active so you
can pick any one you want
say development or deployment and just
when you click on the hammer that's the
build style that gets used you southern
in the demo actually sorry you saw that
for the target but it works the same way
for the build stone you see that
next time now the PBX build command-line
tool is a little bit more flexible than
that if you don't specify any build
style then none of the build styles have
any effect and the settings defined in
the target are the ones that they can
used but as we've seen the second
example here you can build for install
for example you can specify by name
the deployment build style now you could
call that anything you want so you could
add as many build styles as you want and
the last example here just shows that
the active build style that was set in
the target and in the project is a per
user setting and so you have access to
that from the command line if you use
PBX build so you can just say the last
one says use whatever build style was
active in the IDE when added at this
project can be handy and by default new
projects get to build styles just to
start you off there's deployment and the
development build styles and so
development is is by default set up to
enable debugging symbols and and to let
you basically have a debuggable build
the deployment one is when you want to
build it for putting on a CD for example
so that would turn off debugging symbols
have a higher optimization etc but you
can add any number of build styles to
your project so you can just define
anything you want to we're gonna see in
the demo definition of processor
preprocessor macros
alright so I like to my christian
mullick up onto the stage and we're
gonna do a little demo hopefully I'll
remember the script okay great so first
of all what we're gonna do is we're
going to configure the targets that we
have the two targets super snapshot in
Lib tiff to turn off debugging symbols
because we want the default case to be
build for CDs in this case so Christians
gonna open up both of the targets here
and we just unchecked the generate debug
symbols checkbox for each of those so
now if we're build without any build
style at all then we're going to just
going to build for putting on a CD
so now in order to be able to set the
active build style we actually want to
customize the toolbar here so we want to
go ahead and yeah just go ahead and
control click on that say customize
toolbar we just dragged up the build
style active build style pop-up just
drop it in there and click done we don't
put it in there by default because we
want to keep the UI and the concepts a
little bit simple when you first start
out so it says no build style since we
don't have any defined yet so let's
divide some bill styles so let's go
ahead and go down to ya build styles and
create a new build style just call this
development okay and if we click on that
the development build style we can edit
it now right now we don't have any
graphical UI for any of the settings
we're planning on adding that but what
this gives you control over the exact
dictionary of settings that are
available let's go ahead an add one
that's called debugging underbar symbols
and so you just click in there and hit
return and that adds a new one and you
tab between the fields so debugging
symbols let's set that to yes because
we're doing development and let's add
another one and this one is going to be
other C flags which is just a bucket
where we can put any other C flag we
want to pass to the compiler actually
see flags
yes I just double-click on that right
and we just up the value to be - capital
D debug so this is just going to define
the debug process or macro so now if we
click on the equal sign there you'll see
it turn into a plus equals maybe you
don't see that there we go it's a little
bit small but you see that when you sit
in front of the screen and what that
means is we're just going to open the
value to the end of the value that was
defined by the target okay great so now
we have the development build style
setup let's go and create deployment
build style and to start off we're just
going to select all these settings here
you select them both and they were just
going to copy them so you can actually
copy and paste these settings between
the different build styles
let's garden crane you build style
called deployment actually I take that
back let's call that save as tip because
we imported the lib TIF library and so
one of the things we want to demonstrate
here is defining a preprocessor macro
that causes the source code to use the
TIF library
I've actually modified this super
snapshot project to do that so let's cut
and paste in the settings from the other
build style and all we want to do now is
just add to the value of other C flags -
capital D and save as TIF
okay so now we have defined our two to
build styles we can see that they showed
up in the pop-up menu up in the toolbar
so we can set which one is active so
let's go ahead and set the sets into the
development one to be active go ahead
and go to the files menu or files tab
and click on super snapshot at sea so
this is the file in which we've added
some pound if deaths for save as Tiff's
and Fergie bug so debug causes it to
print out some extra stuff save as tiff
causes it to use the tiff library when
you choose save let's go ahead and just
save this file to make sure it's dirty
and hit build so now we're building
using the development build styles so
the debug preprocessor macros in effect
and so if you run this and if we choose
save then we should see some debug
output
hmm so just go ahead and say that and we
see that it was writing a pig file okay
great
so let's quit that and then we're gonna
go ahead and choose the other act of the
other build style from the pop-up menu
so now we want to build this using the
algorithm that uses the Lib TIF library
so we just cried and build again why
okay so it looks more and it looks like
this machine does not configured exactly
the way the other one was configured so
[Music]
okay we can either spend a lot of time
and install libraries here or we can say
it trust us so you see the palette the
if not to find save as TIFF there what's
happening is that we're apparently using
a quick-draw call that that is not in
the public headers that's my fault so
the point is though that because we got
this error this time you've seen that
the different build styles are in effect
and in fact right
which was the point of the demo so
successful demo okay at this point this
point I'd like to invite Kristian to
talk some more about the build phases
yeah you're a Christian which is another
feature of the build system okay so what
I'd like to talk to you but it was about
how project builder organizes builds of
individual targets in the build phases
to make it easy to see and modify what's
actually going to happen during a build
so they seem a little bit complicated at
first they're pretty simple actually
though some fairly difficult and
dangerous things can be done with them
basic idea is that a target is built in
a series of phases that do happen one
after the other new phases can be added
or deleted to tune exactly what's going
to happen during a project build new
files when they're added to a project to
a target get added to the correct phases
automatically so phases don't yeah you
don't need to be conscious of them
normally you should just see your files
where you expect them and if you need to
tune a build process you can go and
touch them in their phases so files can
be added to or removed from individual
phases moved between phases or within a
phase to different locations so the
files will be processed in the order
they appear in that phase as well as the
phases themselves happening in order um
so standard build phases that you see in
target templates or in distributed
examples or a headers build phase which
is used for copying headers that are
part of a distributed project into place
currently some extra work is done during
a headers build phase to make sure that
those headers are available to other
targets that you might be building or
other targets in other projects that you
might be building simultaneously next is
the bundle resources phase in this phase
all of your bundle resource files get
copied into their appropriate localized
locations as well as files that project
builder is responsible for generating
such as the info.plist property settings
file and the package info file that goes
in the bundle all get generated and
copied into place during this phase
during the sources phase is where the
bulk of the work happens this is where
new sources are derived from given
source derivation and all your sources
they're already present and the drive
sources actually get compiled and put in
order then during the Java archive phase
a hierarchy is constructed which has all
of your compiled class files as well as
extra resources that need to be in the
any Java archives that get constructed
following that is a frameworks and
libraries phase this is where the
libraries that actually get linked to by
a product actually are all listed and
this phase actually builds the final
executable and then finally the resource
manager phase will actually go and add
resource manager resources to a product
potentially on a resource fork so it's
got to be after the link so that's a
good basis to start with but it's often
not enough there are a bunch of custom
phases that can allow you to tune the
process in a bunch of different ways the
most basic being the copy files phase
this allows you to copy special product
contents like readme and other such into
a product it also is the primary model
that we use for product inclusion so the
way that a product that includes another
product such as an application that has
plugins works is that you add a copy
files phase that refers to that product
reference in the product section and
brings it into the actual built product
finally there's the script phase this is
the most general mechanism where by
default shell is run but really any
utility can be run during a build so
this can be used by default shell is
invoked but sea shell pearl Apple script
can all be used to do various things
during a build so those are build phases
might be interesting to actually see
these and if I can get a viewing help me
work a little more with this project
so the first thing that I'd like to do
is show you the actual phases that are
in this downloaded example you could
open up the snapshot target and go to
the files and build phases tab so there
they all are one thing about this is
we're not building this with a bunch of
other targets and the headers and all
that interesting for the application
itself so let's try just deleting that
phase to clarify what's happening during
the build that's better so more
important is getting extra stuff into
the build a simple thing to start forth
first is adding this in app a readme to
this application and I think it actually
came with one that we could add to the
project
it's the level of bill there it is
and yeah we're gonna add this to no
target to begin with so what we want is
a copy files phase added to this easiest
thing to do would be to select the last
phase and add a copy files phase from
the project menu then drag the readme
into the file section and we'd like to
have this happen every time so copy when
installing isn't necessary and that
should go into the wrapper of the
application so if someone actually looks
into this built application the first
thing they'll see hopefully is this
readme okay so there's a simple copy
file phase let's try something a little
bit trickier what might be interesting
for this example is to actually
distribute this custom TIFF library that
we built so maybe someone else can get
it's a beast if so let's make another
copy files phase
and drag the lib tiff product reference
into it this isn't really useful to us
when we're just doing normal development
build so we're going to do this only
when installing and we're going to give
this an absolute location because it's a
library we're going to put it in local
user local Lib standard library
distribution place for a technical issue
this means we're building a route for
distribution where we're gonna have user
local Lib and slash applications rather
than just the drag and drop install
application presumably because we're
including the library it's for
developers anyway so and actually would
be nice to have to read me in any case
even if a build fails part way along the
way so why don't you drag that phase to
be the first thing that happens so even
if the compliation x' don't go well
we're gonna have a readme and whatever
we end up with so copy files phases are
one thing but more interesting are these
script phases that are completely
general so let's add one to the end of
the actually it's add it to the end
we've actually got a few scripts ready
to go in some stickies I think the first
one we're going to put on is a
accumulating log which we'll put in an
entry for any given build that we do
saying exactly what got build and I
believe what style was used for the
build this is gonna use shell for this
and it's gonna run with every build now
let's try something a little bit
trickier even still add another shell
script phase and this one what we're
gonna do is on the case of install
builds and we're doing final builds for
distribution what we'd like to do is see
them in the finder so that we can go and
immediately check them out and see what
the user would see just to make sure
that they're right so this is going to
use shell to invoke an apple script
that'll raise the install builds
location in the finder for us so that we
can go and take a look at this and
because this is really only interesting
and we're doing full builds we're gonna
make this happen only when installing so
there's a bunch of custom stuff let's do
a normal build in the PD UI of the
application target to up
let's change rails yeah you're gonna
have to change the build phases our
style that works
pretty quick now if we can show that in
the finder okay so what are we looking
for let's see
there there
well there's the build on oh so we
created to build on we did get a build
log interesting that's a start
the perhaps more interesting would be to
actually take a look at a final
deployment build which will invoke all
of these build phases so if you could
bring up the terminal window
ooh and crank up the farm big enough
dagger thinking oh here we go
all right enough and I believe that's in
the project rectory so if you do a px
build install with BST root set to slash
install
so this will do a deployment build in
that / install location and you can see
those build phases are happening quickly
in the background and the finder did
raise with a copy of our route inside
the Applications folder you should see
the actual built application and if you
use ctrl click to look inside that
wrapper
we should be able to see that readme
there it is
let's build faces with that I'm gonna
turn this over to Dave who's going to
show us a bit about how to do legacy
targets all right so back to the slides
[Applause]
okay well you might wonder why the Java
debugger engineers talking about legacy
targets and you know what I don't really
know so but it turns out it's kind of
fun because I get to show you how to
package your final application the way
we want you to package the application
and that's in a disk image so okay
legacy target well the basics of a
legacy target are that they are used to
invoke custom command line tools so as
Mike said earlier in the talk I mean the
most common thing you would do probably
is use it to call out to make or
something maybe for an open-source
project but there's lots of other things
you can do with it there's lots of other
build tools out there ant being one of
them
well you can also use them to create to
generate source files that are used in
other targets or to do some pre or post
processing on targets and of course you
can run anything from a legacy make file
target so to do just about anything an
example of some of those other things
you might want to do well package disk
images that's what we're gonna do in
this demo you can also do build
statistics you know log log statistics
at the end of builds or send out
notifications after a build like sending
an email or something like that and
let's see and with that actually we're
gonna bring Mike back up here and just
show this
okay so if you have the demo machine
right well the first thing we're gonna
do is bring up the shell script that we
built up for this that does the creation
of the disk image so go ahead and find
that out in the finder and bring it into
the target we don't need to add it to
any target or bring it into the project
but don't add it to a target if you take
a quick look at that why don't you close
up the so I don't want to go into detail
in here there's a few commands that are
sort of interesting and you can find
documentation on on the system for with
man I believe man pages but HDI util and
HD ID and there's also make FS
underscore HFS that actually creates the
HFS volume inside of the disk image
there's an article on how to do a lot of
this stuff on step wise which I
recommend okay so let's go ahead and
create a new target a legacy make file
target and we'll give it a nice name
so that we know what it is and let's go
ahead and put this at the top this is
actually going to be the main target for
the project because it does the final
processing that's involved in building
this this little demo here and go ahead
and make the other targets depend on it
so so now when we actually build that
target it'll make sure all the other
targets are built first so okay well now
let's do the real work actually the real
work within the shell script but so
let's change the build tool here to
actually be been SH so that it does run
a shell script and we'll go over to our
stickies and drag in the command line
well and this command line all it does
is it's creating an 8 megabyte disk
image I was a little lazy writing the
shell script so I didn't actually come
pyew how much space it would take and
it's going to name the disk image
snapshot and copy in the application
itself so I think that's it shall we
build it let's build it you'll see down
here that it's actually echoing some
stuff about what it's doing to create
this disk image yeah copying files it
actually compresses the the disk image
too so you don't really have to worry
about creating a disk image that's too
large because the final disk image will
be quite small so we'll go actually to
the project directory right because
that's where we decided to put the disk
image and there should be in snapshot
and double click on it and it's mounting
and disk copy no surprises there and
look there we have a disk image and an
application inside it that you can just
launch and run ok and with that back to
Mike ok so let's have the slides back
for a moment here all right
all right so we've covered a few things
today and I just want to sum up
basically you know project builder
provides a number of ways to import code
into you into project builder so that
you can begin using it if you already
have an existing project and code war
area or in the old project builder you
can bring those in directly and as we
saw it's pretty easy just to import a
whole wad of source code that you got
from wherever you know the build system
we've tried to make it flexible we've
tried to give you all ways to customize
the build process to do things that we
didn't necessarily anticipate and to
give you basically ways to solve
problems that we haven't solved yet now
this is not to say that we're not
planning on solving a lot of these
problems eventually it'd be nice if you
didn't have to write some gnarly shell
script and set up all this legacy target
just to build a disk image and I think
we can expect to see project builder do
a lot of these things more automatically
the point is that until we get around to
doing this you're not totally stuck so
that was the main point of the session
today and at this point I will ask God
for you to come back on stage and we'll
go through a couple of these info slides
and have a little QA
pretty amazing stuff I think we're gonna
get a lot of a lot of use out of project
builder with you guys can we have the
house lights up we're gonna start a
little Q&A session while I talk over the
information slides these are these are
our information addresses the top one is
our tools page we list all Mac os10
tools available there we have a special
page for project builder project builder
pages include updates so as new things
happen as new details occur as press
events and other other things come to
come to the public we've put them onto
that page we also have a series of
mailing lists that we host the URL there
is the master massing mailing list page
and the three project builder users
cocoa developer and Carbon developer our
mailing lists that are in heavy use by
our community can we have all the Q&A
presenters up on stage please this is
the roadmap for sessions through the
rest of the week starting at 10:30 we're
talking about Java development tools
over in room a 1 and tomorrow we do
compiler technologies on Apple
performances tools in this room I hope
to see a lot of you there again and then
through the week debugging on Mac OS 10
Friday morning very important our C++
frameworks group and our feedback forum
on Friday hope to see a lot of you there
and if you need to contact me or the
engineering team here's two addresses my
address I'm the technology manager for
development tools always interested to
hear your feedback always interested to
hear what your needs are what your
product needs might be that that need
interaction with the team and the Mac OS
10 tools feedback mailing list is a
place where you can send product
enhancement ideas you know general
questions that you want to go to the
engineering engineering team itself
you