How to compile Wesnoth on Windows with Dev-Cpp, Code::Blocks

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

Moderator: Forum Moderators

Locked
vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by vicza »

Hmm, it was successful. Even strange. :) It works, thank you.

But what about national languages support? I remember, when I tried to compile it some months ago, it was said install also gettext. But there were no mention of it in the current guides. Without it I will have no lang. support?
copy libintl3.dll and iconv.dll from official relase
I have them already, they are identical to these from 1.4.1, but languages still don't switch.


P.S. And, btw, how do you install it? Every time manually copy required directories to destination location, and then manually delete all .svn from it? Or there is some script for this?
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by Mist »

The foregin languages instruction assume you're using official tarball, that is moving compiled exe to tha tarball. To have it other way you need to create .mo files from .po (I think, I was never really interested in gettext), I think Yogi did comit vbs scripts for that. Libintl and libiconv are only required to have the language switching working properly. Gettext is only needed for .mo file preparation.

Again, check the vbs scripts commited by Yogi to \packaging (or something like that, I can't recall the name now) directory, I run svn exes straight from the checkout root and copy tagged exes to downloaded tarballs.
Somewhere, between the sacred silence and sleep.
Disorder.
vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by vicza »

Mist wrote:The foregin languages instruction assume you're using official tarball, that is moving compiled exe to tha tarball. To have it other way you need to create .mo files from .po
Oh, yes, I completely forgot that they should be mo, not po. And another directory structure. What a stupid mistake. :oops: Now it works, of course.
Again, check the vbs scripts commited by Yogi to \packaging
I checked it already. I works, but it copies .svn directories, too. :(
and copy tagged exes to downloaded tarballs.
Hmm, that's the idea... :)
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

vicza wrote:
and copy tagged exes to downloaded tarballs.
Hmm, that's the idea... :)
Then don't forget to copy new data folders, created po, ...
I copied the whole release folder, made a checkout to this folder, compile the svn stuff and everything works fine. Sometimes I look for the po-files, compile the used one's too and I'm fine.
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by AI »

vicza wrote:
Again, check the vbs scripts commited by Yogi to \packaging
I checked it already. I works, but it copies .svn directories, too. :(

Code: Select all

find . -name '.svn' | xargs rm -rf
Use with care.

Will remove any directories named .svn in the tree. Used (typed) incorrectly, can hose all the data you can delete.
vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by vicza »

AI wrote:

Code: Select all

find . -name '.svn' | xargs rm -rf
rm -rf ? In Windows?? :shock: :wink:

In fact, it's much easy in Windows. Just smth. like

Code: Select all

xcopy /S G:\src\wesnoth G:\games\wesnoth-svn
These .svn files are hidden, and xcopy doesn't copy them by default.

...

BTW, I've looked in svn-trunk, and saw them 2 dev files: wesnoth.dev and wesnoth_gcc4.dev. Not that I wanted to compile trunk just now, but still, who can explain, what's the difference between them?
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

*_gcc4.dev are newer and remade for working with gcc4. The other one's are for gcc3.
The guideline here uses gcc4, so you should use these files.
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

New dev-file is missing in svn.
vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by vicza »

With this dev, it's first time the version 1.5 was successfully compiled on my machine. It even works. But:

Code: Select all

20.05.2008  05:02       163 335 413 wesnoth_gcc4.exe
Isn't it a bit tooo big? :o :hmm:
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by Mist »

You didn't tick 'strip executable' in linker options. That's the usual size with full debug info, nevertheles perfectly fine otherwise ;)
Somewhere, between the sacred silence and sleep.
Disorder.
vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by vicza »

O, yes, I see. Strange, though, that for 1.4 it was set to 'yes'.
arielbys
Posts: 51
Joined: May 6th, 2008, 2:57 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by arielbys »

Mist wrote: Step 4 :

Visit GnuWin32 on sourceforge. Get gettext, zlib, freetype, libpng. Unpack, move \include and \lib directories to devcpp. Rename libz.dll.a to libzdll.a. Excavate \include\freetype2\freetype directory (with contents inside) to \include.
...

Step 6 :

Get python 2.4. Unpack, copy as above
.
Python is an application. How i can copy only the lib and include?

There 527 files i won't be able of running.
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

See the 2nd guide:
McShark wrote:The even more and easier detailed guide.
Get python : python-2.5.2.msi
Install, find the directory you installed to.
Copy all .h files from \include to c:\dev-cpp\include
Copy libpython25.a from \libs to c:\dev-cpp\lib
BTW: Current wesnoth_gcc4.dev from svn works fine and results in wesnoth_gcc4.exe with a size round about 7MB

Updated phyton link: python-3.1.2.msi
Last edited by McShark on April 6th, 2010, 2:30 pm, edited 1 time in total.
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

Two months descriptions just passed away, because of the server crash. Maybe the thing's that I can remember are enough. Do the follwing if you did the steps mentioned in the previous posts:
  1. First you need to do an install of the current wesnoth version (necessary because of changed folder names and stuff like this).
  2. Download fribidi-0.10.9 (newer versions do not work!). Unpack it, rename the folder fribidi-0.10.9 to fribidi and put it into dev-cpp\include.
  3. Then download and unpack the gtk+-bundle. Rename all *.dll.a files from lib to *.a and put them into dev-cpp\lib, then copy bin\freetype6.dll to wesnoth\libfreetype-6.dll, copy intl.dll, libcairo-2.dll, libglib-2.0-0.dll, libgobject-2.0-0.dll, libpango-1.0-0.dll, libpangocairo-1.0-0.dll, libpangoft2-1.0-0.dll, libpangowin32-1.0-0.dll, libpng14-14.dll, zlib1.dll to wesnoth, copy all files and folders of include\glib-2.0 to dev-cpp\include, copy \include\pango-1.0\pango to dev-cpp\include\pango
  4. Compile wesnoth with the attached wesnoth.cbp from svn/at end of this topic][/size]
If there's something missing just write here and I think my memory will come back...
Last edited by McShark on April 6th, 2010, 2:40 pm, edited 6 times in total.
BroodKiller
Posts: 30
Joined: August 12th, 2008, 9:24 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by BroodKiller »

Using a weird combination of all the methods presented here I managed to get the current trunk to compile with no errors on me.Yay! My problem arise on link - it complains about "lfribidi" which is nowhere to be found. I've included the proper header files, but there is no lib, and if it's supposed to be generated on the fly somehow, it isn't. Skipping the problem by skipping fribidi completely doesn't work either. I searched in web but to no avail. Should it be prebuilt prior to the actual compile of wesnoth? I guess I am missing something stupid here, so if that's the case, please forgive me, it's late and I've spent the entire day trying to get wesnoth to work ;) Any help will be appreciated, thank you.
Clean...Simple...Devious...I like it
Locked