Results 1 to 6 of 6

Thread: Statsgen 2 source code released after 10+ years

  1. #1
    Private CaptainSlow's Avatar
    Join Date
    Nov 2014
    Posts
    75
    Thanks
    38
    Thanked 24 Times in 20 Posts

    Statsgen 2 source code released after 10+ years

    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.



    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 !!
    Slow and Steady wins the race

  2. The Following 2 Users Say Thank You to CaptainSlow For This Useful Post:

    kung foo man (30th April 2020),Mitch (1st May 2020)

  3. #2
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,005
    Thanks
    439
    Thanked 168 Times in 130 Posts
    Can you give an example of the output for cod2?

  4. The Following User Says Thank You to Ni3ls For This Useful Post:

    kung foo man (30th April 2020)

  5. #3
    Private CaptainSlow's Avatar
    Join Date
    Nov 2014
    Posts
    75
    Thanks
    38
    Thanked 24 Times in 20 Posts
    Here are some screenshots for the output of COD2

    Click image for larger version. 

Name:	firefox_SutDy4kekg.png 
Views:	24 
Size:	795.8 KB 
ID:	1611

    Click image for larger version. 

Name:	firefox_Aqm7BTOeJL.png 
Views:	17 
Size:	873.6 KB 
ID:	1612

    Click image for larger version. 

Name:	firefox_cfFckHlxOf.png 
Views:	17 
Size:	452.3 KB 
ID:	1613

    Click image for larger version. 

Name:	firefox_HA6nEJ1oNH.png 
Views:	7 
Size:	519.8 KB 
ID:	1614

    Click image for larger version. 

Name:	firefox_2oCnnYU8DC.png 
Views:	10 
Size:	889.8 KB 
ID:	1615
    Slow and Steady wins the race

  6. The Following 2 Users Say Thank You to CaptainSlow For This Useful Post:

    kung foo man (30th April 2020),Mitch (1st May 2020)

  7. #4
    Private
    Join Date
    Jul 2016
    Posts
    38
    Thanks
    0
    Thanked 19 Times in 19 Posts
    How is the installation for Linux?

  8. #5
    Private CaptainSlow's Avatar
    Join Date
    Nov 2014
    Posts
    75
    Thanks
    38
    Thanked 24 Times in 20 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

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

    kung foo man (5th May 2020)

  10. #6
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    1,971
    Thanks
    1,929
    Thanked 1,065 Times in 740 Posts
    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
    timescale 0.01

Posting Permissions

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