21 #include <freerdp/utils/helpers.h>
23 #include <winpr/path.h>
24 #include <freerdp/version.h>
25 #include <freerdp/build-config.h>
27 #if defined(WITH_RESOURCE_VERSIONING)
31 char* freerdp_GetConfigFilePath(BOOL system,
const char* filename)
33 eKnownPathTypes
id = system ? KNOWN_PATH_SYSTEM_CONFIG_HOME : KNOWN_PATH_XDG_CONFIG_HOME;
35 #if defined(FREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR)
36 char* vendor = GetKnownSubPath(
id, FREERDP_VENDOR_STRING);
38 char* vendor = GetKnownPath(
id);
43 #if defined(WITH_RESOURCE_VERSIONING)
44 char* verstr = FREERDP_PRODUCT_STRING STR(FREERDP_VERSION_MAJOR);
46 char* verstr = FREERDP_PRODUCT_STRING;
49 char* base = GetCombinedPath(vendor, verstr);
58 char* path = GetCombinedPath(base, filename);