1

I am trying to create an installer for Mac OSX using "PackageMaker".

My problem is that before installing my application, I need to install the FTDI drivers. In order to do this pre-installation, I downloaded the package and I included into the contents list but I don't know the best way to run this installer.

I thought about copy the installer into a tmp folder and use a terminal command like:

installer -pkg "/Volumes/AppleJack-1.4.3/AppleJack Distribution.mpkg" -target /

But the SUDO rights are required.

How can I install this driver from my installer?

I have a second question about a "processor architecture" : The driver to install is different between x86 and x64.

How can I do this check to run the appropriate driver installer?

Thanks

sdespont
  • 13,915
  • 9
  • 56
  • 97

1 Answers1

1

To your first issue, typically you would add all the required sub-packages to your main package in PackageMaker. It should only install the ones that are required. If they need admin privileges to install, you just select "Require Admin authentication" for that package in its Configuration pane. You can, if you like, set a package location to an URL.

To your second question, if this is a kext, those are generally bundled as universal binaries. I'd start by asking the vendor to package them appropriately so that you don't need to maintain separate packages. But they may not do it. In that case, you can bundle both packages into your mpkg and mark the requirement as "64-bit instructions available == true" for one and "false" for the other. On failure, disable that package.

Rob Napier
  • 286,113
  • 34
  • 456
  • 610
  • Rob, thanks for your answer. I found this afternoon the "64-bit instructions available" in the requirements tab but my 64 bits MAC computer [Intel Core 2 Duo](http://support.apple.com/kb/HT3696) doesn't return "true" neither "false" but something < "false" ?! – sdespont Apr 03 '12 at 17:45
  • And about the second part of your answer, if I include my driver as a sub-package, it will only be copied in the final application folder, but not executed. I thought about copy the driver installer into my application folder and run a post-install script with command 'open -n /Applications/MyApp/FTDI/FTDIUSBSerialDriver_10_4_10_5_10_6_10_7_x64.mpkg'. What do you think about that? Thanks you very much – sdespont Apr 03 '12 at 17:48
  • Have you considered doing the install on first launch rather than in a package installer? If this is the only thing you need a package installer for, you could get rid of that whole thing and be left with a simpler drag-and-drop install. – Rob Napier Apr 03 '12 at 18:18
  • Thanks for this good input. But I am still facing of the installer choice to run between x86 and x64. Or perhaps using a shell command to determine the processor architecture like "uname -m"? I am going to dig deeper to understand why the "64-bit instructions available" not return true in my case. – sdespont Apr 03 '12 at 18:58
  • It's possible you're running a 32-bit OS on a 64-bit processor. – Rob Napier Apr 03 '12 at 19:22
  • Good idea, but my computer is a MacBook Air (late 2010), Lion OS with Intel Core 2 Duo processor. Definitely 64 bit. – sdespont Apr 03 '12 at 20:17