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

version» Context lines:

Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1:   // cmdline.cpp: implementation of the CCmdLine class.   // - // $Id: cmdline.cpp,v 1.8 2001/08/23 13:31:33 tomas Exp $ + // $Id: cmdline.cpp,v 1.9 2001/09/28 12:02:49 tomas Exp $   //   //////////////////////////////////////////////////////////////////////      #include "stdafx.h"   #include "startdll.h"   #include "cmdline.h"   #include "roxen.h"   #include "enumproc.h"      #ifdef _DEBUG
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:214:    m_bPreloaded = FALSE;       m_bInstall = FALSE;    m_bRemove = FALSE;    m_bOnce = FALSE;    m_bHelp = FALSE;    m_bVersion = FALSE;    m_bPassHelp = FALSE;    m_bKeepMysql = FALSE;    m_bMsdev = FALSE; +  m_bCheckVersion = TRUE;       m_iVerbose = 1;    m_iDebug = -1;      }      CCmdLine::~CCmdLine()   {   }   
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:460:    " truss, shows .BallB. system calls. This is",    " extremely noisy, and is not intented for",    " anything but debug.",    "",    " .B--truss-cB.: (Solaris only). Run the server under",    " truss -c, shows times for all system calls",    " on exit. This is not intented for anything",    " but debug. Slows the server down.",    "",   */ +  " .B--with-snmp-agentB.: Enable internal SNMP agent code.", +  "",    " .BArguments passed to pike:B.",    "",    " .B-DDEFINEB.: Define the symbol .BDEFINEB..",    "",    " .B-d<level>B.: Set the runtime Pike debug to level.",    " This only works if Pike is compiled",    " with debug (i.e. with --rtl-debug to",    " configure).",    "",    " .B-rtB.: Enable runtime typechecking.",
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:806:    ##    */          //'-install'|'--install')    //    if (Match(*argv, "-install", NULL, NULL) ||    Match(*argv, "--install", NULL, NULL) )    {    m_bInstall = TRUE; +  m_bCheckVersion = FALSE;    type = eArgStart;    return 1;    }       //'-register'|'--register')    //    if (Match(*argv, "-register", NULL, NULL) ||    Match(*argv, "--register", NULL, NULL) )    {    m_bRegister = TRUE; -  +  m_bCheckVersion = FALSE;    type = eArgStart;    return 1;    }       //'-remove'|'--remove')    //    if (Match(*argv, "-remove", NULL, NULL) ||    Match(*argv, "--remove", NULL, NULL) )    {    m_bRemove = TRUE; -  +  m_bCheckVersion = FALSE;    type = eArgStart;    return 1;    }       //-D*)    //DEFINES="$DEFINES $1"    if (Match(*argv, "-D*", NULL, NULL))    {    m_saPikeDefines.Add(*argv);    type = eArgPike;
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:890:    //'--with-security'|'--enable-security')    // DEFINES="$DEFINES -DSECURITY"    if (Match(*argv, "--with-security", NULL, NULL) ||    Match(*argv, "--enable-security", NULL, NULL) )    {    m_saPikeDefines.Add("-DSECURITY");    type = eArgPike;    return 1;    }    +  //'--with-snmp-agent'|'--enable-snmp-agent') +  // DEFINES="$DEFINES -DSNMP_AGENT" +  if (Match(*argv, "--with-snmp-agent", NULL, NULL) || +  Match(*argv, "--enable-snmp-agent", NULL, NULL) ) +  { +  m_saPikeDefines.Add("-DSNMP_AGENT"); +  type = eArgPike; +  return 1; +  }       //'--debug'|'--with-debug'|'--enable-debug')    // debug=1    if (Match(*argv, "--debug", NULL, NULL) ||    Match(*argv, "--with-debug", NULL, NULL) ||    Match(*argv, "--enable-debug", NULL, NULL) )    {    m_iDebug = 1;    type = eArgDebug;    return 1;
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1095:    // program="$2"    // once=1    // passhelp=1    if (Match(*argv, "--program", NULL, NULL) )    {    m_saRoxenArgs.Add(*argv);    m_saRoxenArgs.Add(argv[1]);    m_bOnce = TRUE;    m_bPassHelp = TRUE;    m_bKeepMysql = TRUE; +  m_bCheckVersion = FALSE;    type = eArgNtLoader;    return 2;    }       //'--cd')    // cd_to="$2"    // # Use the absolute path...    // roxendir="`pwd`"    // once=1    // shift
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1166:    // fi    if (Match(*argv, "--version", NULL, NULL))    {    if (m_bPassHelp)    {    m_saRoxenArgs.Add(*argv);    type = eArgRoxen;    }    else    { +  m_bCheckVersion = FALSE;    m_bVersion = TRUE;    type = eArgVersion;    }    return 1;    }       //'--self-test')    // setup_for_tests    if (Match(*argv, "--self-test", NULL, NULL))    {
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1230:    if (Match(*argv, "--help", NULL, NULL) ||    Match(*argv, "-?", NULL, NULL) )    {    if (m_bPassHelp)    {    m_saRoxenArgs.Add(*argv);    type = eArgRoxen;    }    else    { +  m_bCheckVersion = FALSE;    m_bHelp = TRUE;    type = eArgHelp;    }    return 1;    }          // Unknown option give it to roxen    m_saRoxenArgs.Add(*argv);    type = eArgRoxen;
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1365:    //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_bOnce = TRUE; +  m_iDebug = max(m_iDebug, 0);    m_saRoxenArgs.Add("--config-dir=../var/test_config");    m_saRoxenArgs.Add("--remove-dumped");       SetEnvironmentVariable("COPYCMD", "/Y");    system("rmdir /Q /S ..\\var\\test_config >NUL:");    //system("xcopy etc\\test\\config ..\\var\\test_config\\ /E /Q >NUL:");    //system("copy etc\\test\\filesystem\\test_rxml_package rxml_packages\\test_rxml_package >NUL:");    system(("xcopy " + m_SelfTestDir + "\\config ..\\var\\test_config\\ /E /Q >NUL:").c_str());      
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1438:    else if (m_iDebug == -1)    {    }    else if (m_iDebug == 1)    {    m_saPikeDefines.AddIfNew("-DDEBUG");    m_saPikeDefines.AddIfNew("-DMODULE_DEBUG");    m_saPikeArgs.AddIfNew("-w");    }    +  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)"); +  } +  } +     return ret;   }