[Bf-committers] osx install example 3

James Turner bf-committers@blender.org
Thu, 29 May 2003 11:14:51 +0100


On Wednesday, May 28, 2003, at 07:28  pm, Charles Wardlaw wrote:

> It is possible, actually, though you have to convert the .dmg into a
> .smi (which, I believe, appends some executable code to the image to
> make it self-mounting, but I could be wrong).  Not that I know *how*,
> but I've seen it done.

Mozilla can build a .dmg as part of their build process (though it has 
to be enabled by a toggle), and this includes
a click-through license agreement. Digging around in the Makefiles near 
mozilla/xpfe/bootstrap should give some hints.

> But doesn't the blender executable keep precompiled, default versions
> of all requisite files?  I mean, if .b.blend doesn't exist in the
> ~/.blender dir, it gets generated with a file from inside the blender
> executable.  Same goes for the bfont.ttf, right?  Other data could (and
> probably should) go in the Contents/Resources directory of the blender
> app bundle, and config could still be saved to the ~/.blender
> directory, which would get created upon program execution if it didn't
> exist.

I'm pretty sure installing files in $HOME (from a .pkg) is a bogus 
thing  to do *anyway*, since it's only going to work for one user. As 
Charles said, the only correct behavior is to store defaults inside the 
app bundle, and copy this tree over if it's not found at startup. This 
gives all users precisely the behavior they expect.

In fact, the even more correct option would be to use FSFindFolder (or 
it's CF equivalent) to to locate the 'Application Support Directory', 
and copy the files into a 'Blender' dir there. That directory would be 
$HOME/Library/Application Support/, btw.

Again, code to do this kind of thing is sitting in mozilla CVS, and 
probably other places. The only bit I don't know about it doing the 
recursive copy of the actual default file structure ... is there 
existing code to handle that or not?
I would have a go at doing all of the above, but I never seem to get 
anyway with blender builds .. will have another go later today.

H&H
James

--
They are laughing with me, not at me.