Latest Posts

Topic: Building WL on win 10

hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 429
Ranking
Tribe Member
Location: Bavaria
Posted at: 2018-08-26, 01:12

looks good so far. only that it is recommendable to use the msys2 shell related to the mingw toolchain due to most of the path settings optimized for them. so use the mingw64.exe or the mingw32.exe instead of msys2.exe

After I ahve figured out how to use innosetup I plan to add the instructions on how to make an installer as well. Currently one need to select the dll by hand or use them from an existing installation.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2626
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-08-26, 12:13

hessenfarmer wrote:

looks good so far. only that it is recommendable to use the msys2 shell related to the mingw toolchain due to most of the path settings optimized for them. so use the mingw64.exe or the mingw32.exe instead of msys2.exe

Important point - using the .cmd actually confused FindICU.cmake, because I have a dll sitting in C:\Windows\System32. I have changed the instructions.


Busy indexing nil values

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 429
Ranking
Tribe Member
Location: Bavaria
Posted at: 2018-08-26, 16:33

another advantage of using the mingw64.exe is that it is automatically setting the path to the mingw bin folder. So you don't have to do the path export everytime. So I think this should be standard to use the optimized shell.

However we should probably add some explanation about the cmake options used. especially we should explain how to change the compiled version and the usage of glbinding or glew. Perhaps we could link to the linux instructions where they are explained.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2626
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-08-26, 18:17

+1 to linking to the CMake page. We should also link to the BzrPrimer.


Busy indexing nil values

Top Quote
Tino
Joined: 2009-02-20, 17:05
Posts: 246
Ranking
Widelands-Forum-Junkie
Location: Somewhere in Germany...
Posted at: 2018-08-28, 12:09

hessenfarmer wrote:

After I ahve figured out how to use innosetup I plan to add the instructions on how to make an installer as well. Currently one need to select the dll by hand or use them from an existing installation.

The manual selecting of the needed dlls is very error prone, as you can see with the appveyor builds: often with new versions the names and/or dependencies change and you have to remove/change/update dlls...

My suggestion (if anyone wants to dive deeper into this): Figure out, how to do static builds, so you'll have only the widelands.exe which needs to be put into the installer.

I've done this with the Nuwen distro, but only in a manual way (and every distro upgrade is a pita...):

  • Compile all dependencies yourself and create only static libs and disable dynamic libs

  • Use the CMAKE GUI do change all deps from dynamic to static,

  • Manually complete the linker statement (CMAKE_CXX_STANDARD_LIBRARIES)

The main problem is (regarding the msys2 distro) that although every library is available dynamic and static, all the cmake scripts prefer the dynamic version. Only Boost is linked statically (we have a switch for this in our CMAKE file). So if anyone figures out how to teach CMAKE to prefer static libs (for SDL,ICU...) we would just have to package the .exe and no "dll hell".

I've tried this for years now, but never succeeded (apart from "removing" the dynamic libs and manually fiddling with the linking...)


Top Quote