PDA

View Full Version : Statsgen 2 source code released after 10+ years



CaptainSlow
27th April 2020, 21:49
Do you guys remember Statsgen 2? It's a Statistics Generator for COD 1/2/4/5, MOHAA, Spearhead, Wolfenstein/Enemy Territory and Quake Wars.
Statsgen automatically downloads the server logfiles, processes them using a flexible template system, and then transmits the resultant webpages to the webserver. Templating allows the pages produced to be very flexible to fit in with the style of your clan website.

https://i.imgur.com/IZXEtW2.png

I managed to get a hold of the source code a year ago and got permission from the original author Shaun Jackson a.k.a. Nazarine to redistribute it. I just uploaded it to Github: https://github.com/Freekers/statsgen

Enjoy !!

Ni3ls
28th April 2020, 10:33
Can you give an example of the output for cod2?

CaptainSlow
29th April 2020, 08:36
Here are some screenshots for the output of COD2 :)

1611

1612

1613

1614

1615

bulent
3rd May 2020, 02:52
How is the installation for Linux?

CaptainSlow
4th May 2020, 22:05
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.

kung foo man
5th May 2020, 10:58
1) Windows: Compile via Visual Studio Community 2017 (~whatever compiler happens to work) or just download latest release: https://github.com/Freekers/statsgen/releases
2) Linux: unp statsgen2_v1.10.0.zip
3) Linux: wine statsgen2.exe
4) Win?

Compiling C/C++ projects which depend on huge frameworks like wxWidgets is quite some aids. It usually drags in all sorts of other dependencies aswell (like CMake e.g.)

Instead of "getting stuff done", programmers end up in a configuration hell... so wine is often quite a reliable shortcut