PDA

View Full Version : Trying to deploy a bundle



afflictedd2
7th May 2009, 21:17
Hi everyone,

I just lately deployed a qt wrapper around some command line utilities. I basically created a bundle.app application. I have a problem though, in order for the application to work correctly I have to call it from the command line like this:

open bunddle.app

and it's able to find the programs when it is given the path from where to retrieve them.

However, if I double clic on bunddle.app, then it doesn't find the programs it needs to run. I don't understand why? it is the same application, and the same code. It is as if it needs to run from a terminal in order to run correctly.

Any help appreciated.

Ed.

wysota
8th May 2009, 07:23
Maybe you are using relative paths and the current working directory is different with the two approaches?

afflictedd2
8th May 2009, 19:39
Hmmmmm Yeah double checking I realized I had commented that ::setenv(..., I do have the path set already on the command line. Interesting, it seems like the environment for the applications in a MAC is non the same as in its terminals.


QString sysPath = ::getenv("PATH");
sysPath = sysPath + ":" + environment + "/bin";
// ::setenv("PATH", sysPath.toStdString().c_str(), 1);
QStringList env = QProcess::systemEnvironment();


Thank you.

Ed.