Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Source Code Project > COMPILE: Linux Port
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
CivGroups
CTP2 Source Code Project (59): Not a Member - Join

bottom of page
  
Author
Thread   
Pages (5): [ 1   2   3   4     >> ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
closms is offline closms
Settler

Nov 2003
time: 22:31
  Old Post 03-11-2003 22:12 Visit closms's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Linux Port Put an end to popups!

I'm wondering is anyone else is trying to port this to linux.

I spent some time on it and I got some of the mapgen dll's to build. Specifically Crater.so, fault.so, geometric.so, Plasma1.so and Plasma2.so

The above was the easy stuff though. I guess that hard part will be replacing dx calls with sdl calls and mss calls with openal calls.

I noticed that there is a linux makefile for dbgen. So I guess at least someone at activision was thinking of linux. ( Maybe they're reading this post, and could contact me? ).

Anyways, I'm interested in getting this thing up and running under linux. So if anyone thinks they can help out, that would be great!

Mike

ps. If you want to get a hold of me, use msn messenger (closms@hotmail.com). Don't send email there, I won't get it.

Last edited by closms on 04-11-2003 at 00:25

kaan is offline kaan
Prince
Aarhus
Mar 2001
time: 05:31
  Old Post 04-11-2003 00:23
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Get a bigger avatar today!

id be glad to help but i have never tried to port an application to linux before, im just a happy user/programmer. but i figure it cant be too hard, just a long hard pull to get everything plugged in to the proper system calls.

kaan

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:31
  Old Post 04-11-2003 01:00 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Remove this text

I believe that we should concentrate our efforts to work in some sort of a single fashion. Our priority now should be fixing the worst of game bugs, and adding sound on the Windows version.

Although for the future, Linux port is clearly a good idea.

kaan is offline kaan
Prince
Aarhus
Mar 2001
time: 05:31
  Old Post 04-11-2003 01:22
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Full PM-box? Change here!

these goals are not that different, porting ctp2 to linux is also making the sound work and fixing bugs, its just that if we do port this game to linux there will be a lot more ppl coming to help with the rest. Those ppl will for the most part be experienced in working in an open source community and we can really use that kind of ppl now.

kaan

closms is offline closms
Settler

Nov 2003
time: 22:31
  Old Post 04-11-2003 01:23 Visit closms's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

quote:
Originally posted by Solver
I believe that we should concentrate our efforts to work in some sort of a single fashion. Our priority now should be fixing the worst of game bugs, and adding sound on the Windows version.


A public CVS (www.cvshome.org) server would be a good way to coordinate all developer efforts. Does such a server exist?

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:31
  Old Post 04-11-2003 01:26 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

As I posted in another thread, we may be prohibited from using a CVS.

Also, on Linux port, it's not open source. Usage of CtP2 source is limited by EULA.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:31
  Old Post 04-11-2003 01:29
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Lose 30 kilos (of popups)

The source code can, at this point, only be distributed from Apolyton, as far as I am aware, according to the code EULA. This would preclude a remote CVS, unless it was somehow implemented at Apolyton. I think ultimately some semi-manual system will be implemented.

kaan is offline kaan
Prince
Aarhus
Mar 2001
time: 05:31
  Old Post 04-11-2003 01:32
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Lose 30 kilos (of popups)

quote:
Originally posted by Solver
As I posted in another thread, we may be prohibited from using a CVS.

Also, on Linux port, it's not open source. Usage of CtP2 source is limited by EULA.


i know that what we are dealing with here is not open source, but our way to work with the code (can you even say that?) is identical and thats why we could use ppl that has experience from that kind of projects.

i just read the licence again and you are right about the distributing part, thats a shame if that inhibits us from using a public CVS.

kaan

Last edited by kaan on 04-11-2003 at 01:56

closms is offline closms
Settler

Nov 2003
time: 22:31
  Old Post 04-11-2003 01:50 Visit closms's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Call to Power 2

quote:
Originally posted by Solver
As I posted in another thread, we may be prohibited from using a CVS.

Also, on Linux port, it's not open source. Usage of CtP2 source is limited by EULA.


What if Apolyton set up a pserver and only gave accounts to people who have accepted the EULA. That way CVS could still be used and we wouldn't be violating the code EULA.

kaan is offline kaan
Prince
Aarhus
Mar 2001
time: 05:31
  Old Post 04-11-2003 02:00
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

we could also make a source tree containing only the patch code, that way we can distribute all we want to.
the patch program in linux would be perfect, does anyone know if it has been ported to win32? it might be part of cygwin but i dont know.

kaan

EzInKy is offline EzInKy
Settler
Kentucky
Mar 2002
time: 00:31
  Old Post 04-11-2003 03:00
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Increase Your PM Length

Since the code was written for DirectX 7 it may be possible to get it to compile against winelib.

kaan is offline kaan
Prince
Aarhus
Mar 2001
time: 05:31
  Old Post 04-11-2003 03:11
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

winelib of course

you are a hero my friend

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 04-11-2003 04:38 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

As far as CVS and stuff goes, I'm working on that (seeing what's technically/legally possible), please give me some time...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 04-11-2003 18:57 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Browse Apolyton AD-FREE

We (those who have downloaded the code) all already have a copy of diff that came with the source code. I'm sure it will come in handy.

closms is offline closms
Settler

Nov 2003
time: 22:31
  Old Post 04-11-2003 23:26 Visit closms's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
PATCH Support Apolyton or Terrorists Win

Hello All,

I've made a patch available to kick off the linux port. Contributions and criticism are welcome.

http://www.cs.ualberta.ca/~closson/ctp2/

Right now the work is pretty basic. Correcting case, and compiler warnings. Also VC++ has some quirks that aren't supported on g++. It should be pretty easy to contribute.

Mike

uppi is offline uppi
Settler

Oct 2003
time: 05:31
  Old Post 05-11-2003 01:19
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton buy from Amazon

Good Job

3 comments from me right now:

1. in the Makefile:

code:
-mkdir dll -mkdir dll/map

should be replaced by
code:
-mkdir -p dll -mkdir -p dll/map

(It isnt serious, just suppresses the warnings if the directories already exist)

2. What byacc are you using? Mine wouldnt accept the -o option. I had to remove it and copy the files manually.

3. There should be a variable like WINE_INCLUDE_DIR (or something like that) in the Makefile, pointing to the include dir of the winelib, because then it would be easier to change the Path of the winelib include files.

uppi is offline uppi
Settler

Oct 2003
time: 05:31
  Old Post 05-11-2003 03:58
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Suffering from ads?

And they are really allowed to call this "C++ Code"? I cant believe the VC++ compiler is accepting this. The Header files are a real mess. To get this working declarations have to be taken from one file and put into another, because header files are needing declarations from each other...

Well i managed to correct some errors (especially the "enum"-Errors) but now i am stuck with structure (?) called MouseEventCallback. It is used as a type, but i cant find a declaration of it and so g++ complains. Anybody got an idea where the declaration is / how to solve that?

Last edited by uppi on 05-11-2003 at 05:20

closms is offline closms
Settler

Nov 2003
time: 22:31
  Old Post 05-11-2003 06:46 Visit closms's homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Support Apolyton, buy Civilization 2

quote:
Originally posted by uppi
And they are really allowed to call this "C++ Code"? I cant believe the VC++ compiler is accepting this. The Header files are a real mess. To get this working declarations have to be taken from one file and put into another, because header files are needing declarations from each other...

Well i managed to correct some errors (especially the "enum"-Errors) but now i am stuck with structure (?) called MouseEventCallback. It is used as a type, but i cant find a declaration of it and so g++ complains. Anybody got an idea where the declaration is / how to solve that?


I guess VC++ lets you typedef a function signature and then use it to declare function prototypes. MouseEventCallback is an example of this.

eg.

typedef void (*MouseEventCallback)( aui_MouseEvent *mouseData );

virtual MouseEventCallback PreChildrenCallback {}

The traditional way to do this is

virtual void PreChildrenCallback( aui_MouseEvent *mouseData ) {}

Have a look at ui/aui_common/aui_region.h line 354 of my patched version.

This is what is happening that causes the enum problems

header a.h
------------
#include "b.h"

enum a1 {
a1_a,
a1_b,
a1_c
};

class a2 {
b1_a var;
.....
};

--------------

header b.h
-------------
#include "a.h"

enum b1 {
b1_a,
b1_b,
b1_c
};

class b2 {
a1_a var;
.....
};
---------------

So basically there are circular dependencies. I think the easiest way to fix this is to place the #include "a.h" after the enum is declared.

GENDER and CIV_INDEX are two good examples of this.

Mike

uppi is offline uppi
Settler

Oct 2003
time: 05:31
  Old Post 05-11-2003 22:40
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Increase Your PM Length

thanks

Now I managed to compile all the files in ctp/ctp2_utils

bfennema is offline bfennema
Settler

Nov 2003
time: 21:31
  Old Post 06-11-2003 07:08
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Help yourself to an AD-FREE life

I got the executable to build with SDL/SDL_mixer instead of mss32, and sound (at least the sfx) seem to work fine. The only thing I couldn't do a direct mapping of was cdrom volume. I couldn't find a way in SDL to adjust the cdrom volume.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:31
  Old Post 06-11-2003 07:30
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Support Apolyton buy from Amazon

Nice work

I don't know how the SDL audio subsystem works, but your efforts are much appreciated.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:31
  Old Post 06-11-2003 07:32
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Tired of ads?

Its great... If we can get some linux people involved... well... the more the merrier.

closms is offline closms
Settler

Nov 2003
time: 22:31
  Old Post 07-11-2003 01:26 Visit closms's homepage!
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Tired of ads?

quote:
Originally posted by bfennema
I got the executable to build with SDL/SDL_mixer instead of mss32, and sound (at least the sfx) seem to work fine. The only thing I couldn't do a direct mapping of was cdrom volume. I couldn't find a way in SDL to adjust the cdrom volume.


Great work! Yea, I'm surprised that more game companies don't use sdl or openal instead of mss.

Is this under windows or linux? If it's under linux then my hats off to you for fixing all the annoying compiler problems so quickly!

Mike

closms is offline closms
Settler

Nov 2003
time: 22:31
  Old Post 08-11-2003 23:00 Visit closms's homepage!
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Does anyone know how to get g++ to grok the following?

file: a.h
-----------------
#ifndef A_H
#define A_H

#include "b.h"

class a {
b m_b;
};
#else
class a;
#endif
-----------------
file: b.h
-----------------
#ifndef B_H
#define B_H

#include "a.h"

class b {
a m_a;
};

#else
class b;
#endif
-----------------
file: tmp.cc
-----------------
#include "a.h"
#include "b.h"

int main() {
a a_var;
return 0;
}
-----------------

Mike

kaan is offline kaan
Prince
Aarhus
Mar 2001
time: 05:31
  Old Post 09-11-2003 21:25
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Help yourself to an AD-FREE life

quote:
Originally posted by bfennema
I got the executable to build with SDL/SDL_mixer instead of mss32, and sound (at least the sfx) seem to work fine. The only thing I couldn't do a direct mapping of was cdrom volume. I couldn't find a way in SDL to adjust the cdrom volume.


Could you please zip up the changed files and post them here?

kaan

Leland is offline Leland
Prince

Jan 2000
time: 07:31
  Old Post 09-11-2003 22:45
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by closms
Does anyone know how to get g++ to grok the following?

(snip)

No c++ compiler should accept that piece of code. Basically class a contains class b, and class b contains class a, which leads to an infinite regress. Depending on what you really want to achieve with that piece of code, you could

1) replace m_a and m_b with pointers and use forward declarations instead of including the headers, or

2) declare a common base class for both of them which contains the data you want shared.

Maajromax is offline Maajromax
Settler

May 2002
time: 00:31
  Old Post 09-11-2003 22:46
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Help yourself to an AD-FREE life

Or, perhaps better, post a diff against the original source.

So long as it doesn't break anything, a linux-buildable source would be an excellent starting place for everyone else's modifications, as it's much more likely to remain portable/cross-platform.

uppi is offline uppi
Settler

Oct 2003
time: 05:31
  Old Post 10-11-2003 03:47
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:
Originally posted by Leland

No c++ compiler should accept that piece of code. Basically class a contains class b, and class b contains class a, which leads to an infinite regress. Depending on what you really want to achieve with that piece of code, you could

1) replace m_a and m_b with pointers and use forward declarations instead of including the headers, or

2) declare a common base class for both of them which contains the data you want shared.


Actually there were no circular dependencies in the classes itself, but in the header files containing the various enums. By putting these enums in a seperate header file this is (more or less) easily solved.

Leland is offline Leland
Prince

Jan 2000
time: 07:31
  Old Post 11-11-2003 22:08
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Increase the size of your Attachments

quote:
Originally posted by uppi

Actually there were no circular dependencies in the classes itself, but in the header files containing the various enums. By putting these enums in a seperate header file this is (more or less) easily solved.

Actually I was talking about closms' code.

closms is offline closms
Settler

Nov 2003
time: 22:31
  Old Post 17-11-2003 03:09 Visit closms's homepage!
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
robotcom Browse Apolyton AD-FREE

Does anyone know what the code in this subdir of for? I find a lot of duplicate headers in here. And including them has been nothing but trouble (im working on getting all the ui code to compile).

 
Pages (5): [ 1   2   3   4     >> ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:31.
Apolyton Time is 00:31.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0684 seconds (91.62% PHP - 8.38% MySQL) with 36 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net