Some confusion and misinformation here:
Luigi: From a terminal command line in your project's folder, start your app like this:
open myapp.app
That should give the same results for GetCurrentDir as double-clicking the .app in Finder. Not sure why you're always seeing / with GetCurrentDir when the app is launched from the Laz IDE. Maybe there's a problem there with how it's launching the app.
Not sure what you mean by "working directory". Normally this is a synonum for "current directory". If you mean the location of the .app, that's not what GetCurrentDir returns.
Why do you need to know that? An .app can be dragged and dropped anywhere in the file system, although typically it will be located under /Applications. So I'm not sure that knowing where it's located is something you would normally be using.
However, if do need to know that for some reason, don't use the supplied code. It won't work if the app bundle is named differently from its executable, which is common. For example "My Program.app" with "myprog" executable. You can just chop off the final 3 folder names, searching back from the end of ParamStr(0) for 3 occurences of PathDelim.
Also, remember that Laz creates your app bundle with a symlink in Contents/MacOs that points back to the actual executable in your project folder. You would never distribute or move an app bundle that's set up like that - it's only done so for convenience. Instead, you would delete the symlink and copy the executable file in its place.
Thanks.
-Phil