Linux multi-monitor fullscreen support
[ryzomcore.git] / ryzom / tools / patch_gen / patch_gen_main.cpp
blobbc2e6bf66af0bef2ad22a525bfc7688ae2c3c876
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include "nel/misc/debug.h"
18 #include "nel/misc/command.h"
19 #include "nel/misc/sstring.h"
20 //#include "game_share/handy_commands.h"
22 //-----------------------------------------------
23 // MAIN
24 //-----------------------------------------------
25 int main(int argc,char** argv)
27 NLMISC::createDebug();
29 // if there are no command line args then display a friendly message and exit
30 if (argc==1)
32 NLMISC::InfoLog->displayNL("SYNTAX: %s <command line>",argv[0]);
33 NLMISC::InfoLog->displayNL("");
34 NLMISC::InfoLog->displayNL("For a list of valid commands and their paramaters try: %s help",argv[0]);
35 NLMISC::InfoLog->displayNL("");
36 return 0;
39 // build the command line by concatnating input arguments (separating with spaces)
40 NLMISC::CSString commandline;
41 for (int i=1;i<argc;++i)
43 NLMISC::CSString s= argv[i];
45 // check whether the argument needs to be quote encapsulated
46 if (s.contains(' ') && s[0]!='\"')
47 s= "\""+ s+ "\"";
49 if (i>1)
50 commandline+=' ';
51 commandline+= s;
54 // have NeL treat the command
55 NLMISC::ICommand::execute(commandline, *NLMISC::InfoLog);
57 return 0;