Help with compiling master on Windows 10 (msys2)

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

User avatar
Lord-Knightmare
Discord Moderator
Posts: 1934
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Help with compiling master on Windows 10 (msys2)

Post by Lord-Knightmare »

gnombat wrote: March 7th, 2021, 10:46 pm It looks like that --config=force option is back... :shock:

Again, I recommend just avoiding that option, it's been known to have bugs in the past. Just run that rm -fr build/ .scons-option-cache command, it's just as good as using --config=force (but without the bugs), and then run the SCons command without --config=force and you should get a clean build.
I followed your procedure and ran this as the command

Code: Select all

scons arch=native sdldir=/mingw64/\include/\SDL2 boostdir=/mingw64/\include/\boost boostlibdir=/mingw64/\bin boost_suffix=-mt --option-cache="" notifications=false
After exactly 60 minutes (I had jobs=3), I have gotten this:

Code: Select all

scons: done building targets.
Does it mean...it worked?
Now, how do I run it? Or, what is the next step?

EDIT:
After searching up the forums and wiki a bit, I guess the final command is:

Code: Select all

./wesnoth
And, it worked! :D :D :D :D

Thank you, gnombat and Pentarctagon!
User avatar
max_torch
Developer
Posts: 404
Joined: July 31st, 2011, 5:54 pm

Re: Help with compiling master on Windows 10 (msys2)

Post by max_torch »

What is the motivation behind compiling Wesnoth yourself? Just curious really.
gnombat
Posts: 453
Joined: June 10th, 2010, 8:49 pm

Re: Help with compiling master on Windows 10 (msys2)

Post by gnombat »

max_torch wrote: March 13th, 2021, 2:28 pm What is the motivation behind compiling Wesnoth yourself? Just curious really.
If you want to modify the code, either to contribute changes to the project or just for your own personal use, you will probably need to compile it yourself.

Even if you don't want to modify the code, compiling it yourself can be useful if you want to keep up with the latest version:
  1. Suppose you want to update Wesnoth from one release to the next release. If you're using the binary Windows installer, you will have to download a full 400+ megabyte file for each new release. If you're using the Git source code repository, you can update it using git pull which will download only the changes that have been made since the last time you updated it. Typically this will be much smaller - maybe 10 or 20 megabytes of changes between releases. (Yet another alternative is to use the Steam version.)
  2. Suppose you want the very latest version of Wesnoth in the Git source code repository, including all changes since the last release. (For example, as of right now 1.15.10 is the latest release, but there have been 140 separate changes to the code since then.) In that case you will probably need to compile it yourself. (If you're on Linux you might be able to use the nightly Flatpak build instead.)
User avatar
Lord-Knightmare
Discord Moderator
Posts: 1934
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Help with compiling master on Windows 10 (msys2)

Post by Lord-Knightmare »

Not sure what happened this time but now, this does not work anymore.

Running this

Code: Select all

scons arch=native sdldir=/mingw64 boostdir=/mingw64/\include/\boost boostlibdir=/mingw64/\bin boost_suffix=-mt extra_flags_config="-I/mingw64/include/pango-1.0 -I/mingw64/include/glib-2.0 -I/mingw64/lib/glib-2.0/include -I/mingw64/include/harfbuzz -I/mingw64/include/cairo -I/mingw64/include/dbus-1.0 -I/mingw64/lib/dbus-1.0/include" nls=false --option-cache="" notifications=false
I got these negatives and the build terminated

Code: Select all

Checking for audio support in SDL... (cached) no
Checking for PNG support in SDL... (cached) no
Checking for JPG support in SDL... (cached) no
Checking for WEBP support in SDL... (cached) no
Full Output:
User avatar
Pentarctagon
Project Manager
Posts: 5046
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Help with compiling master on Windows 10 (msys2)

Post by Pentarctagon »

This is the same issue you reported on github, right?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Lord-Knightmare
Discord Moderator
Posts: 1934
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Help with compiling master on Windows 10 (msys2)

Post by Lord-Knightmare »

Pentarctagon wrote: May 11th, 2022, 1:50 pm This is the same issue you reported on github, right?
yes. since those py functions seem right but not sure why the file is not being passed. Seems similar to this now viewtopic.php?t=54889
User avatar
Pentarctagon
Project Manager
Posts: 5046
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Help with compiling master on Windows 10 (msys2)

Post by Pentarctagon »

One thing you can do is check is whether the file reported as not existing actually exists at that location using the msys2 terminal, since that's also what's being used to build.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Lord-Knightmare
Discord Moderator
Posts: 1934
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Help with compiling master on Windows 10 (msys2)

Post by Lord-Knightmare »

I gave up, so i got it to build using very dirty hack:

In sdl.py file, I did this:

Code: Select all

        if result:
            context.Result("yes")
            return True
        else:
            context.Result("no")
            return True
and it started to build and works fine now. I know this is by no means a good approach..but it works...so yay?
Post Reply