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 > PROJECT: New coding methodology
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    < Last Thread     Next Thread > Post New Thread     Post A Reply
J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 12-01-2005 02:31 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
PROJECT: New coding methodology Get a bigger avatar today!

Assuming all goes well we should have a subversion server (and possibly, in the long term, other things such as bugzilla ), thanks to kaan (see this thread).

Given this, we have to make some decisions about project strategy, including at least the following:

What should we do about the ACTIVISION_ORIGINAL convention?

Personally, I say we should scrap it because it clutters the source code unnecessarily and all the information about changes is there in the version control if it's needed.

Should we keep posting updates to the Altered source files thread?

I think probably not. It's simply not worth the trouble to the coders, compared to the convinience of version control. However, I think it's probably still worthwhile posting periodic all packs (which, again, should be made easier by version control).

Anything else?

Discuss.

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:31
  Old Post 12-01-2005 02:48 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Call to Power 2

I have been in favor of scrapping the ACTIVISION_ORIGINAL for some time now... with version control, we definitely should, even if we screw something up, we can revert it easily.

As for posting changes in a thread... it might still be useful. For instance, we need to look at how easy it is to keep the local copy on everyone's HDD in sync with the one at CVS. If such issues are solved easily, then the altered files thread might be redundant.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 12-01-2005 03:59 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Avatar Enlargement: We've got the solution

quote:
Originally posted by Solver
As for posting changes in a thread... it might still be useful. For instance, we need to look at how easy it is to keep the local copy on everyone's HDD in sync with the one at CVS. If such issues are solved easily, then the altered files thread might be redundant.


Assuming people are willing to subscribe and everything goes smoothly then it should consist of simply opening a console in the appropriate directory and type "svn update". Or, if you've installed something like TortoiseSVN, you can just right click on the directory in explorer and tell it to update there.

In theory it's all smooth sailing...

Of course, it's nice to be notified by email about new changes, but the subversion server can be set up to send out emails too.

ctplinuxfan is offline ctplinuxfan
Warlord

Jan 2004
time: 06:31
  Old Post 14-01-2005 05:42
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Get a bigger avatar today!

Well, that's really great news!

For the main questions, i'd vote:
[X] Remove APOLYTON_ORIGINAL tag
despite the higher complexity stated earlier:
- You may thing you'd get an original build, but you would not
- Instead, a tag for apolyton original within subversion repository does the same
- we all have the orignial sources, haven't we?

[X] No further posts to kind of altered source files threads
- Syncing threads with repository is error prone
- svn update is faster than download and unzip patch1, look for conflicts, apply, download and unzip patch2, look for conflicts, apply, download and unzip patch3, look for conflicts, ...

[X] See, if sources are demanded packaged though we have subversion.
- If they are, provide a complete source package from time to time (no all patch)
Alternative a) It's a simple svn export and zipping the directory
Alternative b) it's a zipped checkout from the subversion server (i.e. double size), but users can update without using too much bandwith
- These tasks are scriptable

PS: Sorry, if i'm still a bit inresponsive, i've a lot of work to do and am moving...

Fromafar is offline Fromafar
Prince

May 2003
time: 06:31
  Old Post 17-01-2005 00:31
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Put an end to popups!

APOLYTON_ORIGINAL tag: While I prefer removing it, I realise this means a lot of work, without any obvious benefits. Maybe we should just be lazy and opt for just not actively supporting it anymore. Did anyone change their vote since the last poll? IIRC it was 3 in favour of removal, 5 against.

Posting updates: I have mixed feelings about this. I agree with the listed reasons in favour of stopping, but I fear that this will be bad for the project. It now serves as a kind of progress report, and may motivate people to play/test, because they can follow what is happening. It may be undesirable to have this information only available for a limited group/through a version control system.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 17-01-2005 07:02 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by Fromafar
APOLYTON_ORIGINAL tag: While I prefer removing it, I realise this means a lot of work, without any obvious benefits. Maybe we should just be lazy and opt for just not actively supporting it anymore. Did anyone change their vote since the last poll? IIRC it was 3 in favour of removal, 5 against.


Surely they can be automatically removed. I would have thought that the C preprocessor should be able to do this, but if not I'm fairly sure I could throw together something to do it pretty quickly.

quote:
Posting updates: I have mixed feelings about this. I agree with the listed reasons in favour of stopping, but I fear that this will be bad for the project. It now serves as a kind of progress report, and may motivate people to play/test, because they can follow what is happening. It may be undesirable to have this information only available for a limited group/through a version control system.


Perhaps it would still be good to post about updates, but rather than an attachment of the update, simply note the revision number.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 23-03-2005 04:32 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Well, now we have the svn server all properly set up, I'm planning to purge all the ACTIVISION_ORIGINAL directives. Does anyone object?

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:31
  Old Post 23-03-2005 04:59 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Increase Your PM Length

I don't object to the ActOrig stuff since I had a rough time trying to follow it anyways.

As for Altered Files, I prefer saving, mainly because Amateurs like myself probably still need our stuff checked before it gets put on the server. Plus, I havent been able to access the server and not sure I can do the updating.

kaan is offline kaan
Prince
Aarhus
Mar 2001
time: 05:31
  Old Post 23-03-2005 15:23
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Got spare money?

E, you will need to apply for a username/password to be able to use the svn server.
Either mail me or send me a private message with the username and password you want.
Remember to include a statement that says that you have read the Activision source code license and agreed to it.

-klaus

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 23-03-2005 21:52 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by J Bytheway
Well, now we have the svn server all properly set up, I'm planning to purge all the ACTIVISION_ORIGINAL directives. Does anyone object?


Two objections that have to be cleared first. I added for documentation comments like: // Added by Martin Gühmann

With removing ACTIVISION_ORIGINAL derectives, that looks odd. And the second is that I used something like followning to comment out some of Calvitix changes:

#if 1 || defined(ACTIVISION_ORIGINAL)
// Original code
#else
// Calvitix code
#endif

What happens with this if you purge the ACTIVISION_ORIGINAL derectives?

-Martin

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 24-03-2005 05:46 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Inflate your Upload Space

quote:
Originally posted by Martin Gühmann
Two objections that have to be cleared first. I added for documentation comments like: // Added by Martin Gühmann

With removing ACTIVISION_ORIGINAL derectives, that looks odd.


Why? I guess it no longer has the delimiters it used to have, but the comment is still accurate and in the right place...

quote:
And the second is that I used something like followning to comment out some of Calvitix changes:

#if 1 || defined(ACTIVISION_ORIGINAL)
// Original code
#else
// Calvitix code
#endif

What happens with this if you purge the ACTIVISION_ORIGINAL derectives?


Well, the way I was planning to do it, that would become:

#if 1
// Original code
#else
// Calvitix code
#endif

(In other words, change things by assuming ACTIVISIoN_ORIGINAL is false, but don't make any other assumptions (Like that 1 is true)).

That should be moderately easy to automate.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 24-03-2005 21:55 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Avatar Enlargement: We've got the solution

quote:
Originally posted by J Bytheway
Why? I guess it no longer has the delimiters it used to have, but the comment is still accurate and in the right place...


That's right that is at the right place marking the start of the alteration but not the end.

-Martin

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 24-03-2005 23:58 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Call to Power 2

quote:
Originally posted by Martin Gühmann
That's right that is at the right place marking the start of the alteration but not the end.


But that's what version control is for. For example, if I do svn blame ctp2_code/gs/world/UnseenCell.cpp, a part of the output looks like this:

code:
1 activision archive >> l; 266 Martin G├╝hmann 266 Martin G├╝hmann #if defined(ACTIVISION_ORIGINAL) 266 Martin G├╝hmann // Removed by Martin G³hmann 1 activision for(i = 0; i < l; i++) { 1 activision m_installations->AddTail(new UnseenInstallationInfo(archive)); 1 activision } 266 Martin G├╝hmann #else 266 Martin G├╝hmann // Added by Martin G³hmann 266 Martin G├╝hmann UnseenInstallationInfo* tmpUII; 266 Martin G├╝hmann bool vCityOwnerNotSet = true; 266 Martin G├╝hmann for(i = 0; i < l; i++) { 266 Martin G├╝hmann tmpUII = new UnseenInstallationInfo(archive); 1 activision 266 Martin G├╝hmann // Only store the additional UnseenInstallationInfo in the 266 Martin G├╝hmann // save file but not in the UnseenCell object itsself. 266 Martin G├╝hmann if(tmpUII->m_type >= 0){ 266 Martin G├╝hmann m_installations->AddTail(tmpUII); 266 Martin G├╝hmann } 266 Martin G├╝hmann else{ 266 Martin G├╝hmann m_visibleCityOwner = tmpUII->m_visibility; 266 Martin G├╝hmann vCityOwnerNotSet = false; 266 Martin G├╝hmann delete tmpUII; 266 Martin G├╝hmann } 266 Martin G├╝hmann } 266 Martin G├╝hmann // Backwards compartibility: If this UnseenCell didn't have an m_visibleCityOwner 266 Martin G├╝hmann if(vCityOwnerNotSet) m_visibleCityOwner = g_theWorld->GetCell(m_point)->GetCityOwner().m_id; 266 Martin G├╝hmann #endif 266 Martin G├╝hmann 1 activision 1 activision 1 activision m_improvements = new PointerList; 1 activision archive >> l; 1 activision for(i = 0; i < l; i++) {


And after removing the ACTIVISION_ORIGINAL stuff, it should look like:

code:
1 activision archive >> l; 266 Martin G├╝hmann 266 Martin G├╝hmann // Added by Martin G³hmann 266 Martin G├╝hmann UnseenInstallationInfo* tmpUII; 266 Martin G├╝hmann bool vCityOwnerNotSet = true; 266 Martin G├╝hmann for(i = 0; i < l; i++) { 266 Martin G├╝hmann tmpUII = new UnseenInstallationInfo(archive); 1 activision 266 Martin G├╝hmann // Only store the additional UnseenInstallationInfo in the 266 Martin G├╝hmann // save file but not in the UnseenCell object itsself. 266 Martin G├╝hmann if(tmpUII->m_type >= 0){ 266 Martin G├╝hmann m_installations->AddTail(tmpUII); 266 Martin G├╝hmann } 266 Martin G├╝hmann else{ 266 Martin G├╝hmann m_visibleCityOwner = tmpUII->m_visibility; 266 Martin G├╝hmann vCityOwnerNotSet = false; 266 Martin G├╝hmann delete tmpUII; 266 Martin G├╝hmann } 266 Martin G├╝hmann } 266 Martin G├╝hmann // Backwards compartibility: If this UnseenCell didn't have an m_visibleCityOwner 266 Martin G├╝hmann if(vCityOwnerNotSet) m_visibleCityOwner = g_theWorld->GetCell(m_point)->GetCityOwner().m_id; 266 Martin G├╝hmann 1 activision 1 activision 1 activision m_improvements = new PointerList; 1 activision archive >> l; 1 activision for(i = 0; i < l; i++) {


So it's obvious where your modification ends. The information is there if necessary, and even then I don't think it would be particularly useful very often.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 25-03-2005 21:13 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

quote:
Originally posted by J Bytheway
So it's obvious where your modification ends. The information is there if necessary, and even then I don't think it would be particularly useful very often.


But then the comment is useless in the end. However this should be now all. But maybe you should wait for E to allow him to make his code right. Of course can remove them per hand or it can be repeated.

And there is another precompiler derective you should strip: NON_STANDART_C_PLUS_PLUS

I only used in tech_wllist.h, Fromafar never used this. So it is obsolete as well.

-Martin

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 27-03-2005 04:59 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton, buy Civilization 2

Well, after working on this all day I think "moderately easy to implement" was a little optimistic. I've had all sorts of problems I didn't expect due to such things as comments, different line-ending styles, missing terminating newlines, and, of course, Martin's endlessly frustrating umlauts .

However, I think I'm probably done. I'm staring at the steady progress of processing now. If ever anyone wants code to automatically manipulate preprocessor directives, then just ask - I have a very versatile system now .

tombom is offline tombom
Chieftain
Pining for the fjords
Oct 2004
time: 05:31
  Old Post 27-03-2005 12:42
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Increase Your PM Length

I don't seem to get the point of tags. I'd assume they're supposed to be snapshots of certain dates, but i'm not sure.

Last edited by tombom on 27-03-2005 at 13:30

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 27-03-2005 16:43 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Support Apolyton, buy Call to Power 2

quote:
Originally posted by tombom
I don't seem to get the point of tags. I'd assume they're supposed to be snapshots of certain dates, but i'm not sure.


They are supposed to be snapshots at leeast - of certain states of the trunk, probably but not necessarily the state at a given time. The point is that if you want to get a copy of, for example, the release v2.3 of something, it's easier to type

svn co svn://path/to/repos/tags/2.3/

Than to determine what revision number you want, or what date you want and get a copy that way.

  < 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.0529 seconds (90.44% PHP - 9.56% 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