Using vendor/product scheme for settings now.
This commit is contained in:
parent
d1223d3799
commit
8f68b9c261
@ -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})
|
||||
|
||||
|
@ -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
|
||||
|
@ -195,13 +195,14 @@ void settings_get_computer_name(rdpSettings* settings)
|
||||
|
||||
GetComputerNameExA(ComputerNameNetBIOS, NULL, &nSize);
|
||||
settings->ComputerName = (char*) malloc(nSize);
|
||||
if (!settings->ComputerName)
|
||||
return;
|
||||
if (!settings->ComputerName)
|
||||
return;
|
||||
GetComputerNameExA(ComputerNameNetBIOS, settings->ComputerName, &nSize);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -778,7 +784,7 @@ out_fail:
|
||||
void freerdp_settings_free(rdpSettings* settings)
|
||||
{
|
||||
if (!settings)
|
||||
return;
|
||||
return;
|
||||
free(settings->ServerHostname);
|
||||
free(settings->Username);
|
||||
free(settings->Password);
|
||||
|
Loading…
Reference in New Issue
Block a user