Page 1 of 2 1 2 LastLast
Results 1 to 30 of 36

Thread: Hypothetically Speaking....

  1. #1
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01

    Hypothetically Speaking....

    If someone new wanted to work on the Source Code Project, where would he/she start?

  2. #2
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01

    Post

    I'll tell you what I did recently, although there may be quicker ways.

    - Install CtP2 - a simple directory with no spaces like "C:\Games\CtP2AE" would be ideal.

    - Download the original source code from here. Extract it to the same folder that ctp2_data is in.

    - Download the latest Apolyton Edition (there should be a thread topped in the same forum as this thread) and extract it to your CtP2 folder. Doing this makes sure your ctp2_data is up to date and saves you updating things like pictures and sounds again from the repository.

    - Set your environment variable:
    In order to build, you need an environment variable named CDKDIR on your computer. In Windows XP/2000, go to Control
    Panel->System->Advanced Tab->Environment Variables, and add it, with it's value set to [your source path]/bin, the directory with bison, flex, and other miscellaneous utilities in it. In the example above mine would be C:\Games\CtP2AE\bin

    - If you get a problem compiling regarding "\tmp" then you need to create the temporary folder. In this case I created the folder C:\tmp.

    - Download and install DirectX SDK Oct 2006 from here.

    - Download and install the latest Windows SDK, I used 2008 from here.

    - Download and install the VC++ Express Edition, because it's free, from here.

    See this post on which lib and include directories to add.

    If you're missing strmbasd.lib or the "...DirectShow\BaseClasses\Debug" folder (which you probably are if you followed this), then you need to compile it yourself. See this post on how to do so. Then the Debug folder will be created along with strmbasd.lib inside it.

    - Download and install the latest version of TortoiseSVN from here.

    - Update the source code to the latest with TortoiseSVN from DarkDust's server. See this page. Don't check out the whole repository. Remember to install the latest Apolyton Edition first, then checkout the folders you need to your local CtP2 install folder. If you run into problems check TortoiseSVN help files on how to checkout a local copy of the source.

    - Remove any old database files (ones that remain unmodified after updating the source code) from ...ctp2_code\gs\database folder.

    - Open civctp.dsw with File > Open Project in VC++. Allow it to release the source code bindings and convert to the new VC++ format. When opened you should see 6 elements to the left under the "solution explorer": "Crater", "ctp2", "dbgen", "fault", "geometric", "Plasma2". If you only see "ctp2" you probably opened civctp.dsp by accident.

    ( Note: When you exit VC++ the first time after opening/converting the old solution you will be asked to save the solution, do so. From here on you should only open civctp.sln.)

    - Now attempt to compile the source using "Build > Build Solution" or F7 key.

    ---
    Following these steps I was able to compile the source with no errors.

    Possible problems:

    - "cannot open include file 'afxres.h'". If you installed the Windows SDK this can be found in \Microsoft SDKs\Windows\v6.1\Samples\winui\TSF\tsfapp. Add that folder to your include directories after the DXSDK includes and DirectShow\BaseClasses includes.

    - "missing *.dll". If you're missing a .dll file simply copy it from the original ctp2.exe folder of "\ctp2_program\ctp" to the "\ctp2_code\ctp" folder, so you can run the newly compiled ctp2.exe from there. (As of writing (20-Sep-2009) you will only need to copy over mss32.dll.)

    If you still get problems, read this thread, or better follow my path (starting from post #265) to getting the source to compile. As you may run into the same problems.

    - To modify the source code on his server, you need to email DarkDust to get a user account.

    ---
    If you're using VC6.0 you might need an older DXSDK. For release versions Martin uses a DXSDK from February 2002 with VC6.0, using those you can just follow the instructions in the source code readme.

    ---
    Using the debug build. When you run the debug build for the first time if you get the MSVCRTD.DLL missing error download the one I've attached here and unzip it to the \ctp2_code\ctp folder. This dll is from the VC6 CD and not from a "download-dll.com" website.

    To switch from the game to VC++ Express Edition cleanly, you will need to add this program argument:

    nonexclusive

    in VC++ EE you can add these by right clicking "ctp2" in the solution explorer and clicking properties. Add in "configuration properties" > "debugging", in "command arguments". Do the same for "Crater".

    I also use nointromovie (or you can remove the CD check and play without a CD, that also skips the intro). Other arguments (that I've yet to try) are notimeslice and runinbackground.
    Last edited by Maquiladora; February 16, 2010 at 14:21.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  3. #3
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    Thanks you teh Info.

  4. #4
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01
    Updated first post with debug build stuff. Mainly as a reminder to myself.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  5. #5
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    If you're missing strmbasd.lib (in the ...DirectShow\BaseClasses\Debug folder) (which you probably are if you followed this), then you need to compile it yourself. See this post on how to do so.
    I can't find this folder?

    nm
    Last edited by EPW; March 4, 2009 at 07:15.

  6. #6
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    Update the source code to the latest with TortoiseSVN from DarkDust's server. See this page. Don't check out the whole repository. Check TortoiseSVN help files how to checkout and update your local copy of the source.
    Ugh, I got about 50mb of data extra before I figured I was doing this wrong. I'm only getting the code now. I hope I didn't cause any excessive bandwidth use issues....

  7. #7
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    I should delete ALL those old DB sources.?

  8. #8
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01

    Post

    Quote Originally Posted by EPW View Post
    This quote is hidden because you are ignoring this member. Show Quote
    I should delete ALL those old DB sources.?
    Just the files left unmodified after you've updated the source, they will probably have no icon over them if using TortoiseSVN. Up to date files have a green circle with what looks like a white tick inside. I got 34 unmodified.

    Probably better just move them first, and see how it compiles.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  9. #9
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01

    Code:
    C:\Program Files\Activision\Call To Power 2\CTP2\ctp2_code\gs\newdb\AgeRecord.h(38) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    C:\Program Files\Activision\Call To Power 2\CTP2\ctp2_code\gs\newdb\AgeRecord.h(38) : warning C4183: 'Init': missing return type; assumed to be a member function returning 'int'
    C:\Program Files\Activision\Call To Power 2\CTP2\ctp2_code\gs\newdb\WonderRecord.h(132) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    C:\Program Files\Activision\Call To Power 2\CTP2\ctp2_code\gs\newdb\WonderRecord.h(132) : warning C4183: 'Init': missing return type; assumed to be a member function returning 'int'
    Init() is in AgeRecord.h and WonderRecord.h....

  10. #10
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01
    Did you remove the unmodified files from the right folder gs\database? Not gs\newdb.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  11. #11
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    Yeah....but it looks like most of the files in newdb are ignored for some reason.

  12. #12
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01

    Post

    Quote Originally Posted by EPW View Post
    This quote is hidden because you are ignoring this member. Show Quote
    Yeah....but it looks like most of the files in newdb are ignored for some reason.
    You could try following the steps outlined by fromafar here.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  13. #13
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    ugh, VC++ reads C:/Program Files/yadda yadda... as C:/Program ERROR ERROR ERROR doesn't it? So many reason to hate Do I have to reinstall DX/WINDOWS SDK to fix?

  14. #14
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01

    Post

    Quote Originally Posted by EPW View Post
    This quote is hidden because you are ignoring this member. Show Quote
    ugh, VC++ reads C:/Program Files/yadda yadda... as C:/Program ERROR ERROR ERROR doesn't it? So many reason to hate Do I have to reinstall DX/WINDOWS SDK to fix?
    No, I don't think so, at least not VC++ 2008. Mine are both installed in Program Files.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  15. #15
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    No?? Maybe I need to go to sleep been nearly 24 hr

  16. #16
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01

    Arrow

    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  17. #17
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    I made -some- progress, but its rather a pain to compile isn't it?

  18. #18
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01
    It can be the first time. Once it's done though it's plain sailing.

    If you're having problems then post the errors. I'm sure Martin or someone else lurking around will be able to help. I doubt I will, except to post links to helpful posts made by others.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  19. #19
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    Well, I figured out what I was doing wrong(so far). I am too embarrassed to give details, it is enough to say I misread your instructions at a key point.

  20. #20
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    Okay, I've established VC doesn't like me. Why the heck is it looking in "cygdrive" during the custom build step. "cygdrive" is part of the cygwin application, which I have uninstalled, and should have nothing to do with ctp2 or VC:

    Code:
    ------ Build started: Project: dbgen, Configuration: Final Win32 ------
    Performing Custom Build Step
    /cygdrive/c/Program Files/Activision/Call To Power 2/bin/byacc: f - cannot open "/tmp"
    Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
    Build log was saved at "file://c:\Program Files\Activision\Call To Power 2\ctp2_code\gs\dbgen\Final\BuildLog.htm"
    dbgen - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  21. #21
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01

    Post

    Quote Originally Posted by EPW View Post
    This quote is hidden because you are ignoring this member. Show Quote
    Okay, I've established VC doesn't like me. Why the heck is it looking in "cygdrive" during the custom build step. "cygdrive" is part of the cygwin application, which I have uninstalled, and should have nothing to do with ctp2 or VC:

    Code:
    ------ Build started: Project: dbgen, Configuration: Final Win32 ------
    Performing Custom Build Step
    /cygdrive/c/Program Files/Activision/Call To Power 2/bin/byacc: f - cannot open "/tmp"
    Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
    Build log was saved at "file://c:\Program Files\Activision\Call To Power 2\ctp2_code\gs\dbgen\Final\BuildLog.htm"
    dbgen - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    I think E got the same problem as you here. And see Martin's reply afterward.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  22. #22
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    Woohoo!!


  23. #23
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01
    So tell us all how you fixed the tmp directory thing.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  24. #24
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,937
    Country
    This is EPW's Country Flag
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    14:01
    I just added the Environmental variable TMPDIR = C:\tmp.

  25. #25
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01
    A clean copy of MSVCRTD.DLL:
    Attached Files Attached Files
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  26. #26
    JoeB12345
    Settler
    Join Date
    10 Dec 2006
    Posts
    9
    Country
    This is JoeB12345's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    21:01
    Quote Originally Posted by Maquiladora View Post
    This quote is hidden because you are ignoring this member. Show Quote
    I also use nointromovie (or you can remove the CD check and play without a CD, that also skips the intro). Other arguments (that I've yet to try) are notimeslice and runinbackground.
    How do you do remove the cd part?

    my disk does not read right any more.

  27. #27
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01
    Quote Originally Posted by JoeB12345 View Post
    This quote is hidden because you are ignoring this member. Show Quote
    How do you do remove the cd part?

    my disk does not read right any more.
    I can't remember what I did exactly. Just search in the source code for things like CDDRIVE or CDCHECK things like that. It's all inside one small source file and I juts changed one or two lines there.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  28. #28
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,254
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01

    Post

    Quote Originally Posted by Maquiladora View Post
    This quote is hidden because you are ignoring this member. Show Quote
    I can't remember what I did exactly. Just search in the source code for things like CDDRIVE or CDCHECK things like that. It's all inside one small source file and I juts changed one or two lines there.
    Or compile it as release version. That is an optimized version without the CD-check.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  29. #29
    JoeB12345
    Settler
    Join Date
    10 Dec 2006
    Posts
    9
    Country
    This is JoeB12345's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    September 1, 2014
    Local Time
    21:01
    Quote Originally Posted by Martin Gühmann View Post
    This quote is hidden because you are ignoring this member. Show Quote
    Or compile it as release version. That is an optimized version without the CD-check.

    -Martin
    Can some one do that for me?

  30. #30
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,254
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    September 1, 2014
    Local Time
    22:01

    Post

    Quote Originally Posted by JoeB12345 View Post
    This quote is hidden because you are ignoring this member. Show Quote
    Can some one do that for me?
    And then what, compile the next version, too? And the following too, and so on? I am sorry, but we are not allowed to distribute a version without a CD check.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

Page 1 of 2 1 2 LastLast

Similar Threads

  1. hypothetically...
    By Heraclitus in forum Off Topic
    Replies: 205
    Last Post: December 7, 2009, 13:45
  2. Speaking of Romans....
    By Zkribbler in forum Off Topic
    Replies: 13
    Last Post: August 8, 2008, 17:05
  3. Speaking ill of the dead.
    By Dinner in forum Off Topic
    Replies: 46
    Last Post: July 15, 2008, 17:05
  4. Speaking of Hypocrisy
    By DaShi in forum Off Topic
    Replies: 4
    Last Post: May 26, 2005, 05:55
  5. Speaking in Smilies
    By -Jrabbit in forum Off-Topic-Archive
    Replies: 18
    Last Post: January 10, 2003, 08:26

Bookmarks

Posting Permissions