Hello, all!
That is sources for my .exe files. For taking it works we need any C++ builder. For exemple i'm take Microsoft Visual Studio 2010 Express Edition, if you have another - ask me.
1)We need to start a new project with premade for "Win32 Console Application" with any name.
2)When we in wizard, just click "Finish" button.
3)Then delete all from "YourName.cpp", it default open when you create solution.
4)Then copy all code from this code box to YourName.cpp:
#include "stdafx.h"
#include "stdlib.h"
int _tmain(int argc, _TCHAR* argv[])
{
system("bin\\Avorion.exe bin\\SpaceServer.exe");
return 0;
}
5)After this you need to create emty text file with name "resource.rc" in folder where you have your project.
Exemple : "E:\AvorionClient". Open this file with notepad and enter the text from this code box:
IDI_APP ICON "icon.ico"
6) You need an icon image for .exe file you want to create. You need to use any image with 32x32 size and named "icon.ico" . When you create or find it - place your .ico in folder with "resource.rc".
7) In visual studio find "Resource Explorer" then right click on Resource Files and left click on Add -> Existing Item, find your resource.rc and add to your project.
8 ) Press F5 button on keyboard, answer yes, then you can see an black box of cmd for a second and then it dissapear, its normal.
9) Find in eplorer folder named "Debug" in your project folder, open it and find "NameOfYorProject.exe" - this is a new execute file for you game. Copy it to ./Avorion/ folder and it will run the game with singleplayer. Then you can rename it with name what you like.
Instructions for server excecute file:
You need to repeat all actions from 1 to 9 but with replace of code in action №4 with this code:
#include "stdafx.h"
#include "stdlib.h"
int _tmain(int argc, _TCHAR* argv[])
{
system("CALL bin\\server_settings.bat");
return 0;
}
All other action are similar.
When you do so, you need to create an "server_settings.bat" in your ./Avorion/bin/ client folder and add this code in it:
.\bin\SpaceServer.exe --datapath "C:\sdata"
For now you can chandge all options like you have an old .bat file in this settings file. All settings you can find on Wiki.
This executable file now run only server for multiplayer, without running client.
Thats all, now you have an estetic, good like execute files with icon what you want.
Thanks for reading!