Latest Posts

Topic: Building WL on win 10

hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
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: 3324
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
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
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: 3324
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: 252
Ranking
Tribe Member
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
fuchur

Joined: 2009-10-07, 14:01
Posts: 186
Ranking
Widelands-Forum-Junkie
Location: Germany
Posted at: 2019-05-10, 22:13

Just a few comments to the excellent build instructions.

  • After executing pacman -S mingw-w64-x86_64-toolchain to install the toolchain I got a list of about 15 possible packages (?). As I didn't know which ones were really necessary I installed all of them.

  • I see the cmake option for Glew vs. GLbinding. Are there any advantages of using one or the other?

Apart from that I'm looking forward for the first build as soon I have a solution for the cmake errors (see https://wl.widelands.org/forum/post/27897/).


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-11, 12:45

fuchur wrote:

  • After executing pacman -S mingw-w64-x86_64-toolchain to install the toolchain I got a list of about 15 possible packages (?). As I didn't know which ones were really necessary I installed all of them.

That's what I usually do too, so I won't have to deal with any errors because something is missing. I decided that testing what we really need would be too time-consuming for me.

  • I see the cmake option for Glew vs. GLbinding. Are there any advantages of using one or the other?

SirVer implemented that when he modernized the software renderer. I never researched the details myself.


Busy indexing nil values

Top Quote