Is there a way I can extract resources from a MacOS X .rsrc file?
(e.g. a Theme file). Specially I have a resource file that has a
number of "icns" resources and a number "png" resources that I'd like
to extract into separate ".icns" or ",png" files.
Thanks in advance
All the Best
Dave
_______________________________________________
use-revolution mailing list
use-rev...@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Perhaps ResFool is what you are looking for. You can also use the
getResource command in Revolution.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum
We are always looking for new projects! Feel free to contact us to
discuss your custom software project!
I tried the getResource command in revolution, it doesn't seem to
work with Mac OS X .rsrc files. For instance when I run this script
from a button:
on mouseUp
local myFilePathName
local myResourceData
local myResult
put "/Users/Dave/Desktop/iTunesImages/myFile.rsrc" into
myFilePathName
put getResources(myFilePathName) into myResourceData
put the result into myResult
end mouseUp
myResourceData and myResult are both empty, yet when I look at the
file with ThemePark it show the Icons and Files ok. The myFile.rsrc I
used here was taken from iTunes in the Resources folder inside the
App Package.
What I really want is to convert the pngs and icns into JPEG images.
All the Best
Dave
> I tried the getResource command in revolution, it doesn't seem to
> work with Mac OS X .rsrc files. For instance when I run this script
> from a button:
>
> on mouseUp
> local myFilePathName
> local myResourceData
> local myResult
>
> put "/Users/Dave/Desktop/iTunesImages/myFile.rsrc" into
> myFilePathName
>
> put getResources(myFilePathName) into myResourceData
> put the result into myResult
>
> end mouseUp
>
> myResourceData and myResult are both empty, yet when I look at the
> file with ThemePark it show the Icons and Files ok. The myFile.rsrc I
> used here was taken from iTunes in the Resources folder inside the
> App Package.
>
> What I really want is to convert the pngs and icns into JPEG images.
The getResources function works on the resource fork only, added back in
the OS 8.5 days and increasingly Apple is migrating away from using
resource forks so it's not so useful under OS X.*
So while that explains why you're not getting what you're looking for
with that, I'm confused about what's in iTunes .rsrc file. It seems its
icons are stored in several dozen .icns files within the bundle's
"Resources" folder. With a tool or external that can extract the image
data from them (could conceivably be done with a script too) it would
seem those icns files are where you would obtain those images.
Yet the iTunes .rsrc file weighs in at more than 10MB. What's in it?
* I'll take this opportunity to make another prediction about Apple:
one of the next major changes to the OS seems likely to be migrating
away from HSF to the same file system used by Unix/Linux. The downside
to this migration is the final end of the old resource forks, but the
upside would be complete compatibility with most of the non-Microsoft
world while further marginalizing Windows, drawing attention to it being
a technological island.
Similar in scope to the other major transitions (68k->PPC, Classic->OS
X, PPC->Intel) this will be somewhat disruptive during the transitional
phase, but will also carry an upside for vendors as the previous
transitions did by artificially enhancing demand for software upgrades
which would otherwise be dependent on features alone.
I'll go further out on a limb to predict this will be announced within
the next three years.
--
Richard Gaskin
Fourth World
Revolution training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
There are a *lot* of icons! Download ThemePark and look. For instance
there is an Icon for every iPod on the market in every color, when
you include all resolutions from 512x512 (in some cases) down plus
all the masks. There are also png images and a lot of strings. I just
want to be able to access this rsrc file to get an icns file, then
access the icns file to get the rendered version of the Icon at a
given resolution.
>
> * I'll take this opportunity to make another prediction about
> Apple: one of the next major changes to the OS seems likely to be
> migrating away from HSF to the same file system used by Unix/
> Linux. The downside to this migration is the final end of the old
> resource forks, but the upside would be complete compatibility with
> most of the non-Microsoft world while further marginalizing
> Windows, drawing attention to it being a technological island.
>
> Similar in scope to the other major transitions (68k->PPC, Classic-
> >OS X, PPC->Intel) this will be somewhat disruptive during the
> transitional phase, but will also carry an upside for vendors as
> the previous transitions did by artificially enhancing demand for
> software upgrades which would otherwise be dependent on features
> alone.
>
> I'll go further out on a limb to predict this will be announced
> within the next three years.
>
I wouldn't be surprised if they did do this. Seems like they are hell-
bent on getting rid of anything good from the Mac OS. The last time I
looked HFS was a much better filing system than the Unix filesystem.
Thanks a lot
All the Best
Dave
I believe the next filesystem will be ZFS. Support for it is already
included, although buggy and incomplete (don't know on the Server).
Cheers,
Luis.
>
> I wouldn't be surprised if they did do this. Seems like they are
> hell-bent on getting rid of anything good from the Mac OS. The last
> I just want to be
> able to access this rsrc file to get an icns file, then access the icns
> file to get the rendered version of the Icon at a given resolution.
If it is just a one-time thing to extract particular icons, you could
save a lot of time by just using Graphic Converter. It will extract all
the icons for you and save them to disk.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
> Dave wrote:
>
>> I just want to be able to access this rsrc file to get an icns
>> file, then access the icns file to get the rendered version of the
>> Icon at a given resolution.
>
> If it is just a one-time thing to extract particular icons, you
> could save a lot of time by just using Graphic Converter. It will
> extract all the icons for you and save them to disk.
GC will open .icns files, but not MacOS X .rsrc files, so I'd still
need a way to get the .icns resources into separate files.
But , no, unfortunately I want to be able to obtain the rendered icon
from a .icns file and this file is stored on a removable volume. When
the volume is mounted, I want to be able to grab the icon from the
file on the volume.
Is there really no way to access MacOS X .rsrc (theme) files under
RunRev or a way get an Icon and a rendered image?
All the Best
Dave
--
Stephen Barncard
-------------------------
San Francisco
I'm not so sure. Right-clicking on iTunes.rsrc doesn't provide an
option for opening it as a bundle, and dropping it on TextEdit open it
up. It appears to be a file, and if indeed it contains icons it's just
another example of Apple not following their own guidelines, which
suggest that icons should be put in icns files within the app's bundle.
> This is not the same now in Rev as pictures and sounds are stored in a
> proprietary format, I'm sure to preserve cross-platform compatibility.
> Say, nobody's written a 'Resource Mover' for Rev yet.....
> maybe I will.
If you can pull the image data from icns files and .rsrc files into Rev
image objects, be sure to put a PayPal link on your download page and
let me know the URL as soon as it's available. :)
--
Richard Gaskin
Fourth World
Revolution training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
"It appears to be a file, and if indeed it contains icons it's just
another example of Apple not following their own guidelines, which
suggest that icons should be put in icns files within the app's bundle."
download this:
http://www.geekspiff.com/software/themepark/
it will open the iTune.rsrc file and reveal that it contains:
icns (Tut, tut)
PICT files (very, very old-fashioned)
PNGf images
sincerely, Richmond Mathewson.
____________________________________________________________
A Thorn in the flesh is better than a failed Systems Development Life Cycle.
____________________________________________________________
2009/1/22 Richard Gaskin <ambas...@fourthworld.com>:
> stephen barncard wrote:
>>
>> Have you opened (control-click) the package and looked through all the
>> files/folders inside? .rsrc is a special os type that's actually a
>> folder.
>
> I'm not so sure. Right-clicking on iTunes.rsrc doesn't provide an option
> for opening it as a bundle, and dropping it on TextEdit open it up. It
> appears to be a file, and if indeed it contains icons it's just another
> example of Apple not following their own guidelines, which suggest that
> Richard Gaskin
--
Stephen Barncard
-------------------------
San Francisco
"It doesn't appear to be in my distribution."
Humpf:
If you have a 3-button mouse right-click on the iTunes.app icon
(otherwise do the fiddley thing with a ctrl button):
go down the contextual menu and choose "Show Package Contents"
this will crack open the iTunes package:
iTunes/Contents/Resources/iTunes.rsrc
sincerely, Richmond Mathewson.
____________________________________________________________
A Thorn in the flesh is better than a failed Systems Development Life Cycle.
____________________________________________________________
iTunes.app/Contents/Resources/iTunes.rsrc
--
Richard Gaskin
Fourth World
Revolution training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
I control-clicked the file and it doesn't seem to be a package, it
looks like a regular file. If I open it with ThemePark, I can see the
contents.
All the Best
Dave
Don't forget iTunes runs on Windows too, it's probably to make it
compatible with the Windows version?
All the Best
Dave