Latest Posts

Topic: Cannot build master on windows

jmoerschbach
Avatar
Topic Opener
Joined: 2019-09-26, 21:40
Posts: 24
Ranking
Pry about Widelands
Posted at: 2020-06-13, 13:59

Please see reopened https://github.com/widelands/widelands/issues/3783

Am I currently the only one developing on windows? face-wink.png


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-06-13, 19:06

jmoerschbach wrote:

Please see reopened https://github.com/widelands/widelands/issues/3783

Am I currently the only one developing on windows? face-wink.png

no you are not at least me and tino have running windows toolchains.
However I never used compile.sh. I always used the cmake options that appveyor uses and that are described in the wiki as well (hope it is not outdated again)
Yesterday everything worked today I did not test yet


Top Quote
stonerl
Avatar
Joined: 2018-07-30, 00:03
Posts: 327
Ranking
Tribe Member
Posted at: 2020-06-14, 15:49

Maybe we should get compile.sh up and running on Windows again? I'm not of much help here since I don't use windows.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-06-14, 18:11

In my opinion compile.sh should just be a convenience script for non-devolopers to make it easier to compile widelands without much knowledge. IMHO it should only use compile options which are convenient for players, without possibility to provide any other option. This way it can be cleaned up so it will be more maintenance friendly.

Developers, or people who want to contribute the first time, should get a clear description how to build widelands without using compile.sh with all the options available.

face-smile.png


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-06-14, 18:31

-1. If compiling was as easy as typing two or three commands like mkdir build; cd build && cmake .. && make then this would be good. But the required workflow for Widelands would be

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
mkdir build
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug -DOPTION_BUILD_WEBSITE_TOOLS=OFF -DOPTION_BUILD_TRANSLATIONS=ON -DOPTION_BUILD_TESTS=OFF -DOPTION_ASAN=ON -DUSE_XDG=ON
ninja -j7

compared to

./compile.sh --gcc -w

IMHO it would be really annoying to have to type all those build options all the time. Especially when one wants to recompile every few minutes which is quite common when developing stuff.
The compile script with a handful of switches is much more convenient.

Maybe we should get compile.sh up and running on Windows again? I'm not of much help here since I don't use windows.

I don't use it either but +1 for trying to support as many platforms as possible

Edited: 2020-06-14, 18:32

Top Quote
jmoerschbach
Avatar
Topic Opener
Joined: 2019-09-26, 21:40
Posts: 24
Ranking
Pry about Widelands
Posted at: 2020-06-14, 18:54

Actually, I do not think compile.sh is broken on windows, see my comment in the linked github issue (it is rather the sdl installation on my local machine which give troubles). Would be good of course if somebody on windows other than me could confirm compile.sh is working... face-wink.png

Usually I hit a button in CLion and everything works, but when I want to compile from commandline, I like compile.sh very much face-smile.png


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-06-14, 19:57

Nordfriese wrote:

-1. If compiling was as easy as typing two or three commands like mkdir build; cd build && cmake .. && make then this would be good.

I have used QtCreator for some minor development stuff, where compiling is just like jmoerschbach pointed out: One click. I guess other IDEs have similar functionality.

And i think a developer can make his own script to compile widelands with the option he needs. There is no need to face people who only wants to play the current development build with every compile option.

The point is: compile.sh is just a bash script and the more options it takes it gets more complicated to maintain.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-06-14, 20:02

I don't use an IDE, I hack code in a text editor and use the command line to compile and run widelands. If the compile script was removed or lessened in usefulness I would just keep using it anyway. And I guess other people might do that as well. So we might just keep it in the repo and be done with it.

And i think a developer can make his own script to compile widelands with the option he needs. There is no need to face people who only wants to play the current development build with every compile option.

No, for that we have this: https://github.com/widelands/widelands/#compiling-with-our-convenience-script

The point is: compile.sh is just a bash script and the more options it takes it gets more complicated to maintain.

These are options that users will have to pass to CMake manually anyway if they build without this script. I don't see any difference except that -s is easier to memorize than -DOPTION_BUILD_TESTS=OFF


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-06-14, 21:14

Ok I just confirmed Compile.sh is working in my Mingw64 environment. So there are no issues with compile.sh on my system.
However we could discuss whether we might change the default options to everything of except translations and making a release build, cause this is what the usual user wants to have to play.

Personally I'll stick to cmake and ninja as this offers me to seperate build folder from Source folder, which is less error prone in commiting and pushing to git.


Top Quote