Using the Win32 port for a Linux server (after development)

Posted by Seveian on Wed 07 Jan 2004 08:44 PM — 3 posts, 14,163 views.

#0
Hello there. This is a bit of an odd question, so please bear with me.

A few months ago a friend of mine downloaded the SMAUG win32 port from your website, and since then we have been putting day after day of work into preparing it to move onto a real server which unfortunately for us, 99% of which run linux os's :) We would really prefer not to start over, so I'm wondering if you can offer any advice on re-porting the codebase to Linux. I have heard from some that it may be as simple as altering the make file, but I can't be sure.

If you could share any insight whatsoever on this I would be very greatful.

Thanks.
Mike
----------------------------------------------------------

Entered by Gammon Software support on 7 Jan 2004 4:37 PM

It's not an odd question - sounds perfectly normal to me. :)

It is easy to do - however I prefer to answer general SMAUG question on my forum:

http://www.gammon.com.au/forum

That way the answer can help others as well.

When you do, can you indicate whether the problem is the area files (which you should be able to copy over virtually unchanged) or whether you have made code changes as well. If so, which compiler did you use?

---------------------------------------------------------

The problem lies within the fact that we have made some extensive code changes already to the MUD, but nothing that is involved with WINSOCK or whatever is used in the win32 port. We used Cygwin to compile it.
USA #1
The Win32 port is actually a version that technically runs on both Linux and Windows. There should be a lot of "#ifdef WIN32" in the code for instance; those give away the portability tweaks.

So, unless you wrote platform specific code, which is quite unlikely, your code should run without a hitch on Linux - especially if you were running on Cygwin. :)
USA #2
And yes, there's usually some sort of flag in the Makefile to tell it which to use. If not, then it's probably safe to assume it'll work. But if not, it won't take much to fix :)