Files
2022-10-26 12:25:11 +08:00

34 lines
572 B
C++

#include <iostream>
#include <Windows.h>
#include "ScriptParser.h"
VOID WaitAutoShutDown( int nCloseTime )
{
printf( "AutoClose After %d Seconds", nCloseTime/1000 );
Sleep( nCloseTime );
}
void main()
{
ScriptParser parser;
if( !parser.Load( "ServerStarter.ini" ) )
{
printf( "ServerStarter.ini Load Fail\n" );
WaitAutoShutDown( parser.GetShutDownTime() );
return;
}
else
{
if( !parser.CopyFiles() )
{
WaitAutoShutDown( parser.GetShutDownTime() );
return;
}
}
parser.StartServer();
WaitAutoShutDown( parser.GetShutDownTime() );
return;
}