Changeset 24498 for main/trunk/greenstone2/runtime-src/src
- Timestamp:
- 2011-08-26T18:49:30+12:00 (13 years ago)
- Location:
- main/trunk/greenstone2/runtime-src/src/w32server
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/w32server/fnord.cpp
r22677 r24498 875 875 // --location=directory (the path to GSDLHOME which defaults to the 876 876 // directory where server.exe lives) 877 // --mode=gli (when server.exe is run from GLI). If GLI, "gli." is 878 // the prefix used to load autoenter and start_browser properties 879 // (gli.autoenter, gli.start_browser) from the config file 877 880 // --config=file (the path to the configuration file to use which defaults 878 881 // to GSDLHOME\llssite.cfg) 879 882 // --cmd=init Used to initialize the llssite.cfg file only - jmt12 18/11/2003 880 static void parse_args(const text_t cmdline, text_t &location, text_t & config_file, text_t &command) {883 static void parse_args(const text_t cmdline, text_t &location, text_t &mode, text_t &config_file, text_t &command) { 881 884 882 885 location.clear(); 883 886 config_file.clear(); 887 mode.clear(); 884 888 command.clear(); // jmt12 18/11/2003 885 889 886 if (cmdline.size() < 3) return;890 if (cmdline.size() < 4) return; 887 891 888 892 text_t name, val; … … 895 899 if (name == "location") { 896 900 location = val; 901 } else if(name == "mode") { 902 mode = val; 897 903 } else if (name == "config") { 898 904 config_file = val; … … 916 922 if (name == "location") { 917 923 location = val; 924 } else if (name == "mode") { 925 mode = val; 918 926 } else if (name == "config") { 919 927 config_file = val; … … 953 961 954 962 // parse arguments 955 text_t location, config_file, command;956 parse_args(CmdLineStr, location, config_file, command);963 text_t location, mode, config_file, command; 964 parse_args(CmdLineStr, location, mode, config_file, command); 957 965 gsdl_conffile = config_file; 966 if (mode.empty()) { 967 // if the server is run on its own, mode_prefix is "" with no '.' suffix 968 gsdl_mode_property_prefix = ""; 969 } else { 970 // if the server is launched from GLI, the mode_prefix is "gli" and needs 971 // '.' suffixed when accessing certain properties from the config file. 972 gsdl_mode_property_prefix = mode + "."; 973 } 958 974 959 975 // Try to generate the llssite.cfg file if it's missing -
main/trunk/greenstone2/runtime-src/src/w32server/settings.cpp
r22770 r24498 69 69 int gsdl_start_browser = 1; 70 70 int gsdl_address_resolution_method = 2; // use localhost since users may switch between computers 71 // The resolution method was previously on 1: Get an IP, but don't resolve to a name 71 72 text_t gsdl_host_IP; 72 // The resolution method was previously on 1: Get an IP, but don't resolve to a name 73 text_t gsdl_mode_property_prefix; 73 74 74 75 // private data … … 313 314 write_ini_line(fout, "portnumber", text_t(gsdl_port_num)); 314 315 write_ini_line(fout, "externalaccess", text_t(gsdl_external_access)); 315 write_ini_line(fout, "autoenter", text_t(gsdl_auto_enter));316 write_ini_line(fout, gsdl_mode_property_prefix+"autoenter", text_t(gsdl_auto_enter)); 316 317 write_ini_line(fout, "browser", text_t(gsdl_browser)); 317 318 write_ini_line(fout, "browserexe", gsdl_browser_exe); 318 319 write_ini_line(fout, "collections", gsdl_collections); 319 write_ini_line(fout, "start_browser", text_t(gsdl_start_browser));320 write_ini_line(fout, gsdl_mode_property_prefix+"start_browser", text_t(gsdl_start_browser)); 320 321 write_ini_line(fout, "address_resolution_method", text_t(gsdl_address_resolution_method)); 321 322 write_ini_line(fout, "hostIP", gsdl_host_IP); … … 407 408 gsdl_port_num = 80; 408 409 gsdl_external_access = 0; 409 gsdl_auto_enter = 0; 410 gsdl_start_browser = 1; 410 if(gsdl_mode_property_prefix == "") { 411 gsdl_auto_enter = 0; 412 gsdl_start_browser = 1; 413 } else { 414 gsdl_auto_enter = 1; 415 gsdl_start_browser = 0; 416 } 411 417 412 418 check_installed_browsers (netscapeneeded); … … 473 479 gsdl_external_access = value.getint(); 474 480 475 } else if (key == "autoenter") {481 } else if (key == gsdl_mode_property_prefix+"autoenter") { 476 482 gsdl_auto_enter = value.getint(); 477 483 478 } else if (key == "start_browser") {484 } else if (key == gsdl_mode_property_prefix+"start_browser") { 479 485 gsdl_start_browser = value.getint(); 480 486 -
main/trunk/greenstone2/runtime-src/src/w32server/settings.h
r20949 r24498 71 71 extern int gsdl_start_browser; 72 72 extern int gsdl_address_resolution_method; 73 extern text_t gsdl_mode_property_prefix; 73 74 74 75 void Settings_Dialog(HWND window, int netscapeneeded);
Note:
See TracChangeset
for help on using the changeset viewer.