From: metro Chicago, Illinois, USA
Coder Diary #5 -- Code Merge Mission Accomplished!
When I first got access to the Campaign Series code in early March, there were two separate codebases
the inherited Campaign Series codebase
the inherited Modern Wars codebase (a fork of the Campaign Series codebase)
Since early March, I have been working with a copy of the latter inherited Modern Wars codebase
So now, we have a third codebase
my Modern Wars codebase (a fork of the inherited Modern Wars codebase)
That's three codebases in total. It gets to be rather hard to manage, not to mention confusing.
It is absolutely vital that I merge the codebases! And the sooner the better.
No, just by throwing the appropriate IDE switches, we want the capability to rebuild the entire Campaign Series of games (including Modern Wars and all future titles) in an hour or two -- the time required for the Microsoft Visual Studio IDE to compile and link the half dozen or games in the current lineup (EF, WF, RS, and the future ME, VW, and others). With all new features and bug fixes etc. in perfect sync.
By now, I am more than half way through the code merge process. I anticipate finishing up by sometime next week. Then I re-import back into the MS Visual Studio IDE, and I get to see if the whole thing blows up!
So a couple of days ago I had finished the code merge, and vetted the results.
Then I re-imported back into the MS Visual Studio IDE. And of course the whole thing blew up!
Hundreds and hundreds of compiler errors. Um, what's wrong here?
Doh! But of course. Because I had introduced hundreds and hundreds of new '#if defined(MIDDLE_EAST) ... #endif' (for example) constructs to dozens of files, those files needed the addition of
lines in order to capture the defines in version.h:
// v e r s i o n . h
// Common version specification file.
// begin edits
#define verYear "2013"
#define verVersion "Alpha 20130614"
// end edits
For without those defines, the '#if defined(MIDDLE_EAST) ... #endif' directives would never activate, meaning that code snippets and sections would be absent from the preprocessed code, implying all sorts of holes in the code (e.g., missing variable declarations).
By means I won't describe here, I readily identified all files lacking the needed '#include "../../version.h"' directives, then edited in the missing #include line into all relevant files.
I then retried the ME builds, and ... a few more errors and glitches, easily fixed (and not worth detailing).
Then, another retry, and ... success!
Then, an attempted build of VN, and ... more success!
Great! With the merged codebase, I verified I can build the Modern Wars .exe's. What about the earlier Campaign Series .exe's?
After another day or two of tweaking, I have achieved a successful build of East Front, as evidenced by the above screenshot. (4 out of 5 EF .exe's now build successfully, with just the game frontend still to tweak). West Front & Rising Sun build just as successfully.
Whew! I'm glad the code merge has worked out so well. I am ever so glad to put that tedious, boring work behind me.
I end this Coder Diary #5 with the reminder:
And more gain. By merging now, we have greater flexibility in our release schedules. (Hint, hint. )
Among other considerations, the ability to advance the release schedule of 1.05 is one of the biggest reasons for my undertaking the CS/MW codebase merge described in my Coder Diary #4. For that reason, future post-1.05 patches should come out faster too.
How long do we all have to wait? It's not for me to decide. But it's assuredly a matter of months, not a year or more. That I think it's safe to say.
Until the next time ...