• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I move my running app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • [SOLVED] How do I move my running app?
      • From: "Alan Smith" <email@hidden>
References: 
 >How do I move my running app? (From: "Alan Smith" <email@hidden>)
 >Re: How do I move my running app? (From: Satoshi Matsumoto <email@hidden>)
 >Re: How do I move my running app? (From: "Alan Smith" <email@hidden>)
 >Re: How do I move my running app? (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Changing file & directory names
  • Next by Date: Reading mail accounts with out Mail.app launching
  • Previous by thread: Re: How do I move my running app?
  • Next by thread: [SOLVED] How do I move my running app?
  • Index(es):
    • Date
    • Thread