-1

My application depends on another third-party framework and I need to make sure the framework is installed before my application runs. I am using AppleScript to check whether the framework is installed or not. I am packaging my application using PackageMaker.

How do I package the other framework's pkg file in my PackageMaker project and run my AppleScript if the package is not already installed?

Thanks

Note: the pkg file along with adding the framework adds some other stuff to the Applications folder too. So I need to run the pkg file rather than just get the framework in my app's resources

lostInTransit
  • 70,519
  • 61
  • 198
  • 274

1 Answers1

0

Don't try installing the framework in the system - it's better to keep a copy in your application bundle.

To use the 3rd party framework, drag in Xcode -> Frameworks -> Linked Frameworks.

Then create a "Copy Files" phase under the targets to have your 3rd party framework copied onto Contents/Frameworks within your application bundle.

For more details and a step-by-step example, check out Sparkle framework's documentation

ColdFire
  • 6,764
  • 6
  • 35
  • 51
diciu
  • 29,133
  • 4
  • 51
  • 68
  • This method only works if the Framework's installation path (a build setting) is @loader_path/../Frameworks or @executable_path/../Frameworks or uses the @rpath directive with an appropriate rpath for the app. 3rd party frameworks would have to be modified with otool if they are not this way. – Barry Wark Dec 24 '08 at 20:09
  • Thanks diciu. The problem here is I need to run the pkg file for the 3rd-party framework as it installs some other stuff on the mac too. So copying the framework into the project files is not a option. Thanks anyways. – lostInTransit Jan 10 '09 at 08:42