Using vendor/product scheme for settings now.

This commit is contained in:
Armin Novak 2015-06-02 09:07:17 +02:00
parent d1223d3799
commit 8f68b9c261
3 changed files with 19 additions and 6 deletions

View File

@ -26,6 +26,10 @@ if(NOT DEFINED VENDOR)
set(VENDOR "FreeRDP" CACHE STRING "FreeRDP package vendor")
endif()
if(NOT DEFINED PRODUCT)
set(PRODUCT "FreeRDP" CACHE STRING "FreeRDP package name")
endif()
if(NOT DEFINED FREERDP_VENDOR)
set(FREERDP_VENDOR 1)
endif()
@ -284,8 +288,8 @@ if(WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWIN32_LEAN_AND_MEAN")
# Set product and vendor for dll and exe version information.
set(RC_VERSION_VENDOR "FreeRDP")
set(RC_VERSION_PRODUCT "FreeRDP")
set(RC_VERSION_VENDOR ${VENDOR})
set(RC_VERSION_PRODUCT ${PRODUCT})
set(RC_VERSION_PATCH ${BUILD_NUMBER})
set(RC_VERSION_DESCRIPTION ${GIT_REVISION})

View File

@ -14,6 +14,9 @@
#define CMAKE_SHARED_LIBRARY_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}"
#define CMAKE_SHARED_LIBRARY_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}"
#define FREERDP_VENDOR_STRING "${VENDOR}"
#define FREERDP_PRODUCT_STRING "${PRODUCT}"
/* Include files */
#cmakedefine HAVE_FCNTL_H
#cmakedefine HAVE_UNISTD_H

View File

@ -202,6 +202,7 @@ void settings_get_computer_name(rdpSettings* settings)
rdpSettings* freerdp_settings_new(DWORD flags)
{
char* base;
rdpSettings* settings;
settings = (rdpSettings*) calloc(1, sizeof(rdpSettings));
@ -471,7 +472,12 @@ rdpSettings* freerdp_settings_new(DWORD flags)
settings->HomePath = GetKnownPath(KNOWN_PATH_HOME);
if (!settings->HomePath)
goto out_fail;
settings->ConfigPath = GetKnownSubPath(KNOWN_PATH_XDG_CONFIG_HOME, "freerdp");
base = GetKnownSubPath(KNOWN_PATH_XDG_CONFIG_HOME,
FREERDP_VENDOR_STRING);
if (base)
settings->ConfigPath = GetCombinedPath(base, FREERDP_PRODUCT_STRING);
free (base);
if (!settings->ConfigPath)
goto out_fail;