Rename parameters more sanely. Add support for working dir.
This commit is contained in:
parent
007cb2c66c
commit
a6a72d950c
@ -90,8 +90,9 @@ const char* GUAC_CLIENT_ARGS[] = {
|
|||||||
"security",
|
"security",
|
||||||
"ignore-cert",
|
"ignore-cert",
|
||||||
"disable-auth",
|
"disable-auth",
|
||||||
"remote-app-name",
|
"remote-app",
|
||||||
"remote-app-command",
|
"remote-app-dir",
|
||||||
|
"remote-app-args",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -116,8 +117,9 @@ enum RDP_ARGS_IDX {
|
|||||||
IDX_SECURITY,
|
IDX_SECURITY,
|
||||||
IDX_IGNORE_CERT,
|
IDX_IGNORE_CERT,
|
||||||
IDX_DISABLE_AUTH,
|
IDX_DISABLE_AUTH,
|
||||||
IDX_REMOTE_APP_NAME,
|
IDX_REMOTE_APP,
|
||||||
IDX_REMOTE_APP_COMMAND,
|
IDX_REMOTE_APP_DIR,
|
||||||
|
IDX_REMOTE_APP_ARGS,
|
||||||
RDP_ARGS_COUNT
|
RDP_ARGS_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -189,16 +191,15 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Load RAIL plugin if RemoteApp in use */
|
/* Load RAIL plugin if RemoteApp in use */
|
||||||
if (guac_client_data->settings.remote_app_name != NULL
|
if (guac_client_data->settings.remote_app != NULL) {
|
||||||
|| guac_client_data->settings.remote_app_command != NULL) {
|
|
||||||
|
|
||||||
#ifdef LEGACY_FREERDP
|
#ifdef LEGACY_FREERDP
|
||||||
RDP_PLUGIN_DATA* plugin_data = malloc(sizeof(RDP_PLUGIN_DATA) * 2);
|
RDP_PLUGIN_DATA* plugin_data = malloc(sizeof(RDP_PLUGIN_DATA) * 2);
|
||||||
|
|
||||||
plugin_data[0].size = sizeof(RDP_PLUGIN_DATA);
|
plugin_data[0].size = sizeof(RDP_PLUGIN_DATA);
|
||||||
plugin_data[0].data[0] = guac_client_data->settings.remote_app_name;
|
plugin_data[0].data[0] = guac_client_data->settings.remote_app;
|
||||||
plugin_data[0].data[1] = NULL;
|
plugin_data[0].data[1] = guac_client_data->settings.remote_app_dir;
|
||||||
plugin_data[0].data[2] = guac_client_data->settings.remote_app_command;
|
plugin_data[0].data[2] = guac_client_data->settings.remote_app_args;
|
||||||
plugin_data[0].data[3] = NULL;
|
plugin_data[0].data[3] = NULL;
|
||||||
|
|
||||||
plugin_data[1].size = 0;
|
plugin_data[1].size = 0;
|
||||||
@ -542,15 +543,20 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
|||||||
if (argv[IDX_INITIAL_PROGRAM][0] != '\0')
|
if (argv[IDX_INITIAL_PROGRAM][0] != '\0')
|
||||||
settings->initial_program = strdup(argv[IDX_INITIAL_PROGRAM]);
|
settings->initial_program = strdup(argv[IDX_INITIAL_PROGRAM]);
|
||||||
|
|
||||||
/* RemoteApp name */
|
/* RemoteApp program */
|
||||||
settings->remote_app_name = NULL;
|
settings->remote_app = NULL;
|
||||||
if (argv[IDX_REMOTE_APP_NAME][0] != '\0')
|
if (argv[IDX_REMOTE_APP][0] != '\0')
|
||||||
settings->remote_app_name = strdup(argv[IDX_REMOTE_APP_NAME]);
|
settings->remote_app = strdup(argv[IDX_REMOTE_APP]);
|
||||||
|
|
||||||
/* RemoteApp command */
|
/* RemoteApp working directory */
|
||||||
settings->remote_app_command = NULL;
|
settings->remote_app_dir = NULL;
|
||||||
if (argv[IDX_REMOTE_APP_COMMAND][0] != '\0')
|
if (argv[IDX_REMOTE_APP_DIR][0] != '\0')
|
||||||
settings->remote_app_command = strdup(argv[IDX_REMOTE_APP_COMMAND]);
|
settings->remote_app_dir = strdup(argv[IDX_REMOTE_APP_DIR]);
|
||||||
|
|
||||||
|
/* RemoteApp arguments */
|
||||||
|
settings->remote_app_args = NULL;
|
||||||
|
if (argv[IDX_REMOTE_APP_ARGS][0] != '\0')
|
||||||
|
settings->remote_app_args = strdup(argv[IDX_REMOTE_APP_ARGS]);
|
||||||
|
|
||||||
/* Session color depth */
|
/* Session color depth */
|
||||||
settings->color_depth = RDP_DEFAULT_DEPTH;
|
settings->color_depth = RDP_DEFAULT_DEPTH;
|
||||||
|
@ -170,8 +170,7 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* RemoteApp */
|
/* RemoteApp */
|
||||||
if (guac_settings->remote_app_name != NULL
|
if (guac_settings->remote_app != NULL) {
|
||||||
|| guac_settings->remote_app_command != NULL) {
|
|
||||||
#ifdef LEGACY_RDPSETTINGS
|
#ifdef LEGACY_RDPSETTINGS
|
||||||
rdp_settings->workarea = TRUE;
|
rdp_settings->workarea = TRUE;
|
||||||
rdp_settings->remote_app = TRUE;
|
rdp_settings->remote_app = TRUE;
|
||||||
@ -180,8 +179,9 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
|
|||||||
rdp_settings->Workarea = TRUE;
|
rdp_settings->Workarea = TRUE;
|
||||||
rdp_settings->RemoteApplicationMode = TRUE;
|
rdp_settings->RemoteApplicationMode = TRUE;
|
||||||
rdp_settings->RemoteAppLanguageBarSupported = TRUE;
|
rdp_settings->RemoteAppLanguageBarSupported = TRUE;
|
||||||
rdp_settings->RemoteApplicationProgram = guac_settings->remote_app_name;
|
rdp_settings->RemoteApplicationProgram = guac_settings->remote_app;
|
||||||
rdp_settings->RemoteApplicationCmdLine = guac_settings->remote_app_command;
|
rdp_settings->ShellWorkingDirectory = guac_settings->remote_app_dir;
|
||||||
|
rdp_settings->RemoteApplicationCmdLine = guac_settings->remote_app_args;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,14 +182,19 @@ typedef struct guac_rdp_settings {
|
|||||||
int disable_authentication;
|
int disable_authentication;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the application to launch, if RemoteApp is in use.
|
* The application to launch, if RemoteApp is in use.
|
||||||
*/
|
*/
|
||||||
char* remote_app_name;
|
char* remote_app;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The command to use to launch the application, if RemoteApp is in use.
|
* The working directory of the remote application, if RemoteApp is in use.
|
||||||
*/
|
*/
|
||||||
char* remote_app_command;
|
char* remote_app_dir;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The arguments to pass to the remote application, if RemoteApp is in use.
|
||||||
|
*/
|
||||||
|
char* remote_app_args;
|
||||||
|
|
||||||
} guac_rdp_settings;
|
} guac_rdp_settings;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user