Results 1 to 6 of 6

Thread: Statsgen 2 source code released after 10+ years

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private
    Join Date
    Jul 2016
    Posts
    38
    Thanks
    0
    Thanked 19 Times in 19 Posts
    How is the installation for Linux?

  2. #2
    Private CaptainSlow's Avatar
    Join Date
    Nov 2014
    Posts
    76
    Thanks
    38
    Thanked 28 Times in 23 Posts
    Quote Originally Posted by bulent View Post
    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

  3. The Following User Says Thank You to CaptainSlow For This Useful Post:

    kung foo man (5th May 2020)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •