Author Topic: Mac icons/resources  (Read 4617 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Mac icons/resources
« on: November 05, 2006, 12:43:33 pm »
I'll do a small change to the Mac OS X icons, with removing the cbp.rsrc and csd.rsrc files and changing app.rsrc into app.r instead. So the net file size would stay the same, and we're not going to use resource icons for files anyway.

Code
 68K    app.rsrc
 56K    cbp.rsrc
 52K    csd.rsrc

180K    app.r

The current .rsrc files needs to be changed into resource forks anyway, so the .r (Rez) file is much easier as it is a plain text format. This is so that we can add a post-link step to the wxMac application, to make it receive events by default. That is: we add a resource fork and custom icon to it, when we install the application. Doesn't affect the bundle... (the wxWidgets samples does it the same way)


/usr/local/bin/codeblocks
/usr/local/share/codeblocks
/usr/local/lib/libcodeblocks.dylib
/usr/local/include/codeblocks


/Developer/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks
/Developer/Applications/CodeBlocks.app/Contents/Resources
/Developer/Applications/CodeBlocks.app/Contents/Frameworks/CodeBlocks.framework/CodeBlocks
/Developer/Applications/CodeBlocks.app/Contents/Frameworks/CodeBlocks.framework/Headers


Also adding .icns files for the other file types, as these are currently missing. Only doing 48x48, though.
Code
 64K    app.icns
 12K    c.icns
 56K    cbp.icns
 12K    cg.icns
 12K    cpp.icns
 52K    csd.icns
 12K    d.icns
 12K    f.icns
 12K    h.icns
 12K    rc.icns

takeshimiya

  • Guest
Re: Mac icons/resources
« Reply #1 on: November 06, 2006, 01:46:55 am »
That is: we add a resource fork and custom icon to it, when we install the application. Doesn't affect the bundle...
Valuable info, I was wondering if that could break the bundle

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Mac icons/resources
« Reply #2 on: November 06, 2006, 09:30:13 am »
Easy enough to strip the resfork from the bundle, if not using the same binary via symlinks ?

Resource forks were deprecated in wx 2.6 and are officially gone in wx 2.8, but there is still no other way to make the wxMac binary start receiving events without fully wrapping it in a .app bundle first so... We're just doing a small workaround for that bug, it's not that we actually use the resfork for anything ? Only downside is that the confused Tiger gives it a "Classic" description and crossed-over icon - but it still launches and works just fine on Intel.

Code
/Developer/Tools/Rez -d __DARWIN__ -t APPL Carbon.r src/src/resources/icons/app.r -o /usr/local/bin/codeblocks
/Developer/Tools/SetFile -a C /usr/local/bin/codeblocks

The CodeBlocks.app bundle will be the official/supported way to use it, for non-debug.