Re: How do I move my running app?
Re: How do I move my running app?
- Subject: Re: How do I move my running app?
- From: Andrew Farmer <email@hidden>
- Date: Tue, 4 Jul 2006 18:54:51 -0700
On 04 Jul 06, at 17:59, Uli Kusterer wrote:
Am 04.07.2006 um 16:58 schrieb Alan Smith:
setenv("OLD_LAUNCH_PATH", [[[NSBundle mainBundle] bundlePath]
UTF8String], 1);
setenv("NEW_LAUNCH_PATH", [@"/Users/EV Manager.app"
UTF8String], 2);
system("/bin/bash -c '{ for (( i = 0; i < 3000 && $(echo $(/bin/ps
-xp $PPID|/usr/bin/wc -l))-1; i++ )); do\n"
" /bin/sleep .2;\n"
" done\n"
" mv \"${OLD_LAUNCH_PATH}\" \"${NEW_LAUNCH_PATH}\"\n"
" if [[ $(/bin/ps -xp $PPID|/usr/bin/wc -l) -ne 2 ]];
then\n"
" /usr/bin/open \"${NEW_LAUNCH_PATH}\"\n"
" fi\n"
"} &>/dev/null &'");
[[NSApplication sharedApplication] terminate:self];
So, what happens when the folder the app is in has a name that
contains the quote character? In this case, I'd really suggest
using Carbon's FSMoveObject and Launch Services instead.
And/or a helper app.
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden