• 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 a single product will install to different locations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how a single product will install to different locations


  • Subject: Re: how a single product will install to different locations
  • From: Bill Coderre <email@hidden>
  • Date: Tue, 1 Jul 2008 13:35:08 -0700


On Jul 1, 2008, at 11:06 AM, Sandeep Dhama wrote:
I need to create a installer in which a single product will support many choices for where it should be installed. For example i have a adobe after effects that will install multiple destination locations. I have created a installer plugin that will ask different destination locations from user at the time of installation. But i do not know how to install the product to these different destination location. So please tell me how to do this?.

Here is one way to do it, BUT it's ugly, and could have security issues, and I hope there's a better way to do it:
0) Require ROOT authorization to install.
1) In the InstallerPlugin, get a location, and write it to file /tmp/ com.Company.Product.pkg.LOCATIONTOINSTALL
2) In the installer preflight, delete directory /tmp/ com.Company.Product.pkg.HOLDINGTANK and create it securely with "700" permissions and owned by ROOT.
3) Have the installer write its payload into /tmp/ com.Company.Product.pkg.HOLDINGTANK
4) During postflight, read /tmp/ com.Company.Product.pkg.LOCATIONTOINSTALL and CHECK TO MAKE SURE IT'S SANE!!!
5) Assuming so, "mv" or "ditto" /tmp/ com.Company.Product.pkg.HOLDINGTANK to the desired location. (If you are updating an existing installation, however, this might not be 100% correct. You might have to ditto and then rm a bunch of leftover crud. Installer.app has a lot more finesse.)


NOTE that even though the above lists some security precautions, it still might be insecure (I am not a security expert, and I cannot guarantee my work to you). Why is that important? Well, if a user on the machine knows this install is coming along tomorrow, and can read the scripts and is malicious, they could replace the contents of tmp/ com.Company.Product.pkg.LOCATIONTOINSTALL with, for instance, "/ kernel" and make the machine unbootable.

Or worse.

That's one reason why this is a bad idea. The other is that you're ignoring the usual Mac user experience conventions for installation. Mac users don't expect installation to be a huge ordeal involving many many choices.

(Not only Mac -- my pal Robert Reimann and his mentor Alan Cooper formulated a bunch of design principles, such as "Considerate products don't burden you with their problems" and "Considerate products don't ask a lot of questions" and "Considerate products use common sense." There's also the meta-principle, "Decide who your target audience is (hopefully 90% of your users), and design for them."

These principles come from a book called "About Face," which is now in its third complete rewrite, which is unprecedented for a computer book. Then again, as far as I am concerned, "Strunk and White" is the "About Face" of how to write to-the-point-yet-expressive English. Alan Cooper "designed" Visual Basic, one of Microsoft's most rabidly-loved products ever.

In his first version of "About Face" though, he called Microsoft installers "Klingon Interrogation Mode" because you'd start an install and then BOOM question after question would appear, like "What's your IP address?" You have a good idea that if you answer the question incorrectly, your machine will be broken. You COULD go look up the answer, except that you are stuck in INSTALL MODE and can't go look things up. And finally, the installer program is just plain dumb, because it could look up the IP address itself and not even ask you.

After a decade of writing installers, I have come to the conclusion that the best installer is the one that works as quickly and quietly as possible. No one WANTS to install software. They want to USE software. Your installer is an OBSTACLE. Make it as small and pleasant as possible.)

In your case: Why should you burden all of your users with customization questions if most of them just want the defaults?

So, perhaps a better question is, "what exactly do you want your installer to accomplish, overall?" You've posted a whole bunch of questions recently, all of them are obviously trying to accomplish one bigger goal, what is that?

What, in total, are you trying to install, and why must so many things be customizable?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: how a single product will install to different locations
      • From: Paul Miller <email@hidden>
References: 
 >Fw: how a single product will install to different locations (From: "Sandeep Dhama" <email@hidden>)

  • Prev by Date: Re: silent sub-launch of dependent package during install?
  • Next by Date: Re: how a single product will install to different locations
  • Previous by thread: Fw: how a single product will install to different locations
  • Next by thread: Re: how a single product will install to different locations
  • Index(es):
    • Date
    • Thread