Added rail workdir parameter
authorArmin Novak <armin.novak@thincast.com>
Wed, 22 May 2019 14:36:40 +0000 (16:36 +0200)
committerArmin Novak <armin.novak@thincast.com>
Wed, 22 May 2019 14:37:47 +0000 (16:37 +0200)
client/common/cmdline.c
client/common/cmdline.h
include/freerdp/settings.h
libfreerdp/common/settings_getters.c
libfreerdp/core/test/settings_property_lists.h

index 0bca7a5..4726e85 100644 (file)
@@ -2172,6 +2172,11 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
                        settings->DisableWallpaper = TRUE;
                        settings->DisableFullWindowDrag = TRUE;
                }
+               CommandLineSwitchCase(arg, "app-workdir")
+               {
+                       if (!copy_value(arg->Value, &settings->RemoteApplicationWorkingDir))
+                               return COMMAND_LINE_ERROR_MEMORY;
+               }
                CommandLineSwitchCase(arg, "load-balance-info")
                {
                        if (!copy_value(arg->Value, (char**)&settings->LoadBalanceInfo))
index 321a5e5..7e2ee8d 100644 (file)
@@ -34,6 +34,7 @@ static COMMAND_LINE_ARGUMENT_A args[] =
        { "app-guid", COMMAND_LINE_VALUE_REQUIRED, "<app-guid>", NULL, NULL, -1, NULL, "Remote application GUID" },
        { "app-icon", COMMAND_LINE_VALUE_REQUIRED, "<icon-path>", NULL, NULL, -1, NULL, "Remote application icon for user interface" },
        { "app-name", COMMAND_LINE_VALUE_REQUIRED, "<app-name>", NULL, NULL, -1, NULL, "Remote application name for user interface" },
+       { "app-workdir", COMMAND_LINE_VALUE_REQUIRED, "<workspace path>", NULL, NULL, -1, NULL, "Remote application workspace path" },
        { "assistance", COMMAND_LINE_VALUE_REQUIRED, "<password>", NULL, NULL, -1, NULL, "Remote assistance password" },
        { "async-channels", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Asynchronous channels (experimental)" },
        { "async-input", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Asynchronous input" },
index 4841b10..9104561 100644 (file)
@@ -768,6 +768,7 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
 #define FreeRDP_RemoteWndSupportLevel                              (2125)
 #define FreeRDP_RemoteApplicationSupportLevel                      (2126)
 #define FreeRDP_RemoteApplicationSupportMask                       (2127)
+#define FreeRDP_RemoteApplicationWorkingDir                        (2128)
 #define FreeRDP_ReceivedCapabilities                               (2240)
 #define FreeRDP_ReceivedCapabilitiesSize                           (2241)
 #define FreeRDP_OsMajorType                                        (2304)
@@ -1268,7 +1269,8 @@ struct rdp_settings
        ALIGN64 UINT32 RemoteWndSupportLevel;             /* 2125 */
        ALIGN64 UINT32 RemoteApplicationSupportLevel;     /* 2126 */
        ALIGN64 UINT32 RemoteApplicationSupportMask;      /* 2127 */
-       UINT64 padding2176[2176 - 2128]; /* 2128 */
+       ALIGN64 char*  RemoteApplicationWorkingDir;       /* 2128 */
+       UINT64 padding2176[2176 - 2129]; /* 2129 */
        UINT64 padding2240[2240 - 2176]; /* 2176 */
 
        /**
index baf8158..1953004 100644 (file)
@@ -2281,6 +2281,9 @@ const char* freerdp_settings_get_string(rdpSettings* settings, size_t id)
                case FreeRDP_RemoteApplicationCmdLine:
                        return settings->RemoteApplicationCmdLine;
 
+               case FreeRDP_RemoteApplicationWorkingDir:
+                       return settings->RemoteApplicationWorkingDir;
+
                case FreeRDP_ImeFileName:
                        return settings->ImeFileName;
 
@@ -2605,6 +2608,11 @@ BOOL freerdp_settings_set_string(rdpSettings* settings, size_t id, const char* v
                        settings->RemoteApplicationCmdLine = _strdup(val);
                        return settings->RemoteApplicationCmdLine != NULL;
 
+               case FreeRDP_RemoteApplicationWorkingDir:
+                       free(settings->RemoteApplicationWorkingDir);
+                       settings->RemoteApplicationWorkingDir = _strdup(val);
+                       return settings->RemoteApplicationWorkingDir != NULL;
+
                case FreeRDP_ImeFileName:
                        free(settings->ImeFileName);
                        settings->ImeFileName = _strdup(val);
index 5e75222..2f9b3c1 100644 (file)
@@ -361,6 +361,7 @@ static const size_t string_list_indices[] =
        FreeRDP_RemoteApplicationFile,
        FreeRDP_RemoteApplicationGuid,
        FreeRDP_RemoteApplicationCmdLine,
+       FreeRDP_RemoteApplicationWorkingDir,
        FreeRDP_ImeFileName,
        FreeRDP_DrivesToRedirect,
 };