Commit 017eab82 authored by BONNEAU Alexandre's avatar BONNEAU Alexandre

Output dir, and configfile dir can me modified using arguments, works on...

Output dir, and configfile dir can me modified using arguments, works on windows, should work on unix but didn't try
parent 8d77dd5a
......@@ -36,25 +36,29 @@ using namespace std;
int main( int argc, char * argv[] )
{
std::cout << argc << std::endl;
CrowdSimulator cs;
char * output = "./output/";
// char * masterConfigFile = "./MainConfig.xml";
char * masterConfigFile = "C:/Users/abonneau/Stage/OCSR/OCSR/release/MainConfig.xml";
char * masterConfigFile = "./MainConfig.xml";
if (argc ==2) {
if (argv[1] == "-c" || argv[1] == "-h" || argv[1] == "-help") {
if (strcmp("-h", argv[1])==0 || strcmp("-c", argv[1]) == 0 || strcmp("-help", argv[1]) == 0) {
std::cout << " The optional arguments are : " << std::endl;
std::cout << argv[0] << " outputDirectory" << std::endl;
std::cout << argv[0] <<" outputDirectory mainConfigDirectory/MainConfig.xml " << std::endl;
std::cout << argv[0] << " -c mainConfigDirectory/MainConfig.xml " << std::endl;
return -1;
}
else {
output = argv[1];
}
}
if (argc == 3) {
if (argv[1] != "-c") {
if (strcmp("-c", argv[1]) != 0) {
output = argv[1];
}
masterConfigFile = argv[2];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment