Root start up directory on MacOSX?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Root start up directory on MacOSX?

Stew MacLean

Hi,

 

I’m about to attempt deploying to the Mac (even though I don’t have one!), and I’m wondering where the root startup directory is.

 

For example BottomFeeder has the structure:

 

BottomFeeder

            bottomFeeder.app

                        Contents

                                    MacOS

                                                visual <<<- executable

 

Is the start up directory BottomFeeder, bottomFeeder.app, or …/MacOS?

 

The reason I need to know is that I have application subdirectories relative to the root start up directory and need to know where to put them.

 

Cheers,

 

Stewart

                       

Reply | Threaded
Open this post in threaded view
|

RE: Root start up directory on MacOSX?

Stew MacLean

(replying to my own post…)

 

I could change directories to a super root directory (that has the myApp.app subtree), so as to preserve the existing structure. However I still need to know what the start up subdirectory is when the user double clicks on the app in the Finder… is it MacOS (where the engine is), or myApp.app (that’s visible in the Finder) – or something else?

 

Please excuse my MacIgnorance – I have lots of friends with Macs but want to at least have a chance of start up when I try it out on their machines. J

 

Cheers,

 

Stewart

 

 

-----Original Message-----
From: Stewart MacLean [mailto:[hidden email]]
Sent:
14 November 2006 10:10 a.m.
To: [hidden email]
Subject: Root start up directory on MacOSX?

 

Hi,

 

I’m about to attempt deploying to the Mac (even though I don’t have one!), and I’m wondering where the root startup directory is.

 

For example BottomFeeder has the structure:

 

BottomFeeder

          bottomFeeder.app

                      Contents

                                  MacOS

                                              visual <<<- executable

 

Is the start up directory BottomFeeder, bottomFeeder.app, or …/MacOS?

 

The reason I need to know is that I have application subdirectories relative to the root start up directory and need to know where to put them.

 

Cheers,

 

Stewart

                     

Reply | Threaded
Open this post in threaded view
|

RE: Root start up directory on MacOSX?

Alan Knight-2
In general, note that the "current directory" on startup is not necessarily reliable, in that it can vary depending on how the application was started, what version of the operating system it is, etc. This is particularly noticeable on Windows, but happens on other operating systems as well. It's possibly less of an issue if you have a packaged executable (at least that removes the option of dragging and dropping an image onto a VM) but it would be best to be suspicious of the current directory. Also, Windows dialogs have a tendency to change the current directory, at least while they're running, and sometimes afterwards, no matter how much you ask them not to.

One thing you can do is ask for ObjectMemory imageDirectory, which should reliably tell you what directory the image is in, from which you can presumably figure out whatever you need to know if you know your own directory layout.

At 05:14 AM 11/14/2006, Stewart MacLean wrote:
(replying to my own post…)
 
I could change directories to a super root directory (that has the myApp.app subtree), so as to preserve the existing structure. However I still need to know what the start up subdirectory is when the user double clicks on the app in the Finder… is it MacOS (where the engine is), or myApp.app (that’s visible in the Finder) – or something else?
 
Please excuse my MacIgnorance – I have lots of friends with Macs but want to at least have a chance of start up when I try it out on their machines.
J
 
Cheers,
 
Stewart
 
 
-----Original Message-----
From: Stewart MacLean [[hidden email]]
Sent: 14 November 2006 10:10 a.m.
To: [hidden email]
Subject: Root start up directory on MacOSX?
 
Hi,
 
I’m about to attempt deploying to the Mac (even though I don’t have one!), and I’m wondering where the root startup directory is.
 
For example BottomFeeder has the structure:
 
BottomFeeder
          bottomFeeder.app
                      Contents
                                  MacOS
                                              visual <<<- executable
 
Is the start up directory BottomFeeder, bottomFeeder.app, or …/MacOS?
 
The reason I need to know is that I have application subdirectories relative to the root start up directory and need to know where to put them.
 
Cheers,
 
Stewart
                     

--
Alan Knight [|], Cincom Smalltalk Development

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross
Reply | Threaded
Open this post in threaded view
|

RE: Root start up directory on MacOSX?

Stew MacLean
In reply to this post by Stew MacLean

Hi Alan,

 

Thanks for this. I’m fully aware of the problems of “current directory” under Windows (having been bitten several times!).

 

What I need to know, is under MacOS X, (running an executable built according to Georg Heeg’s instructions), when the user double clicks on the app in the Finder, what the answer to current directory will be. My suspicion is that it is MacOS (where the engine lives), but want to confirm this before I try it out.

 

Once I’ve established this upon start up, then I’ll move up to my application root.

 

Cheers,

 

Stewart

 

-----Original Message-----
From: Alan Knight [mailto:[hidden email]]
Sent: 15 November 2006 4:45 a.m.
To: Stewart MacLean; 'Stewart MacLean'; [hidden email]
Subject: RE: Root start up directory on MacOSX?

 

In general, note that the "current directory" on startup is not necessarily reliable, in that it can vary depending on how the application was started, what version of the operating system it is, etc. This is particularly noticeable on Windows, but happens on other operating systems as well. It's possibly less of an issue if you have a packaged executable (at least that removes the option of dragging and dropping an image onto a VM) but it would be best to be suspicious of the current directory. Also, Windows dialogs have a tendency to change the current directory, at least while they're running, and sometimes afterwards, no matter how much you ask them not to.

One thing you can do is ask for ObjectMemory imageDirectory, which should reliably tell you what directory the image is in, from which you can presumably figure out whatever you need to know if you know your own directory layout.

At 05:14 AM 11/14/2006, Stewart MacLean wrote:

(replying to my own post…)
 
I could change directories to a super root directory (that has the myApp.app subtree), so as to preserve the existing structure. However I still need to know what the start up subdirectory is when the user double clicks on the app in the Finder… is it MacOS (where the engine is), or myApp.app (that’s visible in the Finder) – or something else?
 
Please excuse my MacIgnorance – I have lots of friends with Macs but want to at least have a chance of start up when I try it out on their machines.
J
 
Cheers,
 
Stewart
 
 
-----Original Message-----
From: Stewart MacLean [[hidden email]]
Sent: 14 November 2006 10:10 a.m.
To: [hidden email]
Subject: Root start up directory on MacOSX?
 
Hi,
 
I’m about to attempt deploying to the Mac (even though I don’t have one!), and I’m wondering where the root startup directory is.
 
For example BottomFeeder has the structure:
 
BottomFeeder
          bottomFeeder.app
                      Contents
                                  MacOS
                                              visual <<<- executable
 
Is the start up directory BottomFeeder, bottomFeeder.app, or …/MacOS?
 
The reason I need to know is that I have application subdirectories relative to the root start up directory and need to know where to put them.
 
Cheers,
 
Stewart
                     


--
Alan Knight [|], Cincom Smalltalk Development

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross