creating an installer that seamlessly handles drivers

Discussion in 'Mac Programming' started by markmacrumors, Jun 17, 2009.

  1. markmacrumors macrumors newbie

    Jun 17, 2009
    I've been tasked with creating a new installer for our product. We've been using Vise X to create our installers up to now but want to have something less installer-like and more "Mac user-friendly" going forward. We need to support 10.4 and beyond.

    We like the drag-and-drop installation workflow of Firefox. You double-click on the Firefox .dmg file. A folder opens up containing the Firefox .app file and a link to the Applications folder. The user drags the Firefox .app file to the Applications folder link. Voila', Firefox is "installed".

    The problem is that in our case we need to install some .kext drivers into the user's system in order for our application to run.

    One way we've thought of doing this is the .app file we give to our users will be our application's installer. We'll call it for this discussion. The user double-clicks on in the Applications folder to open it up. Instead of displaying installer dialogs, our installer will attempt to silently install the drivers. If it needs to, it can pop up a login dialog to get admin permission to do this driver installation.

    Next steps:

    1. The installer will extract our real application file from itself.
    2. The installer will spawn a script that will kill the installer.
    3. The script will replace the installer file with, so now is our real app.
    4. The script will run to bring up our application.
    5. Then the script terminates.

    The user is left with our real in the Applications folder, our drivers are installed, and our application is up and running.

    We haven't thought how we'd handle updates and uninstalls yet.


    1. Has anyone done this before? Is this doable?
    2. I've started investigating PackageMaker. Is this doable with PackageMaker?
    3. Is there an easier way of getting the same sort of workflow feel that we're trying to achieve?
    4. How do other applications install their drivers? Do they do something like this or do they use a regular installer?
    5. We've heard that Mac users don't like installers, so we're trying to make this as invisible as possible. Is our approach above overkill? :)

    Thanks for any input!
  2. larkost macrumors 6502a

    Oct 13, 2007
    First off I really have to congratulate you for moving away from VISE. It is the worst of all worlds for installers.

    But since you have a kext to install, and are probably going to need to reboot to make sure that the kext is properly in place after the install (since you could be re-installing over an active one, or be upgrading, and unloading kexts can be rather tricky to make sure you get everything right every time), so I am going to recommend that you go with a .pkg instal (what PackageMaker produces). Don't try and over think things. Just do a normal install without trying to script anything (scripting things will just get you into trouble because installers can be used in so many odd environments that you are not going to be able to predict).

    You are correct that it is far better to not have an installer, but in the case of a kext instal it is the right way (using a .pkg). Using PackageMaker is relatively easy, but make sure you are using version 3.0.3 or higher (previos versions in the 3 series were really buggy), or Iceberg.

    Oh, and if you are looking for professional consulting on this (or to our-source it) I am looking for a few gigs to tide me over to the next position.

Share This Page