[platypus-dev] Re: platypus in installer
- From: JP <jpotter-platypus@xxxxxxxxxxxxx>
- To: platypus-dev@xxxxxxxxxxxxx
- Date: Wed, 18 Jan 2006 11:27:20 -0500
cd "$1/.."
Your script is in Macstart.app/Contents/Resources/, so your script as-
is will be making the dir in Macstart.app/Contents/, no? Where's the
open.command file coming from?
Also, this script will fail if one user downloads the app and another
runs it. You might want to build something in ~/Library/Application
Support/MacStart/. For what you're doing though, that might be just
fine... :-)
best,
Jeff
On Jan 18, 2006, at 10:59 AM, Vincent Neyt wrote:
nope,
the app is simply called Macstart.app, and all paths in the shell
script are oneword paths.
this is the script that i'm Platypussing:
#!/bin/sh
cd "$1/.."
echo $PWD
mkdir TestDir
chmod a+x ./open.command
./open.command
cd tomcat/bin
chmod ug+x start_tomcat stop_tomcat
cd ..
set CATALINA_BASE=/tmp
set CATALINA_TMPDIR=/tmp
bin/start_tomcat
echo $CWD
but as I said, it doesn't even get as far as opening the
open.command file. Doesn't make the TestDir either.
greetz,
Vincent
Op 18-jan-06 om 16:48 heeft JP het volgende geschreven:
Does your path have any spaces in it? (ie, on the command line,
you might be running it such that a space isn't in the path, but
if the name of the App has a path, and you're under $appPath/
Contents/Resources/, you might have a space and need to quotemeta
() it).
best,
Jeff
On Jan 18, 2006, at 10:13 AM, 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
- References:
- [platypus-dev] platypus in installer
- From: Vincent Neyt
- [platypus-dev] Re: platypus in installer
- From: Sveinbjorn Thordarson
- [platypus-dev] Re: platypus in installer
- From: Vincent Neyt
- [platypus-dev] Re: platypus in installer
- From: JP
- [platypus-dev] Re: platypus in installer
- From: Vincent Neyt
Other related posts:
- » [platypus-dev] platypus in installer
- » [platypus-dev] Re: platypus in installer
- » [platypus-dev] Re: platypus in installer
- » [platypus-dev] Re: platypus in installer
- » [platypus-dev] Re: platypus in installer
- » [platypus-dev] Re: platypus in installer
- » [platypus-dev] Re: platypus in installer
- » [platypus-dev] Re: platypus in installer
- » [platypus-dev] Re: platypus in installer
- » [platypus-dev] Re: platypus in installer
nope,
the app is simply called Macstart.app, and all paths in the shell script are oneword paths.
this is the script that i'm Platypussing:
#!/bin/sh cd "$1/.." echo $PWD mkdir TestDir chmod a+x ./open.command ./open.command cd tomcat/bin chmod ug+x start_tomcat stop_tomcat cd .. set CATALINA_BASE=/tmp set CATALINA_TMPDIR=/tmp bin/start_tomcat echo $CWD
but as I said, it doesn't even get as far as opening the open.command file. Doesn't make the TestDir either.
greetz, Vincent
Op 18-jan-06 om 16:48 heeft JP het volgende geschreven:
Does your path have any spaces in it? (ie, on the command line, you might be running it such that a space isn't in the path, but if the name of the App has a path, and you're under $appPath/ Contents/Resources/, you might have a space and need to quotemeta () it).
best, Jeff
On Jan 18, 2006, at 10:13 AM, 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
- [platypus-dev] platypus in installer
- From: Vincent Neyt
- [platypus-dev] Re: platypus in installer
- From: Sveinbjorn Thordarson
- [platypus-dev] Re: platypus in installer
- From: Vincent Neyt
- [platypus-dev] Re: platypus in installer
- From: JP
- [platypus-dev] Re: platypus in installer
- From: Vincent Neyt