Latest Posts

Topic: A mixed bag on compiling...

SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-05-21, 12:16
  1. renaming lua51.dll to lua.dll and lua51.lib to lua.lib might help
  2. you ran cmake via the compile_and_run.sh script: It runs cmake and then make.
Edited: 2010-05-21, 12:16

Top Quote
kraileth

Topic Opener
Joined: 2010-03-14, 15:34
Posts: 59
Ranking
Likes to be here
Posted at: 2010-05-21, 13:30

Thanks for your help, everybody and especially thanks for your pacience, timowi!

Linking worked now that I renamed the two files as SirVer suggested. I did however use neither cmake myself nor did I use build_and_run.sh here. I just called make all from the /win32/mingw directory. I think about setting up a fresh VM with windows and try it again step by step. And then, I guess, the wiki page for building with windows could use a little update. face-wink.png

I also had to rename libintl-8.dll to just libintl.dll or the new exe would complain.

Edited: 2010-05-21, 13:33

Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-05-21, 15:17

kraileth, now that you have a feeling about this whole build issue, could you try with cmake. this mingw directory will vanish soon as cmake is the only way to build we will support in the future.


Top Quote
kraileth

Topic Opener
Joined: 2010-03-14, 15:34
Posts: 59
Ranking
Likes to be here
Posted at: 2010-05-21, 17:23

I'll get a new VM with windows set up this evening. Then I'll give it a try.

Just one question: How do I start with it? I'll install everything like I have done before, including LUA. And then? Will running build_and_run.sh already do the trick? As far as I understood, that will already make use of cmake. I first thought that this shell script was for linux only and with windows the game had to be compiled another way. But if that's the new universal way to build, that's wonderful of course.


Top Quote
kraileth

Topic Opener
Joined: 2010-03-14, 15:34
Posts: 59
Ranking
Likes to be here
Posted at: 2010-05-22, 20:54

Sorry for the double-post, but I'm afraid that I have to ask for help again. I've updated the wiki page on windows building quite a bit, but I'm stuck now and not done yet.

First thing is that I now need to add the LUA part to the tutorial. And while I guess, Tino's way works, I really don't feel like explaining the differences about two character
on windows and one char brake on unix systems and then pointing the reader to an editor capable of displaying the makefile the right way... Is there a way to make using some parameters and without having to manually edit the makefile?

And second thing is that it would be nice to have some feedback on what I did on the wiki page. I'm not used to the system, yet, and it would be good if somebody could check what I'm doing, just in case I do anything wrong.


Top Quote
timowi

Joined: 2009-11-01, 22:08
Posts: 146
Ranking
At home in WL-forums
Location: Germany
Posted at: 2010-05-23, 10:54

Hi kraileth,

many thank for updating the build instructions.

As SirVer has written the described way (Makefile in /build/win32/mingw/) is outdated and will be removed soon. The right way is to create a directory and call cmake. Have a look in the build_and_run.sh. This file is a good start to see how cmake is used. The symlinks/copying/moving is not necessary. The build_and_run script requires a bash or similar shell. So under windows you can go without it. This script does the essential the following:

mkdir build/compile
cd build/compile
cmake WL_PORTABLE=true ../..
make

The rest is more or less for convenience only. (Avoid unnecessary copying, move executable to source root, get locales working in source root). Of course you have to install cmake to use this face-smile.png I am not sure about cmake under windows but I think the cmake command line program is there. Perhaps there is even a gui under windows?

Timo


Top Quote
kraileth

Topic Opener
Joined: 2010-03-14, 15:34
Posts: 59
Ranking
Likes to be here
Posted at: 2010-05-23, 11:08

@timowi:

I haven't touched the last three categories, yet. That's why there's no mention of cmake or anything like that. I'll have to look where to get it somewhere soon, since it looks like MYSYS doesn't know the command right now.

Here's what I intend to do with the wiki page:

  • Introducing bzr to always get the newest trunk source
  • Getting and then compiling with cmake
  • Update the "needed dlls" section.

But what I first need is a way to compile LUA without having to manually edit the makefile. Since LUA is another requirement I'll have to cover that before moving on to adding how to use bzr. Until a solution is found for that I'm stuck unfortunately.


Top Quote
ixprefect

Joined: 2009-02-27, 13:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-05-23, 14:06

Could you explain what the magic "WL_PORTABLE" incantation does? I've never used it so far...


Top Quote
timowi

Joined: 2009-11-01, 22:08
Posts: 146
Ranking
At home in WL-forums
Location: Germany
Posted at: 2010-05-24, 11:13

@ixprefect: WL_PORTABLE just set DATADIR=. INSTALL*DIR=. LOCALEDIR=locale which allow to run the executable simply from the base directory of the data files. (For example the base of the source directory). This allows to run from the directory without installing. As far as I know this is the only way it works on windows. Maybe this behavior is even standard now. Better ask QCS about this.

Timo


Top Quote
ixprefect

Joined: 2009-02-27, 13:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-05-25, 10:43

Hmm, I always run without installing, and I've never set WL_PORTABLE explicitly. So it seems like the default behavior has changed.


Top Quote