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

2009-03-04 Thread Jeremy Pereira
If you really want to test whether an application is running from the distribution dmg, I would have thought the easiest way is to put a hidden file on the dmg in the same directory as the application bundle and merely test for the existence of that hidden file at start up. On 24 Feb

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

2009-03-04 Thread Sean McBride
On 3/4/09 11:37 AM, Jeremy Pereira said: If you really want to test whether an application is running from the distribution dmg, I would have thought the easiest way is to put a hidden file on the dmg in the same directory as the application bundle and merely test for the existence of that hidden

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

2009-02-24 Thread Rainer Brockerhoff
At 03:06 -0800 24/02/09, cocoa-dev-requ...@lists.apple.com wrote: From: Tommy Nordgren tommy.nordg...@comhem.se References: 67c1da73-c3cb-4854-9b46-70c0365d5...@mac.com 57b2a86d-b87c-486f-8d2e-6291d3f29...@comhem.se 4b898f01-2234-4d19-8b63-25f4cd275...@webis.net

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

2009-02-24 Thread Michael Ash
On Tue, Feb 24, 2009 at 12:34 AM, Tommy Nordgren tommy.nordg...@comhem.se wrote: On Feb 24, 2009, at 3:34 AM, Shawn Erickson wrote: On Mon, Feb 23, 2009 at 6:22 PM, Tommy Nordgren tommy.nordg...@comhem.se wrote: The following code will test if you are running from the DMG: NSString *

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

2009-02-23 Thread Paul Kim
If I had been paying more attention, I could've intervened sooner. http://www.nightproductions.net/blog/2007/05/25/introducing-polish-a-new-framework/ Framework to do what the OP asked. My blog article, which prompted the whole thing, is linked from that page. You can see the comments there

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

2009-02-23 Thread Tommy Nordgren
On Feb 18, 2009, at 7:28 AM, Ben Lachman wrote: Hi all: I'm wanting to move away from DMGs to ZIP delivery. As part of this move I'd like to have my app, SousChef, prompt the user on first run to move itself to /Applications (or ~/Applications as appropriate). In a short search I

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

2009-02-23 Thread Alex Kac
Let me give you an example why I disagree with the advice. Yes, well written applications can run from anywhere and all apps should! However its a user experience issue. Not everyone wants to write a pkg installer for a variety of reasons. So first here is a story. I have a friend I

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

2009-02-23 Thread Joseph Crawford
I am not that experienced as a Mac Developer but I can give my thoughts as a switcher. When I first switched over to OS X a few years ago I thought it was odd that an application did not *need* to be installed rather copied to the Applications folder. It was obvious to me that I needed

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

2009-02-23 Thread Paul Sanders
CrossOver Mac (from CodeWeavers) has a nice solution to the problem of users forgetting where they have put their applications. When the DMG is mounted, they pop up a box as shown here: http://www.alpinesoft.co.uk/forum_images/crossover_installer.png Problem solved? - assuming you know how to

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

2009-02-23 Thread Tommy Nordgren
Actually there is an easy way to find the apps runtime path: [[NSBundle mainBundle] bundlePath] You can extract the info from the returned string. On Feb 24, 2009, at 1:04 AM, Alex Kac wrote: Let me give you an example why I disagree with the advice. Yes, well written applications can run

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

2009-02-23 Thread Ken Thomases
On Feb 23, 2009, at 6:30 PM, Paul Sanders wrote: CrossOver Mac (from CodeWeavers) has a nice solution to the problem of users forgetting where they have put their applications. When the DMG is mounted, they pop up a box as shown here:

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

2009-02-23 Thread Nick Zitzmann
On Feb 23, 2009, at 5:51 PM, Ken Thomases wrote: A number of Mac apps are delivered in disk images configured that way. Firefox has already been mentioned. As I recall, we were also inspired by the disk image for Bare Bones' TextWrangler http://www.barebones.com/products/textwrangler/ .

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

2009-02-23 Thread Tommy Nordgren
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

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

2009-02-23 Thread Shawn Erickson
On Mon, Feb 23, 2009 at 6:22 PM, Tommy Nordgren tommy.nordg...@comhem.se 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

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

2009-02-23 Thread Tommy Nordgren
On Feb 24, 2009, at 3:34 AM, Shawn Erickson wrote: On Mon, Feb 23, 2009 at 6:22 PM, Tommy Nordgren tommy.nordg...@comhem.se wrote: The following code will test if you are running from the DMG: NSString * volName = @Mother; NSString * appName = @MyApp.app; if ([[[NSBundle mainBundle]

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

2009-02-23 Thread Charles Srstka
On Feb 23, 2009, at 6:30 PM, Paul Sanders wrote: CrossOver Mac (from CodeWeavers) has a nice solution to the problem of users forgetting where they have put their applications. When the DMG is mounted, they pop up a box as shown here:

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

2009-02-23 Thread Kyle Sluder
On Mon, Feb 23, 2009 at 10:08 PM, Tommy Nordgren tommy.nordg...@comhem.se wrote:        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

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

2009-02-23 Thread Tommy Nordgren
On Feb 24, 2009, at 4:53 AM, Kyle Sluder wrote: 5) Not just using the system-provided facilities to ask the direct question (Is the volume on which this app's bundle resides removable?) but relying on aforementioned assumptions to ask an indirect question (Does the path of the bundle of this

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

2009-02-23 Thread Tommy Nordgren
On Feb 24, 2009, at 3:34 AM, Shawn Erickson wrote: On Mon, Feb 23, 2009 at 6:22 PM, Tommy Nordgren tommy.nordg...@comhem.se wrote: The following code will test if you are running from the DMG: NSString * volName = @Mother; NSString * appName = @MyApp.app; if ([[[NSBundle mainBundle]

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

2009-02-22 Thread Ben Lachman
Perhaps the issue is that you are assuming an offer to do something is subtle way of telling you where to put your stuff. In reality it isn't. It's purely offering a short cut/automation if you'd like it. Say no, and it would never ask you again. But anyway, this is getting quite off

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

2009-02-22 Thread Kyle Sluder
On Sun, Feb 22, 2009 at 10:49 PM, Ben Lachman blach...@mac.com wrote: The original question stands, does anyone have code that would be helpful in implementing such a feature? To be fair, the original question was indeed answered by Nick Zitzmann at the very outset: you can't move a running

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

2009-02-22 Thread Adam Leonard
Hi, So yes, as people mentioned you shouldn't move an application while it is running, so the solution is obviously to move it when it is not running. You will need a little tool that you launch with NSTask that does the move for you. As you noted, Sparkle does everything you want,

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

2009-02-22 Thread Charles Srstka
On Feb 21, 2009, at 2:46 PM, Nick Zitzmann wrote: Looks like the documentation writers changed their minds about this: http://developer.apple.com/documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/chapter_1_section_1.html It used to say there that installation

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

2009-02-22 Thread Benjamin Dobson
On 23 Feb 2009, at 05:47:22, Adam Leonard wrote: (If you want another opinion, I don't think what you are doing is a bad idea. John Gruber made a point in a recent article (http://daringfireball.net/2009/02/untitled_document_syndrome ) that most users don't want to mess with the file system

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

2009-02-21 Thread Jeff Johnson
Ben, With all due respect, it's not your job to organize your users' virtual desktop, any more than it is to organize their real desktop, both of which may be cluttered. Some people put everything in its place, others leave stuff lying around, that's just a fact of life. In time, novice

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

2009-02-21 Thread Alex Kac
That may be true - but many people would be overjoyed if an app would offer to install itself into an appropriate place. Sometimes people are cluttered because they don't have someone to help. If an app offered to help - just once - I don't see that as an intrusion, but a more Mac-like

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

2009-02-21 Thread Andreas Mayer
Am 21.02.2009 um 17:33 Uhr schrieb Alex Kac: If an app offered to help - just once - I don't see that as an intrusion, but a more Mac-like feature. Its not intrusive. I disagree. It's not an applications job to tell me where to put it. If, for some reason, it *must* be put in

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

2009-02-21 Thread Gregory Weston
Alex Kac wrote: That may be true - but many people would be overjoyed if an app would offer to install itself into an appropriate place. Sometimes people are cluttered because they don't have someone to help. If an app offered to help - just once - I don't see that as an intrusion, but a more

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

2009-02-21 Thread Kevin Walzer
Gregory Weston wrote: To which I reiterate my prior comment: For more than a year now, Apple has been recommending the use of installer packages for all deployments. Apple is recommending installer packages instead of drag-and-drop installation of app bundles? Since when? Can you point to

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

2009-02-21 Thread Nick Zitzmann
On Feb 21, 2009, at 1:15 PM, Kevin Walzer wrote: Apple is recommending installer packages instead of drag-and-drop installation of app bundles? Since when? Can you point to any docs about this? Looks like the documentation writers changed their minds about this:

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

2009-02-21 Thread Alex Kac
Of course if you go with the OP's idea - then its almost like an installer pkg, but in a DD install method. On Feb 21, 2009, at 2:46 PM, Nick Zitzmann wrote: It's a double-edged sword anyway. DnD installs are popular with Mac and NeXT veterans who are used to them, but they tend to confuse

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

2009-02-21 Thread Gregory Weston
On Feb 21, 2009, at 3:15 PM, Kevin Walzer wrote: Gregory Weston wrote: To which I reiterate my prior comment: For more than a year now, Apple has been recommending the use of installer packages for all deployments. Apple is recommending installer packages instead of drag-and-drop

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

2009-02-21 Thread Andreas Mayer
Am 21.02.2009 um 22:23 Uhr schrieb Alex Kac: Of course if you go with the OP's idea - then its almost like an installer pkg, but in a DD install method. I still don't like it. And if every application did that, each one would do it slightly differently which is *not* a Mac like

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

2009-02-20 Thread Ben Lachman
(Sorry lost track of this post... meant to follow up more quickly) All I want to do is offer to move the app for the user, once. I have no problem with anyone running the app from anywhere they'd like. However, if you've ever looked at a novice user's computer you'll notice that they

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

2009-02-18 Thread Kyle Sluder
On Wed, Feb 18, 2009 at 1:52 AM, Jeff Johnson publicpost...@lapcatsoftware.com wrote: That's an odd request, because doesn't it make more sense to install to /Applications if the app is running from /Volumes/MyDMG rather than from ~/Downloads? :-) Indeed, one of the reasons to switch from dmg

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

2009-02-18 Thread Gregory Weston
Ben Lachman wrote: I'm wanting to move away from DMGs to ZIP delivery. As part of this move I'd like to have my app, SousChef, prompt the user on first run to move itself to /Applications (or ~/Applications as appropriate). In a short search I can't find any code examples hanging about to do

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

2009-02-18 Thread Jeff Johnson
On Feb 18, 2009, at 3:16 AM, Kyle Sluder wrote: On Wed, Feb 18, 2009 at 1:52 AM, Jeff Johnson publicpost...@lapcatsoftware.com wrote: That's an odd request, because doesn't it make more sense to install to /Applications if the app is running from /Volumes/MyDMG rather than from

Moving oneself to /Applications (or ~/Applications)

2009-02-17 Thread Ben Lachman
Hi all: I'm wanting to move away from DMGs to ZIP delivery. As part of this move I'd like to have my app, SousChef, prompt the user on first run to move itself to /Applications (or ~/Applications as appropriate). In a short search I can't find any code examples hanging about to do

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

2009-02-17 Thread Jeff Johnson
Ben, That's an odd request, because doesn't it make more sense to install to /Applications if the app is running from /Volumes/MyDMG rather than from ~/Downloads? :-) Indeed, one of the reasons to switch from dmg to zip distribution is that the app disappears when the dmg is unmounted.