Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: bnilsson on July 08, 2007, 06:41:33 pm

Title: The best way to make an application (MacOSX) bundle from CB?
Post by: bnilsson on July 08, 2007, 06:41:33 pm
Hi!

What would be the preferred way to make an application bundle for MacOSX from CB?
Sometimes it is not enough to make it run by double-click (I have seen how to do this elsewhere), there may also be a lot of housekeeping in the Contents/Resources folder with rsrc's, Info.plist, InfoPlist.strings, Icons, nib's, etc.
I suspect it would be handled by scripts in pre/post build steps, but maybe I missed some other ingenious way out there?

Title: Re: The best way to make an application (MacOSX) bundle from CB?
Post by: dmoore on July 09, 2007, 04:44:26 pm
you need to look into some sort of package/installation management tool for the Mac. ideally, a distributable package will be a single compressed binary file containing binaries and setup info (like an msi on windows or a deb on debian based systems) that the OS on the target machine can use to deploy the necessary files and associations in standard folders.
Title: Re: The best way to make an application (MacOSX) bundle from CB?
Post by: afb on July 10, 2007, 09:39:26 am
It's not impossible to create and include the necessary files and directories, the "single compressed binary file" is then done as a disk image (.dmg) with the application bundle inside.

However, it is tedious to set this up for every project. One very nice approach is taken by e.g. the Allegro (http://alleg.sourceforge.net/) library, that has a helper program called "fixbundle" that automates this ?

https://alleg.svn.sourceforge.net/svnroot/alleg/allegro/branches/4.2/tools/macosx/fixbundle.c
Title: Re: The best way to make an application (MacOSX) bundle from CB?
Post by: bnilsson on July 10, 2007, 10:33:44 am
Quote
However, it is tedious to set this up for every project. One very nice approach is taken by e.g. the Allegro library, that has a helper program called "fixbundle" that automates this ?

https://alleg.svn.sourceforge.net/svnroot/alleg/allegro/branches/4.2/tools/macosx/fixbundle.c

Thanks, it looks very interesting, I will try it!
Title: Re: The best way to make an application (MacOSX) bundle from CB?
Post by: bnilsson on July 10, 2007, 01:20:24 pm
I tried it and it worked beautifully.
Thanks!


However, it did not compile as-shown without the complete allegro library, so I installed it.
Maybe I'll try to make it stand-alone later.