no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1370 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-10-16 21:30:10 +00:00
parent c1c78fa5f1
commit 533df6ba2b
2 changed files with 24 additions and 18 deletions
+22 -16
View File
@@ -1,24 +1,36 @@
// acserverwizard.cpp : Defines the entry point for the console application.
//
// wizard to start an AssaultCube server and storing the configuration
#include <stdio.h>
#include <tchar.h>
#include <map>
#include <string>
#include <iostream>
#include <fstream>
#include <direct.h>
using namespace std;
#ifdef WIN32
#pragma warning( disable : 4996 )
#include <windows.h>
#include <direct.h>
#include <tchar.h>
#include "winserviceinstaller.h"
#elif __GNUC__
#include <sys/types.h>
#include <sys/stat.h>
#endif
int _tmain(int argc, _TCHAR* argv[])
int main(int argc, char **argv)
{
if(argc < 3)
{
cout << "usage: server_wizard <outfile> <relbinarypath>";
return EXIT_FAILURE;
}
string outfile(argv[1]);
string relpath(argv[2]);
map<string, string> args;
cout << "AssaultCube Server Wizard" << endl << endl;
@@ -69,12 +81,6 @@ int _tmain(int argc, _TCHAR* argv[])
getline(cin, wsdisplayname);
}
string relpath = "bin_win32\\ac_server.exe";
#elif UNIX
string relpath = "bin_unix/ac_server";
#endif
string argstr;
@@ -90,18 +96,19 @@ int _tmain(int argc, _TCHAR* argv[])
}
}
cout << endl << "Writing your configuration to ac_server.bat ... ";
cout << endl << "Writing your configuration to " << outfile << " ... ";
try
{
fstream startupScript("ac_server.bat", ios::out);
startupScript << relpath << argstr << endl << "pause" << endl;
fstream startupScript(outfile.c_str(), ios::out);
#ifdef WIN32
startupScript << relpath << argstr << endl << "pause" << endl;
#endif
startupScript.close();
}
catch(...)
{
cout << "Failed!" << endl;
cin.get();
return EXIT_FAILURE;
}
@@ -157,7 +164,6 @@ int _tmain(int argc, _TCHAR* argv[])
cin.get();
cout << "Starting the AC server ..." << endl;
system((relpath + argstr).c_str());
cin.get();
return EXIT_SUCCESS;
}
+2 -2
View File
@@ -60,7 +60,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="../../../server_wizard.exe"
OutputFile="../../../bin_win32/server_wizard.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
@@ -134,7 +134,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="../../../server_wizard.exe"
OutputFile="../../../bin_win32/server_wizard.exe"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"