For some code, shared between plugin and non-plugin projects, I want to get the file name of the process – in case it’s a plugin it should be the host process’ file name, in case it’s a standalone, it should be the name of that standalone’s file name.
From looking at the macOS and Windows implementation,
juce::File::getSpecialLocation (juce::File::hostApplicationPath) should do the job in both situations, but the docs only say
In a plugin, this will return the path of the host executable.
but say nothing about what happens if not called in a plugin. So, is this intentional, should I not rely on this function to work outside of a plugin? Otherwise, could the behaviour when not used in a plugin be documented?