From d3b1ccd546b06f5aa691757bde75b71f4f1aabfd Mon Sep 17 00:00:00 2001 From: ac_stef Date: Mon, 12 Jan 2009 22:15:08 +0000 Subject: [PATCH] wizard updated git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4138 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/wizard.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/source/src/wizard.cpp b/source/src/wizard.cpp index fa79c59c..e3a1c538 100644 --- a/source/src/wizard.cpp +++ b/source/src/wizard.cpp @@ -40,7 +40,7 @@ int wizardmain(int argc, char **argv) cout << "server description:\t"; getline(cin, args["n"]); - cout << "max clients:\t\t"; + cout << "max clients:\t\t"; getline(cin, args["c"]); cout << "password:\t\t"; @@ -64,11 +64,9 @@ int wizardmain(int argc, char **argv) cout << "score threshold:\t"; getline(cin, args["k"]); - cout << "upstream bandwidth:\t"; - getline(cin, args["u"]); - - cout << "ip:\t\t\t"; - getline(cin, args["i"]); + string permdemo; + cout << "demorecord buffer size:\t"; + getline(cin, permdemo); #ifdef WIN32 @@ -85,7 +83,7 @@ int wizardmain(int argc, char **argv) #endif string argstr; - + for(map::iterator i = args.begin(); i != args.end(); i++) { if((*i).second.empty()) continue; // arg value not set @@ -96,6 +94,7 @@ int wizardmain(int argc, char **argv) else argstr += '"' + (*i).second + '"'; // escape spaces } } + if(permdemo.empty() || atoi(permdemo.c_str())) argstr += " -D" + permdemo; cout << endl << "Writing your configuration to " << outfile << " ... "; @@ -131,16 +130,16 @@ int wizardmain(int argc, char **argv) strncat(path, ("\\" + relpath + " -S" + wsname + " " + argstr).c_str(), MAX_PATH); winserviceinstaller installer(wsname.c_str(), wsdisplayname.c_str(), path); - + int r; - if(!installer.OpenManger()) - { + if(!installer.OpenManger()) + { cout << "Failed!" << endl; cout << "Could not open the Service Control Manager: " << GetLastError() << endl; installer.CloseManager(); return EXIT_FAILURE; } - + if((r = installer.IsInstalled()) != 0) { cout << "Failed!" << endl;