Re: rsrc file with PICT items - copied to Package as zero K file
Re: rsrc file with PICT items - copied to Package as zero K file
- Subject: Re: rsrc file with PICT items - copied to Package as zero K file
- From: Tomas Zahradnicky <email@hidden>
- Date: Tue, 22 Feb 2005 22:46:51 +0100
I am using Xcode 1.5 and Mac OS X 10.3.8 and have been having an
issue with rsrc files. I have 10 PICT resources in a ResEdit rsrc
file added to my Xcode project and when I open the nib file in
Interface Builder, the PICT items all show under the images tab and
in the windows where I have the PICT controls set to the resource ID
of the corresponding PICT. This part is working as expected.
ResEdit is obsolete. Please use either Resorcerer if you really want
to stay and use resources and convert them to the data fork based
resources. This is supported by Mac OS 9 (though private) and
definitely supported with Mac OS X. Why that?
Some file systems i.e. UFS or ext2, NTFS do not support resource fork
and the only known fork the them is the data fork. If you have
resources in the resource fork, file gets usually trimmed of that
fork and if data fork was empty, the result is 0K file which is
completely useless.
But when I build my application (carbon app with nib files) then the
PICT items do not show up. I have the rsrc file added to the
Resources directory of the Xcode project. When I open the build
package and look in the Contents/Resources there is my rsrc file but
the file size is "Zero" instead of the 380K of pictures for the
original ResEdit file.
I have tried naming the rsrc file the same as the executable file
name and adding to the project again, but still ends up in the
package as a Zero K file. Also if I don't name it the same as the
executable it still gets copied over with its original name (like
PICTS.rsrc) and is still Zero K in size. I have other projects that
are working fine with the PICTs.rsrc files but am baffled by this
one. I have tried several new projects and have tried different
names but am just spinning my wheels. Any help would be appreciated.
Is your .rsrc file data fork or resource fork based? If it is
resource fork based (data fork is zero) that it may crop it due to
some bug.
You can convert resource fork into data fork easily with:
cd <dir with yourfile>
/Developer/Tools/DeRez yourfile.rsrc > yourfile.r
/Developer/Tools/Rez -useDF yourfile.r -o yourfileDF.rsrc
(Rez does not accept pipe from DeRez while DeRez does not accept -o
option. Should I place a bug report for both of that?)
-Tomas
--
# Ing. Tomas Zahradnicky, Jr.
# The Czech Technical University
# Dept of Computer Science, FEE-CTU Prague
_______________________________________________
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