Jump to content
Eternal Lands Official Forums
Lachesis

Cvs Compilation Guide (windows)

Recommended Posts

Hi guys,

 

players often ask how to install the client from CVS on windows. Unfortunately, I have no idea how this works, but IIRC some of you are windows programmers, so would you be so kind to set up a guide for them? There would be two things to consider: setting up the build environment and getting the CVS source, compiling and installing it. Thank you very much.

 

With regards

Lachesis

Share this post


Link to post
Share on other sites

Get TortoiseCVS

Then from Explorer you can create a CVS repository on your hdd.

After that, you will need DevC++ (or VC, or whatever), and all the libraries we are using.

Share this post


Link to post
Share on other sites

I think it would be much appreciated when we could get a slightly more detailed guide ;) If I imagine I never compiled anything, I'd wonder where to get the mentioned tools, what versions to choose, what a CVS repository is, I would not know what to do with it, I would not know what DevC++ or VC means and what libraries I needed, where to get and how to install them. Can someone gather that information? Thank you a lot!

 

With regards

Lachesis

Share this post


Link to post
Share on other sites

This is my attempt at making a windows CVS compilation guide. I finally got the code to compile last night after a lot of trial and error. These are most of the steps that I followed. It may not be 100% correct and I might be missing a few things. This guide assumes you will be using Visual Studio.NET and Windows. Most of this should also work for Visual Studio 6. If you use Dev C++ I don't think this will work for you.

 

1. Get a CVS program and CVS code I prefer WinCvs (3.48 mb). Next, install both exe files that come with that package (if you got wincvs). Start up your CVS and don't worry if it nags you about python because you don't need it. Then go to the command prompt part at the bottom and type:

 

cvs -d:pserver:anonymous@cvs.elc.berlios.de:/cvsroot/elc login

 

cvs -z3 -d:pserver:anonymous@cvs.elc.berlios.de:/cvsroot/elc co modulename

 

Fill in modulename with "elc" without quotes. Now you should have a complete set of the source code and the folder called actor_defs which will be very important later.

 

2. Get the libraries

You will need 6 libraries and an OpenGL SDK to compile the code. Get the win32 versions of libxml, OggVorbis, OpenAL, iconv, SDL, and SDL_net. You will also need Glut which is part of OpenGL. Here are the versions I got to compile Eternal Lands 1.0.1:

libxml2-2.6.19.win32 (1.40 mb)

OggVorbis-win32sdk-1.0.1 (2.27 mb)

OpenAL SDK (version 1.0) (8.50 mb)

iconv-1.9.1.win32 (1.21 mb)

SDL-devel-1.2.8-VC6 (546 kb)

SDL_net-devel-1.2.5-VC6 (21.1 kb)

I also got glut-3.7.6-bin (117 kb) since the OpenGL sdk I had did not come with Glut.

 

Go to the OpenGL page to figure out how to get the OpenGL SDK if it is not already installed.

 

3. "Install" Libraries and set paths

Now you need to put all the .h files from those into a folder called "include". A lot of those packages already have their .h files in a folder named that so just copy them all over. Then you will need another folder called "lib". Put all .lib and .dll files in there. Now you need to set the path in your compiler so that it knows where all of these files are. In Visual Studio.NET go to Tools->Options->Projects->VC ++ Directories. Then add the path to your include file in the include section and the path to your lib file in the libraries section.

 

4. Open the elc.dsw file and compile.

In VC.NET it will complain that elc.dsw is a VC6 format and if you want to convert to VC.NET format. Click yes. Now when you go to open your project file for EL always open elc.sln.

Don't worry about the map editor code because chances are you don't need it. I couldn't get it to compile so you will probably have trouble with it also.

Now make sure cal3dwrap.c and cal3dwrap.h are removed from your project (called a solution in .NET). You do not want those files because right now they will give you errors.

 

This part is very important if you are using Visual Studio.NET. Open global.h and type

#define inline __inline

Put that after the line: #define __GLOBAL_H__

 

It seems to be nice to include elc_private.rc to your project (solution) although it is probably not necessary. It looks like it adds the right icon for the exe file once it is created.

 

You will probably want to compile the EL client using the Debug setting the first time (or if you want to debug the code). You could also compile it in Release mode if you know what you are doing. You will get better performance from Release.

 

Also you may need to compile with the /D "ELC" flag set in the Property Pages under Command Line. I think mine worked without it though. Then, just compile/link the code.

 

5. Clean up

Now you should have a compiled exe. It should be in a folder called Debug or Release where ever your eternal lands CVS code is. Copy that exe file to where ever you have eternal lands installed. If you compiled in Debug mode you will need some extra .dll files in your EL game directory. Eternal Lands will nag you until you have the right .dll files. The debug dll files start with the same name but end with _d.dll so they should be easy to find.

 

And now the MOST IMPORTANT step is to COPY the folder called actor_defs from your Eternal Lands CVS folder to your Eternal Lands game folder. If you do not do this the game will come up to the log in screen and the program will crash when you try to play. MAKE SURE YOU DO THIS. After that you should be good to go.

 

6. Extras

You might notice that the music won't play. I am still trying to figure out how to get that working. I'll update or add to this thread once I figure that out. Also, the CVS EL client code seems to hang on exit. Ctrl Alt Delete eternal lands to close it. Again, I'm not sure why that is happening. Be sure to check out http://elc.berlios.de/build.php to find links to get the libraries or for build instructions on other platforms.

Edited by Ryldnozz

Share this post


Link to post
Share on other sites

On Dev-Cpp, just create a new project with all of the files, then go to Tools->Check for Updates/Packages, and download select versions of the following packages:

 

libxml2-2.6.19.win32

OggVorbis-win32sdk-1.0.1

OpenAL SDK (version 1.0)

iconv-1.9.1.win32

SDL-devel-1.2.8-VC6

SDL_net-devel-1.2.5-VC6

 

You may need to switch mirrors to get all of the packages. Dev-Cpp will install all of the files to their correct directories.

Then, you can just hit compile, or you can use the default Makefile by opening Project->Project Options, select Makefile, tick off "Use Custom Makefile", click the button on the right (Load), and select Makefile.win, THEN hit compile. BTW, be sure to copy over the created executable to your Eternal Lands directory, and therefore don't use the Dev-Cpp run button unless you building straight to that directory. (As set in Project->Project Options, Build Options).

 

As well, none of the aforementioned errors or issues occur with Dev-Cpp. ;)

Edited by crusadingknight

Share this post


Link to post
Share on other sites

Good job, thank you guys! ;) Could you please add download links + sizes for the software you mention (with you CK, it's just Dev-C++) as well?

 

Edit: once this guide is done, we should make it sticky.

Edited by Lachesis

Share this post


Link to post
Share on other sites

Yes, it's all through Dev-Cpp, or devpaks.org if certain of them are unavailable (doubtful, though)... sizes are variable, but I believe the total is below ~10MB.

 

EDIT: Yeah, merge it into a single top post, then I'll prune and sticky it. (The last guide for Dev-Cpp wasn't very good...)

Edited by crusadingknight

Share this post


Link to post
Share on other sites

Uh... You want Dev-C++ 5 Beta, which is 13.5 MB ;) . The Dev-Cpp 4 is very bugged, and causes extreme memory overflow, as well as several header errors, and hard-hanging the whole computer.

Share this post


Link to post
Share on other sites
Uh... You want Dev-C++ 5 Beta, which is 13.5 MB :D . The Dev-Cpp 4 is very bugged, and causes extreme memory overflow, as well as several header errors, and hard-hanging the whole computer.

155702[/snapback]

Changed the link to version 4.9.9.2 alias "5.0 beta 9.2". Funny thing, the stable release was the unstable one :D It think this thread is ready for compilation and pinning now, what do you think?

 

With regards

Lachesis

Share this post


Link to post
Share on other sites

I'd say so - are you able to edit your first post and include everything here? (I have no idea about the limitations of this forum, lol)

Share this post


Link to post
Share on other sites

Please don't ask me to merge you info ... as I said I don't know much about it. But I'd say we'd rather either make a new thread with a single post, or just pin this thread as it is.

Share this post


Link to post
Share on other sites

K, I'll merge an sticky it... though, really, this should be on elc.berlios.de

Share this post


Link to post
Share on other sites

There, I merged everything together, and added author names (So people know to blame me for writing such a shoddy guide, and so Ryldnozz gets his due credit).

 

Any comments/suggestions?

Share this post


Link to post
Share on other sites

Good work, but it's a little confusing to differentiate between the different guides. Could you maybe include this differentiation into the numbering scheme and add a table of contents at the beginning like that:

  • 1. Getting a CVS program and the CVS code
    • 1.1 using WinCVS
    • 1.2 using TortoiseCVS
    • 1.3 using Microsoft Visual C++

    [*] 2. Getting and installing libraries

    • 2.1 using DevC++
    • 2.2 using Microsoft Visual C++

    [*] 3. Compiling and installing the EL Client

    • 3.1 using DevC++
    • 3.2 using Microsoft Visual C++

And please add the term "CVS" somewhere in the topic title. Thank you two for all the work you've done, I hope this will be a good help for the CVS newbies :)

 

With regards

Lachesis

Share this post


Link to post
Share on other sites

I tried following the instuctions for using Dev-cpp posted by CK, but ran into problems. I also downloaded the project files provided by sadez and ran into the same errors.

 

The first problem I run into is that paste.h wants X11/lib.h. Looking at paste.h though, it looks like all the functions inside are only for non-windows / non OSX machines.

 

OK, so I remove nearly everything from paste.h and try recompiling. This time, I see numerous "invalid conversion" errors in 2d_objects.c and the make fails on this file.

 

When I go look at the Compile Log window, it doesn't look like it's getting any of the declarations like -DWINDOWS, etc. If I go to Tools->Compiler Options and enter in declarations there, they do show up in the Compile Log.

 

Am I missing a lib (maybe OpenGL or glut, how do I check for these?) or is something else wrong?

Share this post


Link to post
Share on other sites
I tried following the instuctions for using Dev-cpp posted by CK, but ran into problems.  I also downloaded the project files provided by sadez and ran into the same errors.

 

The first problem I run into is that paste.h wants X11/lib.h.  Looking at paste.h though, it looks like all the functions inside are only for non-windows / non OSX machines.

 

OK, so I remove nearly everything from paste.h and try recompiling.  This time, I see numerous "invalid conversion" errors in 2d_objects.c and the make fails on this file.

 

When I go look at the Compile Log window, it doesn't look like it's getting any of the declarations like -DWINDOWS, etc.  If I go to Tools->Compiler Options and enter in declarations there, they do show up in the Compile Log.

 

Am I missing a lib (maybe OpenGL or glut, how do I check for these?) or is something else wrong?

156198[/snapback]

 

Uh... you created a _C_, NOT a C++ project, correct? :P

Share this post


Link to post
Share on other sites
Uh... you created a _C_, NOT a C++ project, correct? :D

156203[/snapback]

 

Uhm... Yes, yes I did :P (OK, so I didn't. The process for creating a new, empty, C project could perhaps be made clearer, for those not familiar with Dev-cpp, especially since C++ is the default)

 

Now I encounter an error in cal3dwrap.c where it complains it can't find cal3d/cal3d.h. It's not clear to me whether I need to download one of the cal3d packages from sourceforge, or if I need a cal3d package that's specific to EL.

Share this post


Link to post
Share on other sites
-DWINDOWS -Wall -DELC -DWRITE_XML -DWINDOW_CHAT -DNOTEPAD -DSTORAGE

AFAIK the -DWRITE_XML macro shouldn't be used on a regular client. This overrides the languages/en/strings/*.xml files each time the client starts (when load_translatables() gets called). I think this isn't wanted, instead this should only be done by developers only when needed.

Share this post


Link to post
Share on other sites
AFAIK the -DWRITE_XML macro shouldn't be used on a regular client. This overrides the languages/en/strings/*.xml files each time the client starts (when load_translatables() gets called). I think this isn't wanted, instead this should only be done by developers only when needed.

156225[/snapback]

You're right, -DWRITE_XML is only there for devs that are too lame to write XML files by hand :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×