The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: Matthew on August 06, 2020, 04:49:44 AM

Title: Cross-compiling for Windows on Linux
Post by: Matthew on August 06, 2020, 04:49:44 AM
Using the guides kindly provided by other Simutransers, I can now build on Linux. But I can only connect to Bridgewater-Brunel using Windows, so I would like to learn how to cross-compile. This might, in the long run, help me to understand why my VM lags so badly. I prefer cross-compilation to compiling on VS because I know that my Linux builds work and if I can test my setup by trying to replicate the B-B builds.

According to an earlier thread (https://forum.simutrans.com/index.php/topic,18149.msg172603.html#msg172603) builds for Bridgewater-Brunel must be built using GCC, even for Windows. My understanding is that B-B does this on Linux.

Presumably it is not just as simple as changing OSTYPE to mingw64 in the config.default file? That's seems too good to be true.  :P Based on the guide to compiling Standard on GCC on Windows (https://forum.simutrans.com/index.php/topic,16688.0.html), it seems that I'll need to install the mingw64 packages. Anything else? I use SDL2 on Linux; is that the best choice for Windows too?

Please point me to an existing thread if one exists, but I could not find one covering this particular combination of platforms.
Title: Re: Cross-compiling for Windows on Linux
Post by: jamespetts on August 07, 2020, 12:26:36 PM
There is a thread on this somewhere, although I cannot remember where. It should be from circa early 2017 if my memory serves me correctly, although it may be a short while before or after that if it does not.

This cross-compiling is set up on the Bridgewater-Brunel server (this is how the nightly Windows builds are produced); but I recall that it took many months of intensive work to get this set up.
Title: Re: Cross-compiling for Windows on Linux
Post by: prissi on August 07, 2020, 02:01:44 PM
Github actions builds standard simutrans on github as release automatically. I am pretty sure that script can be used for experimental as well. (And so does pak192.comic as well, including building its makeobj before.)