The International Simutrans Forum


Author Topic: Cross-compiling for Windows on Linux  (Read 445 times)

0 Members and 1 Guest are viewing this topic.

Offline Matthew

  • Devotee
  • *
  • Posts: 560
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Cross-compiling for Windows on Linux
« 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 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, 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.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20776
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cross-compiling for Windows on Linux
« Reply #1 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10642
  • Languages: De,EN,JP
Re: Cross-compiling for Windows on Linux
« Reply #2 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.)