Jump to content


Photo

Compilation problems


  • Please log in to reply
113 replies to this topic

#1 DaiShiva

DaiShiva

    Sergeant

  • Moderators
  • PipPipPip
  • 25 posts

Posted 20 March 2004 - 01:41 AM

I have gotten the sources to compile

is it worth noting that if you download the source off the webpage, it is not compatible with the svn code? ie: you cant checkout/update over it?

Edited by DaiShiva, 20 March 2004 - 01:54 AM.


#2 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 20 March 2004 - 01:07 PM

Subversion stores some additional information in the working copy that help it to track changes and optimize network bandwidth on further updates and commits. As far as I know, it is impossible to convert the sources just downloaded from a webpage to a working copy. By the way, CVS works in the same way. So initial checkout is required. That's not a big problem as the size of data and sources stored in ufo2000 repository is relatively small (something like 1 or 2 megabytes).

If you tried to checkout Xenocide sources before and you are now afaid of very long download times, ufo2000 does not have this problem :)
ufo2000 development team
http://ufo2000.sourceforge.net

#3 Twilight Owl

Twilight Owl

    Project Member: UFO 2000

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 10 June 2004 - 06:42 AM

Good free text editor with syntax highlight (for Windows): http://www.neoteroi....2k/aedix222.zip
Sorry for my English :)

Posted Image
UFO2000 team
[programmer, map maker]

#4 DaiShiva

DaiShiva

    Sergeant

  • Moderators
  • PipPipPip
  • 25 posts

Posted 10 June 2004 - 12:36 PM

Free IDE that works with an existing copy of mingw: Dev-cpp

#5 HaJo

HaJo

    Sergeant

  • Forum Members
  • PipPipPip
  • 34 posts

Posted 04 September 2004 - 02:47 AM

I installed all the stuff, checked out the latest version, got it to compile and run.
Now I have some questions concerning the code, some suggestions, etc.
Should we talk about it here ?
The developer-mailinglist looks like it doesn't have much discussions...

-HaJo

#6 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 04 September 2004 - 03:43 AM

I installed all the stuff, checked out the latest version, got it to compile and run.

Great. If you had any difficulties, or some steps are poorly discribed, share your impressions here.
So we can fix build instructions (or build process) and people trying to compile ufo2000 will have less problems in the future.

Now I have some questions concerning the code, some suggestions, etc.
Should we talk about it here ? 

OK, we can use this thread to discuss coding style, process of submitting patches, IDE, editors, compilers and build tools. But it is better to create separate threads for suggestions about improving the game itself.

The developer-mailinglist looks like it doesn't have much discussions...

Right, but we can always start a discussion there too :)
ufo2000 development team
http://ufo2000.sourceforge.net

#7 HaJo

HaJo

    Sergeant

  • Forum Members
  • PipPipPip
  • 34 posts

Posted 04 September 2004 - 04:27 AM

instructions how to build win32 binaries of the game and make installer.
First you need a set of tools.
..
run from a command line:
'svn co http://lxnt.info:888...pos/ufo2k/trunk c:\projects\ufo2000'


If you have a router and/or firewall, you must enable port 8888,
maybe resticting this to the ip-address of lxnt.info

After installation of svn, mingw and msys, some customization might be required, e.g. edit
autoexec.bat ( SET APR_ICONV_PATH= ),
/etc/fstab ( /mingw )
/etc/profile ( alias )

After that everything is simple. Just run 'make' from ufo2000 sources directory


Should add:
start MSYS to get a command-window, cd to ufo-directory, then make.

After you have a new .exe-file, where do you test it?
I copy them over to my play-directory.

And how do you test the ufo2000-server ?
(Err, how do *I* test a modified server-exe ?)


-HaJo

Edited by HaJo, 04 September 2004 - 06:25 AM.


#8 HaJo

HaJo

    Sergeant

  • Forum Members
  • PipPipPip
  • 34 posts

Posted 04 September 2004 - 04:58 AM

OK, we can use this thread to discuss coding style, process of submitting patches, IDE, editors, compilers and build tools.


I also installed the Dev-cpp, but I'm still not sure how to integrate it with ufo2000.

A brief look into some of the source-files got me some questions:
  • naming: PCK / SPK / MCD - looks like Picture/Sprite/Graphics-Handling,
    but I have no idea what the names mean, and how it works

  • I miss a 1-2 line comment after © telling what the file is good for

  • Code-cleanup: there are lots of xcom1_color() with numeric constants.
    Would you like to put them into a colors.h ?
    I might be tempted to do this while reading thru the source...

But it is better to create separate threads for suggestions about improving the game itself.

Until I have a fair understanding of the code, I will stick to some simple user-interface issues -
like too little feedback in some places, so new players are left alone or confused
(Ctrl-Click on soldier comes to mind) ...

-HaJo

#9 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 05 September 2004 - 02:54 AM

After you have a new .exe-file, where do you test it?
I copy them over to my play-directory.

You can just copy x-com data files to XCOM subdirectory in your working copy. So you will be able to just run compiled executable.

And how do you test the ufo2000-server ?
(Err, how do *I* test a modified server-exe ?)

Just start it. After that, run at least two instances of ufo2000 on the same computer (or on different computers if you have LAN), enter your computer IP address in connect server dialog instead of lxnt.info

I also installed the Dev-cpp, but I'm still not sure how to integrate it with ufo2000.

I never tried it either. By the way, would anyone want to work with ufo2000 sources in Microsoft Visual Studio IDE? The game compiles fine by MSVC (though maybe some minor tweaks can be required, as I checked it a few months ago). It is not the first time, I'm asking this question, but nobody really cared about MSVC support before :)

A brief look into some of the source-files got me some questions:[list]

[*] naming: PCK / SPK / MCD - looks like Picture/Sprite/Graphics-Handling,
but I have no idea what the names mean, and how it works

A pair of PCK and TAB files is just a container of small images 32x48 as far as I know. They are used as a storage for unit and terrain tiles. MCD file is a large array of map cell information records. Each map cell consists of 4 elements: 2 walls, floor and object. So basically MAP files are map blocks used to construct a map, each cell in MAP file is described by 4 bytes, each being an index in MCD array. MCD record has indexes of images in PCK files for constructing map on the screen along with other information. There are lots of resources about PCK, MCD and other x-com data formats around. Check Daishiva's home page for example.

[*] I miss a 1-2 line comment after   telling what the file is good for

A good point, the sources are never documented well enough, though I'm trying to comment some places when doing refactoring. I will try to start adding comments to the files too.

We are using doxygen to document ufo2000 sources. It requires to make comments a special format understandable by doxygen, so it can build something like this: http://ufo2000.lxnt....les/ufo2000.chm

Documenting the sources is something like chicken/egg problem. We don't need much detailed documentation for the code we have written ourselves, it is already clear to us, in addition nobody else is working with the sources, so this seems to be waste of time. On the other hand, it is unlikely for someone to join the developments team unless the sources are well documented. :)

We are adding comments to the code with each new release, so the situation is constantly improving.

If you find some code that is not clear and badly needs commenting, just ask.

[*] Code-cleanup: there are lots of xcom1_color() with numeric constants.
Would you like to put them into a colors.h ?
I might be tempted to do this while reading thru the source...


Do you mean something like this (from server_gui.cpp):
#define COLOR_GREEN xcom1_color(50)
#define COLOR_GRAY xcom1_color(3)
#define COLOR_RED xcom1_color(32)
ufo2000 development team
http://ufo2000.sourceforge.net

#10 HaJo

HaJo

    Sergeant

  • Forum Members
  • PipPipPip
  • 34 posts

Posted 05 September 2004 - 11:55 PM

[*] Code-cleanup: there are lots of xcom1_color() with numeric constants.
Would you like to put them into a colors.h ?

Do you mean something like this (from server_gui.cpp):
#define COLOR_GREEN    xcom1_color(50)
#define COLOR_GRAY  xcom1_color(3)
#define COLOR_RED      xcom1_color(32)


yes - that is one of the few places with named instead of numeric constants.

#11 HaJo

HaJo

    Sergeant

  • Forum Members
  • PipPipPip
  • 34 posts

Posted 06 September 2004 - 08:18 AM

I installed Doxygen, and tried to generate with the win-frontend
using doxy-en.conf, but after "Generating docs for file bullet.cpp...",
I get errormessages 'File "dot" not found'

And since "svn up" to 448, I get errors like
>>
In file included from src/bullet.cpp:21:
src/global.h:43:21: warning: allegro.h: No such file or directory
src/global.h:45:22: warning: winalleg.h: No such file or directory
<<

I made a fresh checkout, but now I get
make: *** No rule to make target `src/about.h', needed by `obj-win32/main.o'. Stop.I

I think I go back to 447 for now...

-HaJo

#12 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 07 September 2004 - 06:37 AM

[*] Code-cleanup: there are lots of xcom1_color() with numeric constants.
Would you like to put them into a colors.h ?

Do you mean something like this (from server_gui.cpp):
#define COLOR_GREEN    xcom1_color(50)
#define COLOR_GRAY  xcom1_color(3)
#define COLOR_RED      xcom1_color(32)

yes - that is one of the few places with named instead of numeric constants.

No objections :)
But in fact there are many different gradations of red color for example, so while these constants can be used in some places to improve code readability, replacing all the color indexes from x-com palette does not make much sence.

If you are looking for tasks to do, first you can look at our bugtracker and choose any of the bugs or feature requests that do not seem too difficult. I'm changing your access level to 'developer' in the bugtracker.

Also quite simple but useful task is a new "about" menu option for the game (old one did not work correctly for different color depth, so it was disabled long time ago and was finally removed in revision 448). It would be nice to have some visual effect in this "about" screen and just show some text in a loop :)

By the way, you probably have found out it yourself, but we are using allegro library for 2D graphics, sound, keyboard/mouse handling and all other things. Allegro chm help file is very useful when working with ufo2000 sources.

I installed Doxygen, and tried to generate with the win-frontend
using doxy-en.conf, but after "Generating docs for file bullet.cpp...",
I get errormessages  'File "dot" not found'

dot is a helper tool that is used by doxygen to create nice looking inheritance and collaboration graphs. It can be disabled in doxygen conf file or downloaded from the following page: http://www.research....tools/graphviz/
Also if you want to make chm file, you will also need html help compiler. But html docs can be built even without it.

By the way, this is some kind of offtopic, but "dot" is a rather useful tool that can be used even without doxygen. It processes graph description in text format and produces nice looking pictures. I have used it to make talents dependency graph for ADOM roguelike game. Awk script processes information from game manual and makes .dot file which is used to get final png-picture. Everything can be downloaded here. The same trick can be used to create x-com technology tree picture for example :)

And since "svn up" to 448, I get errors like
>>
In file included from src/bullet.cpp:21:
src/global.h:43:21: warning: allegro.h: No such file or directory
src/global.h:45:22: warning: winalleg.h: No such file or directory
<<

Looks like it can't find allegro header files, check if you have correct mingw-libs directory.

I made a fresh checkout, but now I get
make: *** No rule to make target `src/about.h', needed by `obj-win32/main.o'.  Stop.I

I think I go back to 447 for now...

Try deleting all the object files (make clean). Revision 448 builds perfectly fine for me.
ufo2000 development team
http://ufo2000.sourceforge.net

#13 HaJo

HaJo

    Sergeant

  • Forum Members
  • PipPipPip
  • 34 posts

Posted 07 September 2004 - 09:16 AM

[*] Code-cleanup: there are lots of xcom1_color() with numeric constants.
Would you like to put them into a colors.h ?

Do you mean something like this (from server_gui.cpp):
#define COLOR_GREEN    xcom1_color(50)
No objections :)

If you are looking for tasks to do, first you can look at our bugtracker

Yes, but to find any bug, I first need to understand the code better.
So, the idea was to do something slightly useful while reading,
and not breaking anything...

I installed Doxygen, and tried to generate with the win-frontend
using doxy-en.conf, but after "Generating docs for file bullet.cpp...",
I get errormessages  'File "dot" not found'


dot is a helper tool that is used by doxygen to create nice looking inheritance and collaboration graphs.


"dot" .. processes graph description in text format and produces nice looking pictures. I have used it to make talents dependency graph for ADOM roguelike game.

Nice - I also played ADOM some time back, but did not get far :-)


And since "svn up" to 448, I get errors like
>>
In file included from src/bullet.cpp:21:
src/global.h:43:21: warning: allegro.h: No such file or directory
src/global.h:45:22: warning: winalleg.h: No such file or directory
<<


Looks like it can't find allegro header files, check if you have correct mingw-libs directory.

I already had everything working, I could build the previous version,
with server and installer,
and right after that svn up to 448, and I get errors,
*that* got me wondering....

Ok, I have to investigate


-HaJo

#14 commander

commander

    Sergeant

  • Forum Members
  • PipPipPip
  • 28 posts

Posted 18 September 2004 - 12:05 AM

linux hackers rejoice for commander has the latest ( possibly not super great ) beta compiled and ready !

needs work . so , bump me to developer and we'll see what happens.


install slackware 9.1
install extra libraries
** install allegro config files ***
make clean
make

then fix the allegro.cfg i put it in /etc

will not fly properly under X ??? its a allegro thing fer sure.
under X ,,, i set it to run in console mode ... that seems best at this time.

#15 *Nite*

*Nite*

    Sergeant

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 04 April 2005 - 05:29 PM

Hi, im trying to get the latest sources...im at the point you (serge) said to put c:\projects, but im lost as far as the next step goes...please help :Help:
If there is anything i should know about these downloads?
They are not old are they?

PS: Is there any music players that play .s3m/.xm files up for downloading??
I like music while I work...

Edited by *Nite*, 04 April 2005 - 06:04 PM.


#16 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 05 April 2005 - 03:31 AM

Hi, im trying to get the latest sources...im at the point you (serge) said to put c:\projects, but im lost as far as the next step goes...please help  :Help:
If there is anything i should know about these downloads?
They are not old are they?

Some of the tools we are using have newer versions released but all the instructions are still up to date. What exactly does not work?
ufo2000 development team
http://ufo2000.sourceforge.net

#17 *Nite*

*Nite*

    Sergeant

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 05 April 2005 - 02:39 PM

When i try to click on the webpage for the trunk files it has nothing.
The subversion client kind of confuses me.

#18 *Nite*

*Nite*

    Sergeant

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 07 April 2005 - 04:37 PM

what i like to do is make new units...could i get some help on how units were put together in ufo2000. I looked at all the units .pck files, but i don't see any sectoids, mutons, power suits, or flying suits...i don't get how they were implemented, well actually i think i have an idea, but im not so sure.

Let's say i want to be a possible developer...how do all of you make updated files for new beta versions?

Edited by *Nite*, 07 April 2005 - 06:52 PM.


#19 commander

commander

    Sergeant

  • Forum Members
  • PipPipPip
  • 28 posts

Posted 09 April 2005 - 06:26 AM

hi -m in lynx mode -with - the crappiest keyboard in the universe
serge was apparently hacked -bad kbd- abd and the subv- does not appear to be there.
hookers n' scotch

#20 *Nite*

*Nite*

    Sergeant

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 15 April 2005 - 12:18 PM

Is anybody making new units yet? There is a request on snakeman demo... are you guys making that? Well anyway, im doing some tweaking with the muton.pck file in the ufo2000/xcom/units directory. I only placed a single image of the top of an ethereal facing northeast. There was a problem when i tried this: "Assert failed on scr/pck.cpp at line 232". Is it possible to add ethereals by editing the pck.cpp file? The file of the pck.cpp file is at the bottom of this post as a .txt file to get a better picture of line 232. The way i understand this is line 232 is about size and xcom color...im thinking it's the color not the size because i pretty much made the ethereal have only the upper body...isn't ethereals suppose to be xcom color? Can the code be changed to fix this problem, or does the whole tactical engine need redone? I heard that the tactical engine needs to be redone to add new units that aren't like the muton and sectoid...is it because that the pck file is being read through sequence order? You know, muton0 is read first, then muton1, etc...
I know i have asked a lot of questions, but it would be nice if they were all answered because i have been having these questions unanswered too long trying to figure out by myself. Please developers, help me out... :Help:

By the way...i figured that out how to get the source code now...i know that a lot of people are desperate, like me, of getting new units...some people are not even playing because of few units...

Attached Files


Edited by *Nite*, 15 April 2005 - 12:19 PM.


#21 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 16 April 2005 - 03:22 AM

Is anybody making new units yet?

Yes, gassa is making them. That's not the first time this question is asked in this forum :)

There is a request on snakeman demo... are you guys making that? Well anyway, im doing some tweaking with the muton.pck file in the ufo2000/xcom/units directory. I only placed a single image of the top of an ethereal facing northeast. There was a problem when i tried this: "Assert failed on scr/pck.cpp at line 232". Is it possible to add ethereals by editing the pck.cpp file? The file of the pck.cpp file is at the bottom of this post as a .txt file to get a better picture of line 232. The way i understand this is line 232 is about size and xcom color...im thinking it's the color not the size because i pretty much made the ethereal have only the upper body...isn't ethereals suppose to be xcom color? Can the code be changed to fix this problem, or does the whole tactical engine need redone? I heard that the tactical engine needs to be redone to add new units that aren't like the muton and sectoid...is it because that the pck file is being read through sequence order? You know, muton0 is read first, then muton1, etc...
I know i have asked a lot of questions, but it would be nice if they were all answered because i have been having these questions unanswered too long trying to figure out by myself. Please developers, help me out... :Help:

PCK files are just containers for the sets of sprites, you don't need to mess up with this code to add new skins. The problem is that ethereal pck is different from muton pck, they have different number of frames and need different code for combining these frames to get complete sprites. What is needed to be improved is Skin::draw function (in skin.cpp).

By the way...i figured that out how to get the source code now...i know that a lot of people are desperate, like me, of getting new units...some people are not even playing because of few units...

<{POST_SNAPBACK}>

That's good. Did you manage to compile source code already?
ufo2000 development team
http://ufo2000.sourceforge.net

#22 Jezulkim

Jezulkim

    Captain

  • Forum Members
  • PipPipPipPip
  • 194 posts

Posted 16 April 2005 - 05:43 AM

I looked at some files in newunits folder (nazi.pck, green.pck, soldier.pck)

They included some soldier sprites, why they aren't included in game?
That's my team in my avatar!

#23 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 16 April 2005 - 07:08 AM

I looked at some files in newunits folder (nazi.pck, green.pck, soldier.pck)
They included some soldier sprites, why they aren't included in game?

<{POST_SNAPBACK}>

Two reasons:
1. They are obvoiusly edited x-com sprites and that's why not quite legally clean, probably they will be removed from the distributive in one of the next versions of ufo2000 (but you will be able to use them in third-party addons :) )
2. We need to add some code for skins installation and management (similar to maps and now weapons addons installation)
ufo2000 development team
http://ufo2000.sourceforge.net

#24 *Nite*

*Nite*

    Sergeant

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 16 April 2005 - 11:17 AM

That's good. Did you manage to compile source code already?


Well, when i try to compile on visual c++, it says this:

c:\msys\1.0\home\none\ufo2000\src\jpgalleg\jpgalleg.h(23) : fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory
Error executing cl.exe.


i think im missing some libraries...do i need to comile it under some other compiler?

#25 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 16 April 2005 - 12:02 PM

Well, when i try to compile on visual c++, it says this:

c:\msys\1.0\home\none\ufo2000\src\jpgalleg\jpgalleg.h(23) : fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory
Error executing cl.exe.

i think im missing some libraries...do i need to comile it under some other compiler?

<{POST_SNAPBACK}>

Well, I think you are missing reading instructions :)

The game should be compiled using mingw c++ compiler. Also you need to download and extract mingw-libs.zip archive into ufo2000 sources directory (it contains all the needed libraries including allegro).

The game can be compiled using visual c++ but that will require getting and compiling all the libraries the game depends on (allegro, hawknl, sqlite, zlib, libpng, ogg vorbis, freetype), making msvc project file or tweaking makefile, also some fixes to the sources may or may not be required (it was long ago when I tried to compile the game using visual c++). So I would recommend you to compile the game stright as the instructions describe and start making some other experiments a bit later :)
ufo2000 development team
http://ufo2000.sourceforge.net

#26 *Nite*

*Nite*

    Sergeant

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 16 April 2005 - 06:23 PM

ok, my current directory for the trunk files are in:
c:\msys\1.0\home\none\trunk (im using the name trunk instead of ufo2000 right now)

well i went to msys, typed in: cd c:/msys/1.0/home/none/ufo2000 and that set the directory so thats good...then i typed "make" and it says:

g++ -MMD -funsigned-char -Wall -Wno-deprecated-declarations -I src/lua -DDEBUGMO DE -DUFO_SVNVERSION=\"802\" -02 -pipe
-DHAVE_FREETYPE
-DGLYPH_TARGET=GLYPH+TARGET_ALLEGRO -DGK_NO_LEGACY
-DHAVE_DUMBOGG -DHAVE_PNG -DWIN32 -DALLEGRO_STATICLINK
-I mingw-libs/include -L mingw-libs/lib -c src/bullet.cpp -o obj-win32/bullet.o
make: g++: Command not found
make: *** [obj-win32/bullet.o] Error 127


I have windows 98 second edition...is this a problem?
I put the mingw libraries into: c:/msys/1.0/home/none/trunk...i put the nsys plug-ins into: c:/msys/1.0/home/none/trunk like you said...I have all the files installed you told me too...except the "makensis206_log".
Where do i put makensis206_log?

Im sorry to ask you questions that to you are easy, serge...

#27 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 17 April 2005 - 12:52 AM

That g++ is a c++ compiler from mingw. If the system can't find it, my guess would be that you either did not install it or it is not correctly registered in PATH (bin subdirectory from mingw installation).

To check that mingw is installed correctly you can try to run 'gcc --version', it will show some information about its version.

BTW, do you ICQ? Such issues are resolved much faster when communicating using IM.
ufo2000 development team
http://ufo2000.sourceforge.net

#28 *Nite*

*Nite*

    Sergeant

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 17 April 2005 - 11:23 AM

oh joy! It works, thanks for putting up with my too simple questions that you already know. Im going to have fun doing this. :)

#29 jammers

jammers

    Sergeant

  • Forum Members
  • PipPipPip
  • 19 posts

Posted 22 April 2005 - 12:05 PM

Ive just about got it to compile on my ibook, would anyone else like instructions? its a bit tricky

#30 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 22 April 2005 - 01:16 PM

Ive just about got it to compile on my ibook, would anyone else like instructions? its a bit tricky

<{POST_SNAPBACK}>

Was it something like this: http://www.lxnt.info...ary/002230.html ?
Anyway, having compilation instructions for all platforms is a good idea.
ufo2000 development team
http://ufo2000.sourceforge.net

#31 jammers

jammers

    Sergeant

  • Forum Members
  • PipPipPip
  • 19 posts

Posted 23 April 2005 - 06:54 AM

Ive just about got it to compile on my ibook, would anyone else like instructions? its a bit tricky

<{POST_SNAPBACK}>

Was it something like this: http://www.lxnt.info...ary/002230.html ?
Anyway, having compilation instructions for all platforms is a good idea.

<{POST_SNAPBACK}>


Yeah pritty much (exept i forgot freetype :s)
Exept i was going to make it a lot more clearer for the average mac user.

#32 DakeDesu

DakeDesu

    Sergeant

  • Forum Members
  • PipPipPip
  • 20 posts

Posted 27 June 2005 - 08:51 PM

Is it alright for just anyone to mess around with beta code? I mean without claiming it is theres. Because I have a few ideas--and I keep getting more.

1) Lisp based AI. http://www.xcomufo.c...?showtopic=7697

2) A better chat client--the current one sucks

3) Fix the draw command... though I haven't seen it though--but I have a few ideas there.

I am sure I will come up with more ^_^
--------
I came here to mod.

#33 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 28 June 2005 - 09:48 AM

Is it alright for just anyone to mess around with beta code? I mean without claiming it is theres. Because I have a few ideas--and I keep getting more.


Just check these links:
http://lxnt.info:888...k/trunk/gpl.txt (shown when installing the game by the way)
http://lxnt.info:888...k/trunk/AUTHORS
http://lxnt.info:888...k/trunk/HACKING

Edit: also check this thread if you want to discuss this issue: http://www.xcomufo.c...?showtopic=7852

Edited by Serge, 28 June 2005 - 11:12 AM.

ufo2000 development team
http://ufo2000.sourceforge.net

#34 Zorg

Zorg

    Squaddie

  • Forum Members
  • PipPip
  • 4 posts

Posted 09 July 2005 - 11:42 AM

Hi all,

Just got the code to compile as per the instructions except for some trouble compiling exchndl.c, namely an undefined function (bfd_get_section_size_before_reloc).

Is this a new issue with the latest beta code or is everyone else just not bothering to compile exchndl.c? Its use seems fairly mystifying - something about executable formats and trying to extract debug symbols?

So now I wondering if the changes I've made to exchndl.c to get it to link are going to cause me problems?

Cheers,
Zorg

#35 futsukayoi

futsukayoi

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 20 July 2005 - 05:28 AM

Hi all,

Just got the code to compile as per the instructions except for some trouble compiling exchndl.c, namely an undefined function (bfd_get_section_size_before_reloc).

Is this a new issue with the latest beta code or is everyone else just not bothering to compile exchndl.c? Its use seems fairly mystifying - something about executable formats and trying to extract debug symbols?

So now I wondering if the changes I've made to exchndl.c to get it to link are going to cause me problems?

Cheers,
Zorg

<{POST_SNAPBACK}>



I just downloaded the 886 source and have the same problem compiling exchndl.c , (bfd_get_section_size_before_reloc) and also (In function `PEGetSymFromAddr':
src/exchndl/exchndl.c:233: error: subscripted value is neither array nor pointer). Compiling with Mingw32 as per instructions ... exchndl.c is 13 months old so I guess this is not erroneous code but some fault on my part - any ideas anyone?

Btw Zorg: if you've done a workaround for this problem - even if it's temporary - I'd be very interested in seeing it - I haven't had any luck so far ;<

/ futsu

#36 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 20 July 2005 - 10:18 AM

The use for this code is a stack backtrace reporting on crashes, see http://ufo2000.lxnt.info/results.php and http://ufo2000.lxnt....esults-beta.php

Maybe you are using a new mingw version? I have installed mine very long ago and do not have any problems with it :)

In any case, exchndl.c can be easily removed from the sources tree so that the game still works (linux version does not use it at all).
ufo2000 development team
http://ufo2000.sourceforge.net

#37 Zorg

Zorg

    Squaddie

  • Forum Members
  • PipPip
  • 4 posts

Posted 24 July 2005 - 07:19 AM

I just downloaded the 886 source and have the same problem compiling exchndl.c , (bfd_get_section_size_before_reloc) and also (In function `PEGetSymFromAddr':
src/exchndl/exchndl.c:233: error: subscripted value is neither array nor pointer). Compiling with Mingw32 as per instructions ... exchndl.c is 13 months old so I guess this is not erroneous code but some fault on my part - any ideas anyone?

Btw Zorg: if you've done a workaround for this problem - even if it's temporary - I'd be very interested in seeing it - I haven't had any luck so far ;<

/ futsu

<{POST_SNAPBACK}>


futsu,

Sorry I didn't reply sooner, assuming you didn't just pull the source files the fix goes something like...

src/exchndl/exchndl.c

To fix the error your getting you need to fix the array indexing, something has obviously happened and the compiler doesn't like it anymore.

At around line 231-234 you need something like
if(!ReadProcessMemory(hProcess, (PVOID) ( (DWORD)hModule + (DWORD) (&ExportDir.AddressOfNames)[j] ), &dwNearestName, sizeof(dwNearestName), NULL))

(&ExportDir.AddressOfNames)[j] ) Is the actual change to make it work.

Although it looks like this may have been pulled in the latest version of the code (mine is now 2 or 3 weeks old).

Once you get past that, you may need these bad boys

#define bfd_get_section_size_before_reloc(section) (section->reloc_done ? (abort(),1): (section)->rawsize)
#define bfd_get_section_size_after_reloc(section) ((section->reloc_done) ? (section)->size: (abort(),1))

If needs be I can post a full diff but as I say it looks like the source has been updated since I checked it out.

Hope that helps...

Peace,
Zorg

#38 futsukayoi

futsukayoi

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 25 July 2005 - 07:49 AM

thanks - I ripped the exhndl.c from the source as suggested but I got errors compiling main.cpp instead - so I'll to do it right instead I guess ;>

/ futsu

#39 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 07 August 2005 - 04:13 AM

Did you resolve the problems or still need a help?
ufo2000 development team
http://ufo2000.sourceforge.net

#40 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 08 August 2005 - 09:26 PM

Bumping this thread again, but probably some people want IDE support? Which one is would you like to have support for: Dev-C++, Microsoft Visual Studio, Eclipse, ...?

PS. Dev-C++ support is already working via scons. If anybody cares, I can provide some insructions.
ufo2000 development team
http://ufo2000.sourceforge.net

#41 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 08 October 2005 - 11:35 AM

Just got the code to compile as per the instructions except for some trouble compiling exchndl.c, namely an undefined function (bfd_get_section_size_before_reloc).

Is this a new issue with the latest beta code or is everyone else just not bothering to compile exchndl.c? Its use seems fairly mystifying - something about executable formats and trying to extract debug symbols?

So now I wondering if the changes I've made to exchndl.c to get it to link are going to cause me problems?

If anybody still tracks this topic, the problems compiling the game with the latest stable version of mingw are now resolved (in revision 951).
ufo2000 development team
http://ufo2000.sourceforge.net

#42 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 08 October 2005 - 12:03 PM

Bumping this thread again, but probably some people want IDE support? Which one is would you like to have support for: Dev-C++, Microsoft Visual Studio, Eclipse, ...?

PS. Dev-C++ support is already working via scons. If anybody cares, I can provide some insructions.

<{POST_SNAPBACK}>

Ms Visual Studio would be great... Just 'cause you're asking.. :)
Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#43 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 17 October 2005 - 11:16 AM

Ms Visual Studio would be great... Just 'cause you're asking.. :)

Do you really want to try compiling ufo2000 using MS Visual Studio or it is just a 'nice to have' suggestion? ;) We don't have much free time, but if MSVC support is really needed (can help us to get more developers), it will be added.

Using gcc for compiling both windows and linux versions is a good idea in order just to have less chances of breaking linux support when programming and testing in windows and vice versa. The game was compiled by MSVC some time ago, but it was dropped in favour of Mingw.
ufo2000 development team
http://ufo2000.sourceforge.net

#44 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 17 October 2005 - 12:41 PM

Do you really want to try compiling ufo2000 using MS Visual Studio or it is just a 'nice to have' suggestion? ;) We don't have much free time, but if MSVC support is really needed (can help us to get more developers), it will be added.

<{POST_SNAPBACK}>

I really would like to compile it using MS Visual Studio, but I don't think I have enough time and/or code knowledge to contribute to the project. PJ Xenocide is more or less eating up all the free time I have. So you shouldn't implement it just for me, on the other hand I think since PJ Xenocide is using Visual Studio as the main IDE, it could really help you to get more developers and minimizes the borders between the two projects - although it might not be needed, but who knows... :)
Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#45 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 20 October 2005 - 05:17 PM

... on the other hand I think since PJ Xenocide is using Visual Studio as the main IDE, it could really help you to get more developers and minimizes the borders between the two projects - although it might not be needed, but who knows... :)

Actually different licenses is the main border between our two projects now. Is it good or bad, don't know, but we have to live with that. On the other hand, geoscape development for ufo2000 can get a boost now :) There is no use waiting for xenocide geoscape now, as we will not be able to use it anyway.

About MSVC support, I think it is not difficult at all to compile the game using it. It took me an evening to do this about half a year ago (build all the library dependencies and fix some minor compilation problems). What is difficult is to always maintain that MSVC project in a working state, it could just start draining our already scarce resources. But any skilled C++ developer can make this MSVC project for ufo2000 himself, so it's not a stopping factor that could prevent new developers from joining us :) And I can always provide some advice or help in the case of any problems.
ufo2000 development team
http://ufo2000.sourceforge.net

#46 Guest_Azrael_*

Guest_Azrael_*
  • Guests

Posted 20 October 2005 - 06:12 PM

... on the other hand I think since PJ Xenocide is using Visual Studio as the main IDE, it could really help you to get more developers and minimizes the borders between the two projects - although it might not be needed, but who knows... :)

Actually different licenses is the main border between our two projects now. Is it good or bad, don't know, but we have to live with that. On the other hand, geoscape development for ufo2000 can get a boost now :) There is no use waiting for xenocide geoscape now, as we will not be able to use it anyway.

<{POST_SNAPBACK}>

That sucks :(

#47 nachtwolf

nachtwolf

    UFO2000 Staff: Leader

  • Moderators
  • PipPipPipPip
  • 310 posts

Posted 05 December 2005 - 10:03 PM

I have enough c++ experience to read what is what functions and I can write a little bit of code. My knowledge in tweaking is good also. Do you developers think I have enough experience to write code for this game? Stupid question, but I want to know if I am ready to even start coding.

<{POST_SNAPBACK}>


IMHO if you think you can do it, try... submit the patch then they'll tell you if you are up to this.

And... for I have spent all late afternoon doing this... getting started from scratch with the tools is a good test in itself.

I'll sure have a try at the sources but I think I'll make some mistakes before giving a reliable patch.
Posted Image

#48 Jainy

Jainy

    Squaddie

  • Forum Members
  • PipPip
  • 1 posts

Posted 27 April 2006 - 05:40 AM

Hi Guys,

I have some problems while trying to compile the code, so i hope someone can help me with this :)

I downloaded all the linked files in the compilation thread. The only problem is that the link to the extra libraries (allegro/ expat) is dead, so I have tried downloading allegro seperately but that gave me a whole truckload of new errors and the source started asking for all kinds of random other packages...at which point i figured it's probably a better idea to ask for the packages here tongue.gif

I did try to compile the code (even though i know i dont have allegro etc) and I immediately get a different error which someone else asked about in this thread as well:

QUOTE
mkdir obj-win32
g++ -MMD -funsigned-char -Wall -Wno-deprecated-declarations -I src/lua -I src/lu asqlite3 -DDEBUGMODE -DUFO_SVNVERSION=\"1011\" -O2 -pipe -DHAVE_FREETYPE -DGLYPH _TARGET=GLYPH_TARGET_ALLEGRO -DGK_NO_LEGACY -DHAVE_DUMBOGG -DHAVE_PNG -DWIN32 -D ALLEGRO_STATICLINK -I mingw-libs/include -L mingw-libs/lib -c src/bullet.cpp -o obj-win32/bullet.o
make: g++: Command not found
make: *** [obj-win32/bullet.o] Error 127


now in your answer in the compile thread you mention setting the PATH...but i tried looking in the dir and i couldn't find anything resembling that. Can you please explain how i can fix this?

The reason I want to get the source up and running is because i'm currently studying for my master's degree in Artificial Intelligence. For one particular class me and a couple of other students have to write an AI for a game we can pick ourselves.
Since we have all been a huge fan of the XCOM series of games we jumped at the idea when we found out there was actually an open source version available!!

So once we get the source to compile and run (we all use windows) we can get to work because we only have a couple of weeks to get the job done. As you might have guessed our combined linux knowledge is rather pathetic ^_^ so if anyone can help us getting the code to compile that would be awesome!

hope to hear from you soon,

Jainy


p.s. Our combined knowledge of C++ and programming in general is expert, since me and another student have already got a degree in software engineering and i actually have been working as software engineer for 3+ years :cheers:

#49 Judeau

Judeau

    Sergeant

  • Forum Members
  • PipPipPip
  • 36 posts

Posted 27 April 2006 - 08:58 AM

control panel->system->advanced->environment variables

and then look at system variables

path is there
Posted Image

#50 Kiv

Kiv

    Squaddie

  • Forum Members
  • PipPip
  • 9 posts

Posted 11 May 2006 - 03:20 PM

I'm trying to compile the sources, but I need the package of libraries (allegro, etc). The link in the compilation instructions topic is dead and I don't know where to get them.

Any help would be appreciated.