[squeak-dev] iPhone 1.07

Eliot Miranda eliot.miranda at gmail.com
Tue Oct 28 18:41:21 UTC 2008


On Tue, Oct 28, 2008 at 10:38 AM, Damien Pollet <damien.pollet at gmail.com>wrote:

> On Tue, Oct 28, 2008 at 6:08 PM, Eliot Miranda <eliot.miranda at gmail.com>
> wrote:
> > I think the answer for the VM application is no because Mac OS X opens
> > applications in /.
> > So the VM cannot find the image unless given a full pathname and cannot
> find
> > file unless given a full pathname either since the image won't be in the
> > same directory as the image file.
>
> But that's only when you run the application from the Finder or using
> /usr/bin/open I think.
>
> If you directly run the binary inside the .app bundle from a shell,
> then the unix way applies, no ?


You'd think so, but in my recent experience it isn't reliable.  Sometimes
relative paths to the image work, sometimes not.  e.g. ../../foo might be
interpreted as ../foo. So I think the only safe assumption is that one needs
absolute paths.

> But it is trivial to write a shell script to wrapper the VM that supplies
> > the full pathnames, e.g.
> > ----8<---squeak---8<---
> > #!/bin/sh
> > open /Applications/SqueakFoo.app
> > /Applications/SqueakFoo.app/Resources/Scripting.image "`pwd`/$1"
> > ----8<---squeak---8<---
>
> Heh, I wasn't even aware that open would pass arguments like that.
> What Stef and I are doing is
> /Applications/Squeak.app/Contents/MacOS/Squeak\ VM\ Opt
> $PWD/image.image $PWD/script.st
>
>
> --
> Damien Pollet
> type less, do more [ | ] http://people.untyped.org/damien.pollet
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20081028/3c075db9/attachment.htm


More information about the Squeak-dev mailing list