• 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: getting pkg path from installer plugin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting pkg path from installer plugin


  • Subject: Re: getting pkg path from installer plugin
  • From: Stéphane Sudre <email@hidden>
  • Date: Fri, 11 Jul 2008 00:12:31 +0200


On Jul 10, 2008, at 2:50 PM, Nethan Aryan wrote:
Hello All,
I have small problem and need your help.

In my installer plugIns, I want to know the installer path from where the installer got launched. Currently I am getting that using
[NSBundle bundleForClass:[self class]];


But the problem is: in case user runs the installer from .dmg file, the installer.app copies my plugins into a /tmp folder and then loads them, which means I am not getting the pkg path from which customer has actually launched the pkg installer. Can you suggest a way to get the actual installer pkg path within a Plugin?

- If you're looking for the path of Installer.app:

NSLog(@"%@",[[NSBundle bundleWithIdentifier:@"com.apple.installer"] bundlePath]); // This solution may depend on the LaunchServices cache

NSLog(@"%@",[[NSBundle bundleForClass:NSClassFromString (@"InstallerController")] bundlePath]); // This solution relies on implementation. Use at your own risk

- If you're looking for the path of your .pkg:

Depending at which step your plugin is displayed, you may:

1) Use an InstallationCheck script and save the $1 parameter into a tmp file.

2) Read this file from your plugin.

This solution may not work if the plugin is displayed before the Select Destination step.



_______________________________________________
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


References: 
 >getting pkg path from installer plugin (From: Nethan Aryan <email@hidden>)

  • Prev by Date: Re: PackageMaker: Postinstall with Components in XCode 3.0
  • Next by Date: Re: how to create the uninstaller on Mac Os
  • Previous by thread: Re: getting pkg path from installer plugin
  • Next by thread: sending info to postinstall script from plugin?
  • Index(es):
    • Date
    • Thread