Compiling ancient wesnoth versions on debian (lenny)

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Post Reply
demario
Posts: 131
Joined: July 3rd, 2019, 1:05 pm

Compiling ancient wesnoth versions on debian (lenny)

Post by demario »

I had some weird kind of fun :geek: compiling old versions of wesnoth on debian. Since I am not the first to consider such a plan, I am sharing my progress on this. The whole thread is worth checking for those interested. It gives basically the full range of possibilities:
  • run old win binaries on windows (I tried, it works)
  • run old win binaries on GNU/linux (through wine, didn't try)
  • run old linux binaries on old debian (using virtual machine)
  • compile old source on old debian
  • compile old source on new debian (I wouldn't try that!)
As I targeted ancient versions of wesnoth (compilation from source, of course) I settled for debian 5.0.10 on virtualbox. That good old Lenny was worth my trust as I was able to compile from BFW 1.6.5 down to 0.8.10 without much hacking needed to the compilation chain. I am pretty sure it is possible to go further down as in those times the releases were basically monthly updates.

My advice for anyone else who want to try such a journey are:
  • go backwards from later version (error messages may be clearer in later versions)
  • trust the code, only change the compilation
  • in case of failure, check the diff against the next version you compiled before
  • be bold and bolder as you go
Last edited by demario on June 30th, 2021, 12:04 am, edited 1 time in total.
"simply put, it's an old game"T — Cackfiend
demario
Posts: 131
Joined: July 3rd, 2019, 1:05 pm

Compiling old wesnoth versions on debian (jessie)

Post by demario »

Following-up on this, debian Jessie is one candidate (I used version 8.6) in the debian serie to complete the compilation of all old versions of wesnoth to run them on virtualbox. Most default tools available from the installation disks are suitable to cover a range from BFW 1.8 to BFW 1.12

I tested it ok using the cmake compilation tool chain: autoconf, automake, cmake.

The boost version from the disk is 1.55, which might be missing the BOOST_FOREACH definition needed by BFW1.8.6. As they are just header files (do not need compilation) you can just copy them from an old version of boost (boost 1.46, 1.52 seems to be last version have it). It must be placed on the boost library installation path (most probably /usr/include, check it out) with root privileges.

The SDL coming from the disk does *not* meet the wesnoth requirement and you need to compile it by hand. I used the following set of version:
- SDL-1.2.15
- SDL_net-1.2.8
- SDL_ttf-2.0.11 (with FreeType2 libraries+dev installed beforehand)
- SDL_image-1.2.12 (with PNG, JPG libraries+dev installed beforehand)
- SDL_mixer-1.2.12 (with OGG, vorbis libraries+dev installed beforehand)

If the compilation of SDL-1.2.15 fails for you (SDL_x11sym.h:165:92: error: conflicting types for ‘_XData32’), you need to apply a patch for Jessie/BFW 1.8.6 (see details and download it from https://bugs.archlinux.org/task/36179)

The only compilation issue I met with wesnoth source code is with file src/clipboard.cpp where the combination of #ifdef is quite cryptic and maybe not robust enough yet at some early versions of BFW (or failing from the use of virtualbox!?). The only branch of the #ifdef that you need to keep is at the end of the file (starting with #ifndef CLIPBOARD_FUNCS_DEFINED). The fix is basically disabling the clipboard feature (copy text from wesnoth to other desktop programs)

Lastly in order to ease the compilation process (based on your version of g++), you might want to set

Code: Select all

option (ENABLE_STRICT_COMPILATION "Sets the strict compilation mode" ON)
to OFF in ./CMakeLists.txt to avoid issues specific to different C standard (no strict standard compilation checks).

A final word to say that Jessie also supports compilation of BFW 1.14 (but likely the last version), but as it requires SDL2 and maybe some later version of boost (I use boost 1.56 for a reason that I forgot), this is basically a different environment to set (different library path) so that it brings no benefit to set it up on Jessie instead of your current debian version.
"simply put, it's an old game"T — Cackfiend
shevegen
Posts: 497
Joined: June 3rd, 2004, 4:35 pm

Re: Compiling ancient wesnoth versions on debian (lenny)

Post by shevegen »

This would actually be interesting from a historic point of view. I was surprised when I noticed I was registered in 2004 or so already (that's 17 years DAAAAAMN).

I don't even remember how wesnoth used to be in the past. A few screenshots exist from old wesnoth but I can't even tell how playing styles changes over the years. Admittedly I more pay attention to interesting custom campaigns these days, so I don't know how mainline wesnoth is (haven't played the mainline campaigns in a very long time ...).

This is not just an issue with wesnoth alone, by the way, but all old games and also programming languages. I am a ruby users, but I never used ruby 1.0 for instance. I'd love to try it but I can no longer compile it. :(

Thankfully we have scummVM which has expanded its scope and makes older games available. This is not wesnoth-specific, but it would be nice if old code could be preserved with more VM-like simulations in general. Not that I am suggesting wesnoth to invest time into this, but I simply think it is an interesting idea, to study old versions of game in general, including wesnoth. (I don't even know how the first wesnoth releases were ... are any of the ancient guys still active? First release was in 2005 says wikipedia ... but I don't even remember having played the very first release ... wikipedia entry confuses me because if it was released in 2005, why am I registered since 2004? So I think the wikipedia entry must be wrong ... there must have been earlier releases... I don't think I was one of the early players, there are others who are older! I wonder how many of them are still active ... is David still visiting the webforum? Or playing?)

> run old win binaries on GNU/linux (through wine, didn't try)

If you use linux you could try to use older versions. An example for this is GoboLinux, so you just symlink which version you need (but since there
are many interdependencies, this is a bit tedious to do manually, so that should be scripted). NixOS provides an even more sophisticated variant - if you get it to work there, others could reproduce it as-is. Not sure how to do so on debian; I don't like the FHS layout ... but it definitely is possible.
User avatar
Atreides
Posts: 1059
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: Compiling ancient wesnoth versions on debian (lenny)

Post by Atreides »

Sounds like fun. Are any of the old Windows exe's for Win98? I think I saw that in a search. I have a PC that runs win98 still. And where are these old files? A search didn't show up any sites.
User avatar
Pentarctagon
Project Manager
Posts: 5531
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Compiling ancient wesnoth versions on debian (lenny)

Post by Pentarctagon »

Versions back through 1.0 are on SourceForge for Windows. Any earlier and you'll probably need to compile it yourself though.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Compiling ancient wesnoth versions on debian (lenny)

Post by Elvish_Hunter »

Pentarctagon wrote: August 6th, 2021, 4:27 pm Versions back through 1.0 are on SourceForge for Windows. Any earlier and you'll probably need to compile it yourself though.
On SourceForge the oldest version available for Windows is 0.7.11.
However, in this directory there are some older versions available: for Windows, you can go back to release 0.3.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Post Reply