MD5 Sum artifact

Hello everyone,

Sometimes you need to calculate the md5 amount of the artifact when running the plugin. For the windows solution, I have a similar code:

LPTSTR strDLLPath1 = new TCHAR[_MAX_PATH];
::GetModuleFileName((HINSTANCE)&__ImageBase, strDLLPath1, _MAX_PATH);
ss << “{\n “sum_artifact”: “” << md5.digestFile(strDLLPath1) << “”\n}”;
  1. Is there a ready-made solution in the framework?
  2. Is there a similar mac (means GetModuleFileName() - <= 10.9) for all macOS versions?

If you have any ideas, it would be nice to hear them… :thinking:

void PluginPath ( WDL_String & path ,
PluginIDType pExtra
)

Get the path to the plug-in binary.

Parameters

path WDL_String reference where the path will be put on success or empty string on failure
pExtra This should either be a const char* to

Get the path to the plug-in binary.

Parameters

|path|WDL_String reference where the path will be put on success or empty string on failure|

|pExtra|This should either be a const char* to bundleID (macOS) or an HMODULE handle (windows| or an HMODULE handle (windows|

bundleID (macOS) - How can I use bundleID (macOS) in c++ project?

What do you need the string you will pass to md5 to represent? At the moment it’s not clear what you’re trying to do overall - you want to hash/encode something related to the plugin, but does that need to be unique to the plugin only, or the install path, or something else?