Branch: Tag:

2001-09-28

2001-09-28 12:04:08 by Tomas Nilsson <tomas@roxen.com>

Ignore Ctrl+Break (which makes it possible for pike to use it to dump
thread state)
Added support for adding --remove-dumped automatically when pike version
or defines change.

Rev: server/tools/ntroxen/startdll/cmdline.cpp:1.9
Rev: server/tools/ntroxen/startdll/cmdline.h:1.8
Rev: server/tools/ntroxen/startdll/roxen.cpp:1.7
Rev: server/tools/ntroxen/startdll/roxen.h:1.3
Rev: server/tools/ntroxen/startdll/startdll.cpp:1.8
Rev: server/tools/ntroxen/version.h:1.9

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 $   //   //////////////////////////////////////////////////////////////////////   
221:    m_bPassHelp = FALSE;    m_bKeepMysql = FALSE;    m_bMsdev = FALSE; +  m_bCheckVersion = TRUE;       m_iVerbose = 1;    m_iDebug = -1;
467:    " 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..",
813:    Match(*argv, "--install", NULL, NULL) )    {    m_bInstall = TRUE; +  m_bCheckVersion = FALSE;    type = eArgStart;    return 1;    }
823:    Match(*argv, "--register", NULL, NULL) )    {    m_bRegister = TRUE; +  m_bCheckVersion = FALSE;    type = eArgStart;    return 1;    }
833:    Match(*argv, "--remove", NULL, NULL) )    {    m_bRemove = TRUE; +  m_bCheckVersion = FALSE;    type = eArgStart;    return 1;    }
897:    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
1102:    m_bOnce = TRUE;    m_bPassHelp = TRUE;    m_bKeepMysql = TRUE; +  m_bCheckVersion = FALSE;    type = eArgNtLoader;    return 2;    }
1173:    }    else    { +  m_bCheckVersion = FALSE;    m_bVersion = TRUE;    type = eArgVersion;    }
1237:    }    else    { +  m_bCheckVersion = FALSE;    m_bHelp = TRUE;    type = eArgHelp;    }
1372:    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");   
1445:    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;   }