Re: getting pkg path from installer plugin
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