Latest Posts

Topic: Appveyor broken

hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2645
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-07-19, 10:15

kaputtnik wrote:

Appveyor fails again because missing dll:

Error on line 106 in c:\projects\widelands\utils\win32\innosetup\Widelands.iss: Source file "C:\msys64\mingw64\bin\libpdcurses.dll" does not exist.

this is due to MSYS2 went back to ncurses instead of pdcurses we need to undo our changes to cope with that as well.
basically it is just changing libpdcurses.dll in line 106 of "utils\win32\innosetup\Widelands.iss" to libtermcap-0.dll


Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2645
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-07-19, 10:17

Furthermore it might be worth trying to remove the --nodeps command from line 22 in appveyor.yml as well


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: 2019-07-19, 15:21

hessenfarmer wrote:

kaputtnik wrote:

Appveyor fails again because missing dll:

Error on line 106 in c:\projects\widelands\utils\win32\innosetup\Widelands.iss: Source file "C:\msys64\mingw64\bin\libpdcurses.dll" does not exist.

this is due to MSYS2 went back to ncurses instead of pdcurses we need to undo our changes to cope with that as well.
basically it is just changing libpdcurses.dll in line 106 of "utils\win32\innosetup\Widelands.iss" to libtermcap-0.dll

Thanks, i've changed it in this branch: https://code.launchpad.net/~widelands-dev/widelands/bug_1836107_lGL/+merge/370334

Didn't touched the thing with --nodeps though


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

Top Quote
JJG
Avatar
Joined: 2017-07-30, 03:48
Posts: 6
Ranking
Pry about Widelands
Posted at: 2019-11-20, 00:48

This thread seems to be about missing dlls, while compiling on windows. Since that was my first error message, I'm posting it here.

I'm following BuildingWidelandsUnderWindowsNew from the top, git fork, with Debug installing into D: drive, so I had to change some path names. I did the path export, downgraded boost, cmake worked, ninja worked, tests worked. I put the path export into the .login file so I wouldn't have to repeat it everytime.

The first time I ran it, there were three popups about missing various dlls. The first one was for GLEW, so I repeated(?) the pacman for glew I didn't write down the other two.
Somewhere there was a complaint about missing data directory, so I created that.

The next time I ran it, using windows console to start mingw64 console first, I get this error from the calling console, no popups.

joelg@DESKTOP-1V4FGF6 MINGW64 ~/widelands/build/src
$ ./widelands.exe
This is Widelands Version r1[6118f81@Wide_jj_branch] (Debug)
Log output will be written to: C:\Users\joelg\.widelands\stdout.txt
terminate called after throwing an instance of 'LuaScriptNotExistingError'
  what():  [../src/scripting/lua_errors.cc:22] The script 'i18n\fonts.lua' was not found!

stdout.txt file shows this:
This is Widelands Version r1[6118f81@Wide_jj_branch] (Debug)
Set home directory: C:\Users\joelg\.widelands
Set configuration file: C:\Users\joelg\.widelands/config
Widelands executable directory: D:\msys64\home\joelg\widelands\build\src
Adding directory: D:\msys64\home\joelg\widelands\build\src\data
selected language: (system language)

I looked at src/scripting/lua_errors.cc but it doesn't seem to be a text file.
I searched for 'fonts' from build/src and didn't find any.

I searched for i18n and found 
build/src/base/CMakeFiles/base_i18n.dir/libbase_i18n.a
build/src/base/CMakeFiles/base_i18n.dir/i18n.cc


Update:  I repeated  cmake
 ~/widelands/build
$ cmake -G "Ninja" -DCMAKE_C_COMPILER=D:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=D:/msys64/mingw64/bin/g++.exe -DCMAKE_BUILD_TYPE=Release -DOPTION_USE_GLBINDING=OFF -DOPTION_BUILD_WEBSITE_TOOLS=OFF -DOPTION_ASAN=OFF  -DOPTION_BUILD_TRANSLATIONS=OFF ..

and ninja,
the new error is slightly different.
 ~/widelands/build/src
$ ./widelands.exe
This is Widelands Version r1[6118f81@Wide_jj_branch] (Release)
Log output will be written to: C:\Users\joelg\.widelands\stdout.txt

Caught exception (of type '25LuaScriptNotExistingError') in outermost handler!
The exception said: [../src/scripting/lua_errors.cc:22] The script 'i18n\fonts.lua' was not found!

This should not happen. Please file a bug report on version r16118f81@Wide_jj_branch. and remember to specify your operating system.

Suggestions?

Edited: 2020-01-05, 17:19

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

Moin JJG and welcome to the forum face-smile.png

Somewhere there was a complaint about missing data directory, so I created that.

I guess here´s the mistake – the data directory is the folder where all the files required by the game are kept. They are contained in the download. If Widelands cannot find them, you need to tell it where they are by starting widelands with the option --datadir=D:\Path\To\Downloaded\Folder\widelands\data. Does that work?

EDIT: By default, Widelands assumes that the executable is located in the parent folder of the data directory. I saw you are running it from widelands/build/src/. If you move the widelands.exe up by 2 directory levels (mv widelands.exe ..\..), it should work without the option above…

Edited: 2019-11-20, 06:16

Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2645
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-11-20, 11:05

Hi JJG,
the reason for the errors is exactly what Nordfriese describes. You can't run widelands.exe directly from the Build folder. But you don't need to run it from the msys console as well. Widelands can be run from any folder which contains the data directory from the build process (build process adds translations to the datadir) and all dll needed. this (collecting all needed files for the widelands folder) is exactly what is done on our Continous Integration environment on appveyor by utilisation of InnoSetup and the corresponding ISS Script located in /utils/win32/innosetup/.
For convenience I normally install a latest master build from appveyor and just copy my freshly build widelands.exe in this folder so I don't need to collect everything from scratch. As appveyor works pretty good building yourself is only necessary to test own chages to the code. For just playing and testing I prefer using the latest appveyor builds.
for your MSYS2 environment downgrading boost is currently not necessary if you use the -DBoost_NO_BOOST_CMAKE=ON option on cmake. I didn't have the time to update the wiki yet. However looking into the appveyor.yml is always good to see the currently working cmake options.


Top Quote
JJG
Avatar
Joined: 2017-07-30, 03:48
Posts: 6
Ranking
Pry about Widelands
Posted at: 2019-11-21, 03:55

Thanks Nordfriese and hessenfarmer,
I'm out of practice with this type of thing.; not familiar with appveyor or innosetup

hessenfarmers comment about NOT needing to run from msys console and then
The first solution "mv widelands.exe ..\.." did not work, in that I have popup errors for missing dlls
glew32.dll
libicuu65.dll
libintl-d.dll
libpng16-16.dll
.. did NOT work when running it by clicking on it from the windows files browser.

Since I installed the dlls inside msys/mingw I did try calling it from the mingw64 console.

So I tried executing mingw64.exe from the file browser to get a console,
then cd to the widelands directory where I moved the widelands.exe executable
DID work, past the splash page, I can load previously started games saved from my previous executable download.
Is it possible that both my new build and my previous downloaded executable are using the same app data folder?
The loading page seemed to take a log longer than usual though.

hesssenfarmer: "this (collecting all needed files for the widelands folder) is exactly what is done on our Continous Integration environment on appveyor by utilisation of InnoSetup and the corresponding ISS Script located in /utils/win32/innosetup/."
I don't know what that means. from what console and commandline would you run Widelands.iss script, and why/when do you need to do that.

I started new topic in Forums » Player Forums » Game Suggestions
Fixing "Calculation Needed"
for the my reasons to test my own code dev.


Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2645
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-11-21, 08:50

Hi JJG,
As you have seen on windows widelands needs a lot of dll if compiled with dynamic linking. From our installer provided on appveyor these dll are copied to the widelands folder as well as the data dir is copied to that folder.
Innosetup is a tool to compile a selfextracting installer.exe which is the artifact that is provided on Appveyor after a successful build. If you run this installer all the files collected there will be written to a specified widelands folder plus some links will be created.
Innosetup needs a file which tells it what files to collect into this installer.exe. This is the content of this .iss script to be used by InnoSetup.

As you have figured out widelands is always using the same user folder to save games and maps and to write the stout.txt. This is located at <Username>/.widelands.

To get a normal runnable windows installation (instead of running it out of MSYS) I normally go to the appveyor summary page https://ci.appveyor.com/project/widelands-dev/widelands/history and pick the latest master branch (you need to check the little grey font to get the correct one) then choose a build (x64 or x86, release or debug) and click on artifacts tab. there you can find the installer. After installing this into a new folder I copy my selfcompiled widelands.exe to that folder to test it. (if you have changed something in the data folder you should copy that as well or you can use the datadir option to run with a different datadir.

Anyhow if you have any specific questions don't hesitate to ask. We are always glad to see new devs on the project and try to support them best we can.
BTW: I updated the Build under Windows page yesterday


Top Quote