[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] MacOSX Bundle

Just my 2 cents:

the examples of wxwidgets on the mac all have a bundle creation in the build phase On 21.03.2006, at 17:20, Phil Martin wrote. in the controls sample makefile it looks like this:

controls.app/Contents/PkgInfo: controls$(EXEEXT) $(top_srcdir)/src/ mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns
	mkdir -p controls.app/Contents
	mkdir -p controls.app/Contents/MacOS
	mkdir -p controls.app/Contents/Resources
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
	-e "s/EXECUTABLE/controls/" \
	-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/carbon/Info.plist.in >controls.app/Contents/ Info.plist
	echo -n "APPL????" >controls.app/Contents/PkgInfo
	ln -f controls$(EXEEXT) controls.app/Contents/MacOS/controls
cp -f $(top_srcdir)/src/mac/carbon/wxmac.icns controls.app/Contents/ Resources/wxmac.icns

controls_bundle: $(____controls_BUNDLE_TGT_REF_DEP)

So they just have the correct Info.plist and .icns file in the repository and build the rest from scratch.


OK, the bundle is checked in to the root as XaraLX.app (unsurprisingly) and SVN seems to pull the empty folder inside it correctly onto my Linux machine so I guess the structure will be maintained OK.

To use: manually copy the executable into the bundle's MacOS folder:
cp xaralx XaraLX.app/Contents/MacOS

Then you can double-click on XaraLX.app in Finder or from the command line:
open XaraLX.app

Ideally a makefile target will one day use this as a template bundle and as such, it might get moved. (Tha makefile target also needs to copy libCDraw and other required libraries into Contents/ Framework and tie their installation to the executable using install_name_tool.)


On 21 Mar 2006, at 15:51, Phil Martin wrote:

On 21 Mar 2006, at 15:45, Alex Bligh wrote:

Phil Martin wrote:
I have created a prototype bundle for XaraLX on Mac OS X. (A Mac OS X bundle is analogous to a RISC OS !Application folder, for those who go back that far.) I propose to check it into SVN (without the executable, of course) in the root of the XaraLX project, i.e. alongside Kernel, wxOil. Does that sound OK or would it be better inside a platform specific support folder?

So excuse the dumb question, but what exactly /is/ a bundle. If it's
one of those "directory that can be treated as a file" thingies the
Mac supports, subversion isn't going to see it as anything except
a file or a directory, so it probably won't satisfy your requirement.

What should really be happening is that the Makefile should /create/
a bundle, and put the target app in it (say under a target called
"make bundle" if it's hard to modify the main target). If there
is some command-line way to do this, it will be easy enough
to put it in the makefile.

I agree though that if your fix works (try it, delete the bundle,
and see if "svn up" recreates it) it would be a good bodge for now.
But won't you at least need "make" to copy the target app into
the bundle (or am I missing something?).


It's a folder structure containing a number of files, such as the exe, the icon, resources, and most importantly an XML file that describes the application in detail to Mac OS.

I see what you're saying about empty folders in SVN. That could be a problem. I'll find out...

The makefile definitely should have a target to create a working bundle. That may involve some folder creation but some of the bundle files need to be stored in SVN where anyone can modify them and the makefile can copy them. So I think we need to store an empty template bundle anyway.


Dominik Wagner          Mail: dom@xxxxxxxxxxxxxxxx
TheCodingMonkeys        http://www.codingmonkeys.de/
Blog - DasGenie: !Scrap http://scrap.dasgenie.com/

Attachment: smime.p7s
Description: S/MIME cryptographic signature