0

I have created an installer plugin which would show a pane while installing the pkg file from a GUI. I need to know the location of the executable of the installerplugin run when the installation takes place, so that I could access a file relative to that path. The NSProcessInfo class is of no help as the process it refers to is the installer.app. Is there some way to find out?

sraok
  • 595
  • 6
  • 23

1 Answers1

1

I found out the way. We can use the NSBundle Class to locate the bundle by:

NSBundle* iPlugin = [NSBundle bundleForClass:[MyInstallerPlugin class]];

and then using

[iPlugin bundlePath ];

we can find the absolute path of the root of the bundle.

robert
  • 33,242
  • 8
  • 53
  • 74
sraok
  • 595
  • 6
  • 23