c++: Determining a Plugin's filename and resource directory?
Posted: Mon Aug 24, 2009 22:16
Is there a way to determine the path of a plugin?
For example, if i have a plugin located in some unknown path:
unknownpath/resolume/plugins/vfx/unknownpath/myplugin.bundle
or
unknownpath/resolume/plugins/vfx/unknownpath/myplugin.dll
is there a way to find that out from within the plugin. Unfortunately calls to standard C++ directory listing functions give the path that the resolume was started from. Not the path of the plugin.
I am looking for some sort of magic function
std:string path = WhatIsMyPluginCurrentFilenameAndPath();
The reason I need this, is that I would like to write a plugin for resolume that can load resources from the directory it was installed in. On the mac, that could be inside the recourse bundle of the plugin. On the pc, that would be the directory the DLL is installed in. Has anyone been able to achive this?
For example, if i have a plugin located in some unknown path:
unknownpath/resolume/plugins/vfx/unknownpath/myplugin.bundle
or
unknownpath/resolume/plugins/vfx/unknownpath/myplugin.dll
is there a way to find that out from within the plugin. Unfortunately calls to standard C++ directory listing functions give the path that the resolume was started from. Not the path of the plugin.
I am looking for some sort of magic function
std:string path = WhatIsMyPluginCurrentFilenameAndPath();
The reason I need this, is that I would like to write a plugin for resolume that can load resources from the directory it was installed in. On the mac, that could be inside the recourse bundle of the plugin. On the pc, that would be the directory the DLL is installed in. Has anyone been able to achive this?