Roxen.git / server / tools / ntroxen / startdll / cmdline.cpp

version» Context lines:

Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1030:    type = eArgPike;    return 1;    }       //'--no-threads'|'--without-threads'|'--disable-threads')    // DEFINES="`echo $DEFINES | sed -e 's/-DENABLE_THREADS//g'`"    if (Match(*argv, "--no-threads", NULL, NULL) ||    Match(*argv, "--without-threads", NULL, NULL) ||    Match(*argv, "--disable-threads", NULL, NULL) )    { -  m_saPikeDefines.Remove("-DENABLE_THREADS"); +  HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); +  OutputLineFmt(hOut, "Thread support not optional -- ignoring %s", *argv);    type = eArgPike;    return 1;    }       //'--with-profile'|'--profile')    // DEFINES="-DPROFILE $DEFINES"    if (Match(*argv, "--profile", NULL, NULL) ||    Match(*argv, "--with-profile", NULL, NULL) )    {    m_saPikeDefines.Add("-DPROFILE");
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1361:    }       // This must be after anything that changes the PikeDefines    if (m_bCheckVersion)    {    if (CRoxen::CheckVersionChange())    {    m_saRoxenArgs.AddIfNew("--remove-dumped");    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);    if (m_iVerbose >= 1) -  OutputLine(hOut, " : Removing old precompiled files (defines or pike version changed)"); +  OutputLine(hOut, " : Removing old precompiled files (defines or pike version changed)");    }    }   }         BOOL CCmdLine::Parse(char * cmdline)   {    int numargs;    int numchars;   
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1478:    selfTestDirUnx.resize(m_SelfTestDir.length());    for (int i=0; i<m_SelfTestDir.length(); i++)    {    if (m_SelfTestDir[i] == '\\')    selfTestDirUnx[i] = '/';    else    selfTestDirUnx[i] = m_SelfTestDir[i];    }       //DEFINES="-DRUN_SELF_TEST -DSELF_TEST_DIR=\"$SELF_TEST_DIR\" $DEFINES" +  //DEFINES="$DEFINES \"-M$SELF_TEST_DIR/modules\""    //rm -rf $VARDIR/test_config*    //cp -R etc/test/config $VARDIR/test_config    //cp etc/test/filesystem/test_rxml_package rxml_packages/test_rxml_package    //DIR=$VARDIR/test_config    //once=1    //remove_dumped=1    m_saPikeArgs.Add("-DRUN_SELF_TEST");    m_saPikeArgs.Add(("-DSELF_TEST_DIR=\\\"" + selfTestDirUnx + "\\\"").c_str()); -  +  m_saPikeArgs.Add(("-M" + selfTestDirUnx + "/modules").c_str());       m_bOnce = TRUE;    m_iDebug = max(m_iDebug, 1);    m_ConfigDir = "../var/test_config";    m_saRoxenArgs.Add(("--config-dir=" + m_ConfigDir).c_str());    m_saRoxenArgs.Add("--remove-dumped");       // Make sure that mysql is not running    KillMySql(m_ConfigDir.c_str());       SetEnvironmentVariable("COPYCMD", "/Y");    system("rmdir /Q /S ..\\var\\test_config >NUL:");       std::string setupCmd = m_SelfTestDir + "\\scripts\\setup.pike";    DWORD attr = GetFileAttributes(setupCmd.c_str());    if (attr != -1 && !(attr & FILE_ATTRIBUTE_DIRECTORY))    { -  +  // NB: Same behavior as stracat(), but I don't trust stracat(). +  // /grubba 2018-04-13 +  char **arr = m_saPikeDefines.GetList(); +  std::string defines = ""; +  while (*arr) { +  if (strchr(*arr, ' ')) { +  defines += "\""; +  defines += *arr; +  defines += "\""; +  } else { +  defines += *arr; +  } +  defines += " "; +  arr++; +  } +  setupCmd = defines + setupCmd;    setupCmd += " " + selfTestDirUnx + " ../var";    CRoxen::RunPike(setupCmd.c_str());    }       }    //OutputLineFmt(hOut, ".BSelfTest argument: %sB.", argv[i]);    break;       case eArgHelp:    // No extra handling here