How is the installation for Linux?
How is the installation for Linux?
It's C++ code, so in theory, it should compile on Linux. I had a go at it last weekend, but it doesn't fully work yet.
Below is what I did so far:
- I spun up a Virtual Machine in Oracle VirtualBox with Ubuntu 20.04 64-bit.
- I installed the following packages: build-essential mingw-w64 g++-mingw-w64 libgtk2.0-dev libcanberra-gtk-module
- I downloaded and compiled SQLite 3.26 & wxWidgets 3.1.3, which all went smoothly
- I edited the makefile to reflect the corresponding paths and replaced ‘windres.exe’ with the following corresponding binfile on Linux: /usr/bin/x86_64-w64-mingw32-windres
- I ran the makefile. Note, I am using the ‘dev’ branch on the Github repository.
During compiling, I ran into the issue that the compiler doesn’t seem to detect that it’s running on Linux and thus would fail to compile files containing the creation of directories, i.e. wxMkdir, as it would state it was missing an argument, i.e. the chmod parameters. I worked around this by adding the chmod parameters to all wxMkdir statements in the following files:
StaticFunctions.cpp
StatsgenFrame.cpp
StatsgenWeb.cpp
GUIWizards.cpp
So far so good, but as soon as /usr/bin/x86_64-w64-mingw32-windres was being called, it complains about ‘undefined references’. This code compiled on Windows without issue, so I assume it had to do with a difference in the used compiler (versions). However, I read that windres is a compiler for Windows resource files. Since I’m trying to compile this for Linux, I removed the Windres part, along with the resource objects, and the build succeeded.
However, the initial configuration windows fails to open due to the following error: "../src/gtk/dcclient.cpp(2114): assert ""m_window"" failed in DoGetSize(): GetSize() doesn't work without window".
I found that this is a Linux specific error with wxWidgets but haven't found a solution yet...
I then setup a gameserver and FTP details using the Output Config and Server Config dropdown menu's. The FTP part works, but while generating the stats, two errors popup:
../src/common/unichar.cpp(52): assert ""Assert failure"" failed in FromHi8bit(): invalid multibyte character
/home/captainslow/git/wxWidgets-3.1.3/include/wx/strvararg.h(451): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer():
I was able to press continue and the stats generation finished, which look fine to me. I then tried to upload an imagepack, but sadly it crashes on the same error as the initial configuration... and that is where I left it at, since I have very very little knowledge about C++.
All help is appreciated.
Last edited by CaptainSlow; 5th May 2020 at 14:42.
Slow and Steady wins the race
kung foo man (5th May 2020)