[Qt-creator] Evaluation on Mac OSX (Eike Ziller) Successful work around found (Eike Ziller)
G3WOE
michael at g3woe.com
Tue Jan 6 13:33:16 CET 2009
On 6 Jan 2009, at 11:00, qt-creator-request at trolltech.com wrote:
> I *can* change the PATH used for applications with an ~/.MacOS/
> environment.plist file of the form
OK
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd
> ">
> <plist version="1.0">
> <dict>
> <key>PATH</key>
> <string>/opt/local/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/
> usr/sbin:/usr/X11R6/bin</string>
> </dict>
> </plist>
>
OK, so the PATH issue must be a local problem to my machine. I have
deleted the Environment.plist and re-created it from scratch using the
plist editor. Still the same problem, I cannot modify the PATH. My
default path is /sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/
local/bin. If I append the required entries eg :/usr/local/Qt4.4 to
the end of this string and then login, I get no change to the reported
PATH using echo $PATH.
It is interesting when I enter >set, I get the following at the end of
the output
........
_=/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
__CF_USER_TEXT_ENCODING=0x1F5:0:0
osMajorVer=9
osMinorVer=5
perlversion=5.8.8
append_path ()
{
if ! eval test -z "\"\${$1##*:$2:*}\"" -o -z "\"\${$1%%*:$2}\"" -
o -z "\"\${$1##$2:*}\"" -o -z "\"\${$1##$2}\""; then
eval "$1=\$$1:$2";
fi
}
prepend_path ()
{
if ! eval test -z "\"\${$1##*:$2:*}\"" -o -z "\"\${$1%%*:$2}\"" -
o -z "\"\${$1##$2:*}\"" -o -z "\"\${$1##$2}\""; then
eval "$1=$2:\$$1";
fi
}
Things are going on here which go beyond our basic understanding. I do
not know where this reported script append_path() is being derived,
and I guess it is not an Apple derived function. That is a likely
guess as to why I cannot modify the PATH.
> The entry above for the PATH should be more or less the default path.
> I also haven't found a way to just add components to the existing/
> default PATH.
It is fairly conclusive that the Evironment.plist cannot expand a
$TEXT macro, but it seems you can simply overwrite PATH absolute. (But
not on my machine).
>
>
> *Note that you have to logout and login to make changes to the
> environment.plist file effective.*
Yes
>
>
> Currently I suspect that you have entries in your environment.plist
> file that change the path and make problems. Could you try to
> temporarily move that file away, e.g
> 1) cd ~
> 2) mv .MacOS .MacOS_tmp
> 3) logout
> 4) login
> 5) start QtCreator
>
This makes no difference whether the Environment.plist file is
present, renamed or totally deleted.
BUT
Since I developed and ran the Apple scripts, I can now launch
QtCreator without the script!!, and it is finding the System Qt and
qmake each time now with no problem.
Very puzzling. It could be that once Creator has found the System Qt,
it then stores the absolute path which is being used subsequently in
place of doing a getenv. Its all working now each time without the
additional PATH settings.
I guess the only way to re-produce what I have experienced is to
install the binary dmg on a machine with no developer code and no
Creator history, and certainly on a machine that does not have my PATH
issue!.
So thanks for your assistance, at least I am up and running now.
> Thanks,
More information about the Qt-creator-old
mailing list