Skip to main content
Known Participant
June 8, 2009
Question

How to get the full path of the plug-in on Mac

  • June 8, 2009
  • 1 reply
  • 1533 views

I use SDK function "GetPluginFileSpecification" to get the full path of the plug-in .On Windows,I success(for example I get "C:\Adobe\plugin.aip"), On Mac , I only get the plug-in's name(for example"plugin.aip").If I want to get the full path of the plug-in on Mac,is there other function I can use ?

This topic has been closed for replies.

1 reply

Inspiring
June 8, 2009

You are almost there with GetPluginFileSpecification().  If you pass the returned SPPlatformFileSpecification structure straight to an ai::FilePath constructor, then use ai::FilePath::GetFullPath(), you will get the full path to your plugin:

SPPlatformFileSpecification platformFileSpec;
sSPPlugins->GetPluginFileSpecification(fPluginRef,&platformFileSpec);
ai::FilePath path(platformFileSpec);
std::cout << path.GetFullPath().as_Platform() << std::endl;

Known Participant
June 8, 2009

Thanks for your help,it works good.

Best Regards

Jason Yang