• 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: Moving oneself to /Applications (or ~/Applications)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving oneself to /Applications (or ~/Applications)


  • Subject: Re: Moving oneself to /Applications (or ~/Applications)
  • From: Tommy Nordgren <email@hidden>
  • Date: Tue, 24 Feb 2009 04:08:36 +0100


On Feb 24, 2009, at 3:34 AM, Shawn Erickson wrote:

On Mon, Feb 23, 2009 at 6:22 PM, Tommy Nordgren
<email@hidden> wrote:
The following code will test if you are running from the DMG:

NSString * volName = @"Mother";
NSString * appName = @"MyApp.app";

if ([[[NSBundle mainBundle] bundlePath] isEqualTo: [ NSString
stringWithFormat:@"/Volumes/%@/%@",volName,appName]) {

//Here you can show an alert telling the user to to copy the app to
the applications folder


}

If a disk image it mounted a second time (can happen in a few ways) it won't be at /Volumes/Mother/... but at /Volumes/Mounter 1/... Also you can mount disk images in location other then under /Volumes/...
It will be /Volumes/Mother 1/... I've tested.
This can be handled by using a regexp class for the matching instead of a simple
equality test.
Also, while it's possible to mount a disk image at other places than under Volumes,
that won't happen when doubleclicking a disk image or it being mounted from Safari
----------------------------------
The three things an undertaker should never say to a client:
-Nice doing business with you.
-Welcome back.
-Have a nice day. (The King of ID)
----------------------------------
Tommy Nordgren
email@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Moving oneself to /Applications (or ~/Applications)
      • From: Kyle Sluder <email@hidden>
References: 
 >Moving oneself to /Applications (or ~/Applications) (From: Ben Lachman <email@hidden>)
 >Re: Moving oneself to /Applications (or ~/Applications) (From: Tommy Nordgren <email@hidden>)
 >Re: Moving oneself to /Applications (or ~/Applications) (From: Alex Kac <email@hidden>)
 >Re: Moving oneself to /Applications (or ~/Applications) (From: Tommy Nordgren <email@hidden>)
 >Re: Moving oneself to /Applications (or ~/Applications) (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Moving oneself to /Applications (or ~/Applications)
  • Next by Date: Re: Moving oneself to /Applications (or ~/Applications)
  • Previous by thread: Re: Moving oneself to /Applications (or ~/Applications)
  • Next by thread: Re: Moving oneself to /Applications (or ~/Applications)
  • Index(es):
    • Date
    • Thread