mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
Handle the -batch option centrally in cmdline.c.
This removes one case from several of the individual tools' command-line parsers, and moves it into a central place where it will automatically be supported by any tool containing console.c. In order to make that not cause a link failure, there's now a stubs/no-console.c which GUI clients of cmdline.c must include.
This commit is contained in:
@ -137,6 +137,7 @@ if(GTK_FOUND)
|
||||
main-gtk-simple.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-ca-config.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-console.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c
|
||||
pty.c)
|
||||
be_list(pterm pterm)
|
||||
@ -152,6 +153,7 @@ if(GTK_FOUND)
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-cmdline.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-ca-config.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-console.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c
|
||||
pty.c)
|
||||
be_list(ptermapp pterm)
|
||||
@ -162,7 +164,8 @@ if(GTK_FOUND)
|
||||
|
||||
add_executable(putty
|
||||
putty.c
|
||||
main-gtk-simple.c)
|
||||
main-gtk-simple.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-console.c)
|
||||
be_list(putty PuTTY SSH SERIAL OTHERBACKENDS)
|
||||
target_link_libraries(putty
|
||||
guiterminal eventloop sshclient otherbackends settings
|
||||
@ -176,7 +179,8 @@ if(GTK_FOUND)
|
||||
add_executable(puttyapp
|
||||
putty.c
|
||||
main-gtk-application.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-cmdline.c)
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-cmdline.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-console.c)
|
||||
be_list(puttyapp PuTTY SSH SERIAL OTHERBACKENDS)
|
||||
target_link_libraries(puttyapp
|
||||
guiterminal eventloop sshclient otherbackends settings
|
||||
@ -189,6 +193,7 @@ if(GTK_FOUND)
|
||||
main-gtk-simple.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-ca-config.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-console.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-rand.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nocproxy.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c)
|
||||
|
@ -735,8 +735,6 @@ int main(int argc, char **argv)
|
||||
--argc, ++argv;
|
||||
} else if (ret == 1) {
|
||||
continue;
|
||||
} else if (!strcmp(p, "-batch")) {
|
||||
console_batch_mode = true;
|
||||
} else if (!strcmp(p, "-s")) {
|
||||
/* Save status to write to conf later. */
|
||||
use_subsystem = true;
|
||||
|
Reference in New Issue
Block a user