- Timestamp:
- 2011-08-26T18:49:30+12:00 (13 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.