Newbie Q: Merge .rez results into a resource fork?
Newbie Q: Merge .rez results into a resource fork?
- Subject: Newbie Q: Merge .rez results into a resource fork?
- From: "Dan Smith" <email@hidden>
- Date: Mon, 25 Jul 2005 14:34:24 -0400
I'm trying to build "plugin" device drivers (old name, they are _not_ OS X
plugins) for a software product known as the Harlequin RIP, using Xcode.
Harlequin is a Unix-centric company and their directions call for traditional
command-line building down on the bare metal, using make, GNU C and friends
directly.
I'm confused by what seem to be (at least) two different uses of the word
"bundle" and more kinds of "library" than I can shake a stick at.
What I think are the relevant parts of their make file are:
LINKFLAGS = -bundle -framework Carbon
$(OUTDIR)/DisableOutput.bundle: $(OBJDIR)/DisableOutput.o DisableOutput.rez
version.txt
$(LD) $(LINKFLAGS) -o $@ $(OBJDIR)/DisableOutput.o $(PLUGLIB)
$(REZ) -a $(REZFLAGS) $(RINCLUDESALL) -d FILENAME=\"DisableOutput\" -d
HQNPLUGNO=2016 -d _PPC -o $@ DisableOutput.rez
$(OBJDIR)/DisableOutput.o: DisableOutput.c
$(CC) -c -o $@ $(CFLAGS) -O DisableOutput.c
That is, the C source is compiled and then linked into a single file that IS
NOT a Mac OS X "bundle" at all, but a library with a library style of "bundle."
The Rez tool then appends resources to the resource fork of the same file (i.e.
creates a resource fork).
The result is a single file that has the file extension ".bundle". It is
displayed by the Finder using a generic bundle icon, but is not a directory and
does not present the "show package contents" as a control-click option.
I am having so many problems that I am not quite sure what questions to ask...
but three of them are:
a) If I start with a "dynamic Carbon library" template and a "bundle" library
style, it builds with the ld tool... but it will not accept the -bundle option
because "powerpc-apple-darwin8-gcc-4.0.0: -bundle not allowed with
-dynamiclib". However, if I use a "static Carbon library" template it uses
libtool and ranlib instead of ld, and will not accept the -bundle option for
other reasons.
b) I can include a .rez file and add a "Build ResourceManager resources" build
phase to a static or dynamic library project, but even though the phase is
visible and shows DisableOutput.rez as an input file, the rez tool never gets
invoked.
c) I can build as an application, which of course does not build a library for
me. This does, however, invoke the rez tool and does compile resources--but the
resources are always compiled as an individual file in the data fork; no
options I can discover will get it to compile into the resource fork of an
existing file.
I don't dictate our OEM's application architecture; I need to build this
library in the form of a single file with a resource fork or it won't work.
My motivation for doing this is that Apple seems to have put developers on
notice that Xcode is the only tool they support for Mactel development. If this
is true, presumably our OEM will eventually get on board and solve all these
problems for me, but I don't want to wait; it seems to me that it is time, or
past time, for me to start using Xcode for my development tasks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden