Private Server On Linux

Xenon

Member
Tethealla is built for windows and the current release will neither compile nor run on other platforms (unless you get extremely lucky with Wine). I'm working on a cross-platform version but it's nowhere near ready for anyone to actually host, so for now I think the easy answer to your question is no
 

tofuman

Administrator
Staff member
We use Wine at Eden and it works perfectly fine.

You need to strip out the system tray code from the source and comment out a Mozilla line in the winsock code though.
 

tofuman

Administrator
Staff member
Using Wine, yes.

The plan is to make Tethealla cross platform in the future. But that is quite some time away yet.
 

qmnty

Member
Found a crash when using Wine?

what step to running PSO Private Server on linux?

Any tutorial or else?
 

tofuman

Administrator
Staff member
What message did you get when it crashed? Did you remove the system tray code from the servers? (Login, ship and patch). did you also comment out the code in winsock to do with mozilla?

I can try and get a tutorial together. But in my experience when it crashes in Wine it provides you with the reason why.
 

qmnty

Member
There's no message when crashing.

Only crash on server.

no, i did not remove the system tray code yet. :(
I don't know where is it.

Where's code to comment out?

I'm using MS Visual Studio 2010.
 

tofuman

Administrator
Staff member
The below code from the ship will need to be removed:

You'll need to search for the code though. I don't have line numbers to hand.
Code:
#define reveal_window \
	ShowWindow ( consoleHwnd, SW_NORMAL ); \
	SetForegroundWindow ( consoleHwnd ); \
	SetFocus ( consoleHwnd )
Code:
LRESULT CALLBACK WndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
	if(message == MYWM_NOTIFYICON)
	{
		switch (lParam)
		{
		case WM_LBUTTONDBLCLK:
			switch (wParam) 
			{
			case 100:
				if (program_hidden)
				{
					program_hidden = 0;
					reveal_window;
				}
				else
				{
					program_hidden = 1;
					ShowWindow (consoleHwnd, SW_HIDE);
				}
				return TRUE;
				break;
			}
			break;
		}
	}
	return DefWindowProc( hwnd, message, wParam, lParam );

}
Code:
	HWND hwndWindow;
	MSG msg;
Code:
	wc.hbrBackground =(HBRUSH)GetStockObject(WHITE_BRUSH);
	wc.hIcon = LoadIcon( hinst, IDI_APPLICATION );
	wc.hCursor = LoadCursor( hinst, IDC_ARROW );
	wc.hInstance = hinst;
	wc.lpfnWndProc = WndProc;
	wc.lpszClassName = "sodaboy";
	wc.style = CS_HREDRAW | CS_VREDRAW;

	if (! RegisterClass( &wc ) )
	{
		printf ("RegisterClass failure.\n");
		exit (1);
	}

	hwndWindow = CreateWindow ("sodaboy","hidden window", WS_MINIMIZE, 1, 1, 1, 1, 
		NULL, 
		NULL,
		hinst,
		NULL );

	if (!hwndWindow)
	{
		printf ("Failed to create window.");
		exit (1);
	}

	ShowWindow ( hwndWindow, SW_HIDE );
	UpdateWindow ( hwndWindow );
	ShowWindow ( consoleHwnd, SW_HIDE );
	UpdateWindow ( consoleHwnd );

    nid.cbSize				= sizeof(nid);
	nid.hWnd				= hwndWindow;
	nid.uID					= 100;
	nid.uCallbackMessage	= MYWM_NOTIFYICON;
	nid.uFlags				= NIF_MESSAGE|NIF_ICON|NIF_TIP;
    nid.hIcon				= LoadIcon(hinst, MAKEINTRESOURCE(IDI_ICON1));
	nid.szTip[0] = 0;
	strcat (&nid.szTip[0], "Tethealla Ship ");
	strcat (&nid.szTip[0], SERVER_VERSION);
	strcat (&nid.szTip[0], " - Double click to show/hide");
    Shell_NotifyIcon(NIM_ADD, &nid);

Obviously take backups of your code. I may have missed a few lines but if there are any errors on compile it should just be a matter of removing the lines that produce an error.
 

tofuman

Administrator
Staff member
The code will be similar, yes.

The only other thing I encountered was an error with winsock to do with Mozilla. I commented out the line in the winsock header file and it worked fine. But it's possible that later versions of Wine have resolved this issue if you don't come across it.
 

qmnty

Member
Hey,

still got the problem.
this

Code:
err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005

I have comment out the code.
but still got that problems.

And i re-enable this code, for automatic hide terminal executable.

Code:
LRESULT CALLBACK WndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
	if(message == MYWM_NOTIFYICON)
	{
		switch (lParam)
		{
		case WM_LBUTTONDBLCLK:
			switch (wParam) 
			{
			case 100:
				if (program_hidden)
				{
					program_hidden = 0;
					ShowWindow (consoleHwnd, SW_NORMAL);
					SetForegroundWindow (consoleHwnd);
					SetFocus(consoleHwnd);
				}
				else
				{
					program_hidden = 1;
					ShowWindow (consoleHwnd, SW_HIDE);
				}
				return TRUE;
				break;
			}
			break;
		}
	}
	return DefWindowProc( hwnd, message, wParam, lParam );
}

When it disable, it can't automatic hide.

And this.

when I saw the list of processes , the executable is not found.
i am using
Code:
ps -ef |grep wine

When saw the list of processes.
 

Smokey

RevPSO C.E.O
You should be able to simply type "ps -e" to show your processes instead of the command you've stated under CentOS. What version of CentOS are you running?
 

tofuman

Administrator
Staff member
Stripping out the system tray code would remove the hide feature because its one and the same thing. In my experience this is the only thing that Wine complained about. Problem is, with each update to Wine it can bring about new and different problems. It seems then that the system tray code works fine for you but it has issues with the PNG codec.

I've done a quick google and found that you'll need to configure Wine with PNG support:
https://www.centos.org/forums/viewtopic ... 14&t=50175
 

qmnty

Member
So,

it's no problem?

it's doesn't automatic minimized?

I'am using putty at this case.

so how to minimized from putty?

But when i'm installing with configure png.
It show another error.

Like this.

Code:
configure: error: libpng development files not found, PNG won't be supported.
This is an error since --with-png was requested.

But my VPS already installed libpng with latest version

Code:
Package 2:libpng-1.2.49-1.el6_2.i686 already installed and latest version
 

qmnty

Member
Bump.

Now it's work on linux :D

Thanks.

But i have another problem.

This problem


At ship_server.exe

Code:
Reconnecting to login server...
Connection successful!
Could not read data from logon server...
Socket Error 0.
Lost connection with the logon server...
Reconnect in 15 seconds...

At patch_server.exe
Code:
Accepted SHIP connection from xxx.xx.xxx.xxx:xxxxx
Terminated connection with ship

How to solve that problem?

I have opened the port like

This tutorial.
Code:
http://www.pioneer2.net/phpBB3/viewtopic.php?f=2&t=2

using

Examle
Code:
iptables -I INPUT 1 -p tcp --dport 5280 -j ACCEPT

But still problem..
 

Soly

Member
Be sure that you have all the files needed for the login and ship... i had a similar problem because of missing "non critical" files... although might not be the issue, worth to check.
 

qmnty

Member
Solved problem :D

But now,

i can't minimize the executable.

I mean, when i close putty terminal.

The executable is closing too..

For example.
I running patch_server.exe, first running is normal, but when i close my putty terminal, it going close too..

How to minimize the executable, so i can log off from putty and not close the executable?
 

tofuman

Administrator
Staff member
You can use nohup command to ensure that the program continues after you disconnect
 
Top