[platypus-dev] Re: platypus in installer

  • From: Vincent Neyt <vn003@xxxxxxxxxx>
  • To: platypus-dev@xxxxxxxxxxxxx
  • Date: Thu, 19 Jan 2006 11:10:11 +0100

Sveinbjorn,
i'm not using platypus to start a binary application, that would be silly, i'm using it to start up the Tomcat servlet engine, which requires environment variables being set and a shell script being addressed.
When I talk about the 'app', Macstart, I'm actually referring to the platypus app.
Just wanted to clear this up, I have not exaclty been clear about what i mean by the 'Macstart app'.


greets,
Vincent

Op 18-jan-06 om 16:18 heeft Sveinbjorn Thordarson het volgende geschreven:

Does your script change the permissions on the executable and the script within the Platypus-generated bundle? That might be breaking it. I suppose you don't get a finder warning or anything like that?

If you're using a script to launch an application, it's generally best to use the '/usr/bin/open' command, as opposed to running the binary within the app bundle directly.

On Jan 18, 2006, at 3:13 PM, Vincent Neyt wrote:

Ok,
thanks for the comments, the script is now completely debugged and works like a charm, except it still doesn't work after installation in a different directory. It's like it doesn't even get going.
and then when i create the app again in the new directory using the original .sh script and Platypus, it works like a charm again.


strange.
greetz,
Vincent Neyt

Op 18-jan-06 om 13:31 heeft Sveinbjorn Thordarson het volgende geschreven:

On Jan 18, 2006, at 12:23 PM, Vincent Neyt wrote:

I have been using your wonderful platypus software. I am working on a cd-rom that has an Apache Tomcat on it. Users have to install it and once it is up and running people can use my dynamic web application. For mac users, I have found a way to bundle the whole startup shell stuff in one nice Platypus app, so that users simply have to click the app to start everything up.
Now when i create the app, it works like a charm. but then when I compile my installer, and run that installer and start the app from the directory it has been installed in, it never works, and i cant get it to.
from your help file i have inserted the code to change the working directory to the directory where the app is, so that shouldnt be the problem.
the only thing i can imagine that might be causing this, is that maybe when I create the app, the directory structure is hard coded into the executable portion of the app, and doesn't work whenever it is installed into another directory.
Do you have any idea what the problem could be and how to solve it?

The only path that's hardcoded into Platypus apps is the standard application bundle directory structure, i.e.


MyApp.app/Contents/
MyApp.app/Contents/Resources
MyApp.app/Contents/MacOS

and so on. It receives the path to the application bundle is received in the first argument to the script. In order to access the contents of the application bundle, you need to change your working directory to the first argument -- this puts you inside MyApp.app. Does your Platypus app output anything? Take a look at the system logs in Console.app. I'd recommend that you try making your script output debugging info, e.g. 'echo $CWD', test everything carefully in your script code.

Cheers,

Sveinbjorn Thordarson










Other related posts: