Re: "First Run" installation of Application support stuff?
Re: "First Run" installation of Application support stuff?
- Subject: Re: "First Run" installation of Application support stuff?
- From: Rainer Brockerhoff <email@hidden>
- Date: Thu, 19 Dec 2002 12:16:13 -0200
>
From: "Peter Sichel" <email@hidden>
>
Date: Wed, 18 Dec 2002 16:18:18 -0500
>
>
My application requires a bunch of small supporting applets that must
>
be configured as SUID root in order for the application to work.
>
I use the "First Run" process to complete the installation by
>
configuring these applets.
I just concluded a similar application... which needs to configure network parameters, as I assume yours will also do. I concentrated everything into one small applet, though.
>
Date: Wed, 18 Dec 2002 16:31:54 -0800
>
From: "John C. Randolph" <email@hidden>
>
>
Leave them in the app wrapper. The Application Support directory is
>
for data, not executables.
If the app will never be executed from a CD or disk image, I'd agree with that... just setuid the applet inside the bundle itself. But in my case, I needed to be able to run from the CD. I didn't quite figure out how to produce a CD with the applets already setuid'd.
However, from a quick look at my Application Support folder, many applications _do_ store libraries and tools there... Adobe's and MindVision's, for instance. What would be a "blessed" multi-user place to store executables?
>
From: "Peter Sichel" <email@hidden>
>
Date: Wed, 18 Dec 2002 16:18:18 -0500
>
>
Question:
>
>
Should these applets remain inside the application bundle,
>
or be moved to "/library/Application Support/myApplication/..."
>
>
Notice leaving them inside the application bundle makes for
>
easy version control, install, and uninstall. The downside
>
is the need to modify the application bundle (will not work
>
from read only media), and the application bundle is not
>
easily copied from the Finder.
My strategy is as follows:
- I use the /Library/Application Support/myApplication/ folder since I need the applet accessible for all users. Were that not the case, any ~/Library subfolder would do, I think.
- I check if the applet is already there, check its size, if it's the same I compare it bit-for-bit with the original which is somewhere inside the app bundle. I store this in encrypted form so nobody can tamper with it.
- Only if the applet is outdated or corrupted, or if the permissions are not correct, I ask for the admin password and copy or fix everything.
>
Moving these pieces to "/library/Application Support/myApplication/..."
>
makes for a less intuitive uninstall since the user is unlikely to
>
know which pieces belong to the application and introduces the problem
>
of managing file versions. What if the user has reason to use or test
>
more than one version of the same application? How does the application
>
insure the correct version of its applets (plugins) are present without
>
conflicting with others? Especially since these applets are SUID root?
You could create the folder as /Library/Application Support/myApplication(versionN.N)/. This would isolate the versions from each other.
You could have an uninstall menu command in the application which would locate its applets and trash them (and perhaps itself :-)).
If the applets are small and harmless in isolation (I ensure this by encrypting their arguments), uninstalling them might be not an issue... for tidyness, they might even be invisible.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"I love deadlines. I love the whooshing noise they make as they go by" (Douglas Adams)
http://www.brockerhoff.net/ now with forums for XRay, Zingg! et al.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.