It’s been 3 years since I’ve tried to build the client on Linux. I started building the client long before there ever was a Basternae 3 project, and since then plenty of files have been added and removed — for instance, we no longer use Xerces-C or SDL in the project. I was using Ubuntu 6.06 then, and now I’m on 9.04.
After updating the old makefile, I found there were a few minor issues. Of course there was the expected forward/back slash in filenames and that’s an easy fix. There were two that were a bit of a surprise:
warning: cannot pass objects of non-POD type ‘class wxString’ through ‘...’; call will abort at runtime
error: no matching function for call to ‘wxRichTextCtrl::AddPendingEvent(wxCommandEvent)’
/usr/include/wx-2.8/wx/event.h:2400: note: candidates are: void wxEvtHandler::AddPendingEvent(wxEvent&)
The first one is because I was passing wxString arguments to the wxString::Format function. Visual Studio was smart enough to convert those to the char* type that printf commands understand for %s, while GCC doesn’t make any assumptions and does what you tell it to rather than what you intend. Differences like that have been known to start religious wars. Adding .c_str() to the arguments in a dozen places sorted that out for me.
The second one was a bit of a stumper, and the folks at the wxWidgets Discussion Forum helped me out. I’ve dealt with a lot of user communities for various APIs and toolkits, and the wxWidgets folks have always been the most helpful and knowledgeable.
I was able to get the client to build. I was even able to get it to run. I could almost even use it. Here’s a screenshot:
The main problem with it is that the input window doesn’t actually work — you can type until you’re blue in the face but nothing ever gets sent to the MUD. Strangely enough, if you program a hotkey and click that, the text goes across fine. I was able to clumsily log in and fight something using that method. I’m sure there’s some OS-specific stuff in the key handler for the input window, but that probably won’t be too daunting to figure out.
Now I’m going to have to learn how to create Debian (.deb) installer packages so I can distribute the thing. I might also have to figure out how to do .rpm, but since I don’t run a Redhat/Fedora-based version that might be a little low on the priority list, especially since I’d have to set up VM just to build/deploy it. I might be the only one who uses Linux that would connect to Basternae anyhow.
It would also probably not be too tough to get this working for MacOS and Solaris, but since there’s zero chance of me having a Mac to work with and the only people who run Solaris work at Sun Microsystems, those aren’t really a priority.