Common paths useful for plug-ins.
More...
Go to the source code of this file.
|
void | HostPath (WDL_String &path, const char *bundleID=0) |
| Get the path to the host binary. More...
|
|
void | PluginPath (WDL_String &path, PluginIDType pExtra) |
| Get the path to the plug-in binary. More...
|
|
void | BundleResourcePath (WDL_String &path, PluginIDType pExtra=0) |
| Get the path to the plug-in bundle resource path. More...
|
|
void | DesktopPath (WDL_String &path) |
|
void | UserHomePath (WDL_String &path) |
|
void | AppSupportPath (WDL_String &path, bool isSystem=false) |
|
void | VST3PresetsPath (WDL_String &path, const char *mfrName, const char *pluginName, bool isSystem=true) |
|
void | INIPath (WDL_String &path, const char *pluginName) |
| Get the path to the folder where the App's settings.ini file is stored. More...
|
|
void | WebViewCachePath (WDL_String &path) |
| Get the path to the folder where the Plug-in's ICoreWebView2 userdata folder should be (Windows WebView only)
|
|
EResourceLocation | LocateResource (const char *fileNameOrResID, const char *type, WDL_String &result, const char *bundleID, void *pHInstance, const char *sharedResourcesSubPath) |
| Find the absolute path of a resource based on it's file name (e.g. More...
|
|
const void * | LoadWinResource (const char *resID, const char *type, int &sizeInBytes, void *pHInstance) |
| Load a resource from the binary (windows only). More...
|
|
Common paths useful for plug-ins.
Definition in file IPlugPaths.h.
◆ PluginIDType
using PluginIDType = void * |
◆ AppSupportPath()
void AppSupportPath |
( |
WDL_String & |
path, |
|
|
bool |
isSystem = false |
|
) |
| |
- Parameters
-
path | WDL_String reference where the path will be put on success or empty string on failure |
isSystem | Set true if you want to obtain the system-wide path, otherwise the path will be in the user's home folder |
◆ BundleResourcePath()
void BundleResourcePath |
( |
WDL_String & |
path, |
|
|
PluginIDType |
pExtra = 0 |
|
) |
| |
Get the path to the plug-in bundle resource path.
On macOS and iOS if this is called in an AUv3 app extension it will return the bundle of the parent app iOS bundles are flat, so the path is just to the .app where as macOS bundles contain a resources subfolder On Windows this is only useful for VST3 plug-ins which have a "bundle" with a resource path since v3.6
- 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/iOS) or an HMODULE handle (windows) |
◆ DesktopPath()
void DesktopPath |
( |
WDL_String & |
path | ) |
|
- Parameters
-
path | WDL_String reference where the path will be put on success or empty string on failure |
◆ HostPath()
void HostPath |
( |
WDL_String & |
path, |
|
|
const char * |
bundleID = 0 |
|
) |
| |
Get the path to the host binary.
- Parameters
-
path | WDL_String reference where the path will be put on success or empty string on failure |
◆ INIPath()
void INIPath |
( |
WDL_String & |
path, |
|
|
const char * |
pluginName |
|
) |
| |
Get the path to the folder where the App's settings.ini file is stored.
- Parameters
-
path | WDL_String reference where the path will be put on success or empty string on failure |
pluginName | CString to specify the plug-in name (BUNDLE_NAME from config.h can be used here) |
◆ LoadWinResource()
const void * LoadWinResource |
( |
const char * |
resID, |
|
|
const char * |
type, |
|
|
int & |
sizeInBytes, |
|
|
void * |
pHInstance |
|
) |
| |
◆ LocateResource()
EResourceLocation LocateResource |
( |
const char * |
fileNameOrResID, |
|
|
const char * |
type, |
|
|
WDL_String & |
result, |
|
|
const char * |
bundleID, |
|
|
void * |
pHInstance, |
|
|
const char * |
sharedResourcesSubPath |
|
) |
| |
Find the absolute path of a resource based on it's file name (e.g.
“background.png”) and type (e.g. “png”), or in the case of windows, confirm the existence of a particular resource in the binary. If it fails to find the resource with the binary it will test the fileNameOrResID argument as an absolute path, to see if the file exists in that place. On macOS resources are usually included inside the bundle resources folder. On Windows resources are usually baked into the binary via the resource compiler. In this case the fileName argument is the resource id to look for. The .rc file must include these ids, otherwise you may hit a runtime assertion when you come to load the file. In some cases you may want to provide an absolute path to a file in a shared resources folder here (for example if you want to reduce the disk footprint of multiple bundles, such as when you have multiple plug-in formats installed).
- Parameters
-
fileNameOrResID | The filename or resourceID including extension. If no resource is found this argument is tested as an absolute path. |
type | The resource type (file extension) in lower or upper case, e.g. ttf or TTF for a truetype font |
result | WDL_String which will either contain the full path to the resource on disk, or the full Windows resourceID on success |
- Returns
true
on success
Referenced by IGraphics::LoadResource(), and IGraphics::SearchImageResource().
◆ PluginPath()
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 bundleID (macOS) or an HMODULE handle (windows) |
◆ UserHomePath()
void UserHomePath |
( |
WDL_String & |
path | ) |
|
- Parameters
-
path | WDL_String reference where the path will be put on success or empty string on failure |
◆ VST3PresetsPath()
void VST3PresetsPath |
( |
WDL_String & |
path, |
|
|
const char * |
mfrName, |
|
|
const char * |
pluginName, |
|
|
bool |
isSystem = true |
|
) |
| |
- Parameters
-
path | WDL_String reference where the path will be put on success or empty string on failure |
mfrName | CString to specify the manufacturer name, which will be the top level folder for .vstpreset files for this manufacturer's product |
pluginName | CString to specify the plug-in name, which will be the sub folder (beneath mfrName) in which the .vstpreset files are located |
isSystem | Set true if you want to obtain the system-wide path, otherwise the path will be in the user's home folder |