How to Compile CTP2 Source Code
with MS Visual C++ 6.0
on Windows 98SE

1.	Download the Source Code here: http://apolyton.net/ctp2/files/CTP2_Source.exe and install it in “C:\Activision\ctp2”.
2.	Go to the Root Directory of your computer (C:\) and open “Autoexec.bat”.  In “Autoexec.bat” add the following lines:
SET CDKDIR=C:\Activision\CTP2\bin
SET PATH=%PATH%;C:\Activision\CTP2\bin
	
3.	Install DirectX 9.0 SDK and Direct Media 6.0 SDK.  These files can be downloaded here:

One is here: http://www.microsoft.com/downloads/...&displaylang=en (186 MB) 
Second is here: http://www.microsoft.com/downloads/...4C-E7D710E18522 (92 MB)

4.	Start MS Visual C++ 6.0

5.	Goto File>Open and browse for the “C:\Activision\CTP2\ctp2_code\ctp” folder.  Select the file “civctp.dsw”.

6.	Once the file has been opened and fully loaded, go to Tools>Options>Directories, Include Files and add “C:\DX90SDK\Include”, “C:\DXMedia\include”, and “C:\DXMedia\classes\base”  to your include directories.  MAKE SURE THESE FILES ARE AT THE TOP OF THE LIST!

7.	In Tools>Options>Directories, go to Libraries and add “C:\DX90SDK\Lib”, “C:\DXMedia\lib”, and “C:\Activision\CTP2\ctp2_code\libs” to your library files.  Again, MAKE SURE THESE FILES ARE AT THE TOP OF THE LIST!

8.	In “C:\Activision\CTP2\ctp2_code\libs” create a directory named “DXMedia” with a subdirectory named “lib”, “directx” with a subdirectory named “lib”, and “miles”.

9.	Copy the contents of the “C:\DX90SDK\Lib” to “C:\Activision\CTP2\ctp2_code\libs\directx\lib” and copy the contents of “C:\DXMedia\lib” to “C:\Activision\CTP2\ctp2_code\libs\DXMedia\lib”

10.	Download “mss32.lib” from: http://users.tpgi.com.au/jonwil/mss32.lib and copy the file to “C:\Activision\CTP2\ctp2_code\libs\miles”.

11.	Download “mss.h” from: http://users.tpgi.com.au/jonwil/mss.h and copy the file to “C:\Activision\CTP2\ctp2_code\sound”

12.	Open “mss.h” and remove the HTML tags at the top of the file.

13.	In order for byacc to work you need to create two directories.  In “C:\” create a directory called “tmp” and in “C:\Activision\CTP2\bin” create another directory called “tmp”.  Byacc only needs one of these, but I never figured out which one.  I had both and it worked, so it can’t hurt to have both.

14.	In VC++, highlight “Crater files”.  Go to Build>SetActiveConfiguration”.  Select “Crater – Win32 Debug”.  Click “OK”.  Then Build>Crater.dll

15.	Repeat step 14 for “Fault”, “Geometric”, and “Plasma2”.

16.	Highlight “dbgen files”. Go to Build>SetActiveConfiguration”.  Select “Dbgen – Win32 Debug”.  Click “OK”.  

17.	In the “File View” tab of the project window in the left-hand corner, expand the files under “dbgen files”.  Right-click “ctpdb.y” and select “Settings…”  and click the “Custom Build” tab.  In the “Commands” dialogue box, replace “$(CDKDIR)” with “C:\Activision\CTP2\bin”.  In the dialogue box to the left, do the same for “ctpdb.l”.  Click “OK” to close the dialogue box. 

18.	Build>ctpdb.exe

19.	Hightlight “Ctp2 files”.  Go to Build>SetActiveConfiguration”.  Select “Ctp2 – Win32 Debug”.  Click “OK”.

20.	Repeat step 17 for “ctp2 files” and change the path for the following files:

ctp2\gs\slic\slic.l
ctp2\gs\slic\slic.y
ctp2\gs\slic\sliccmd.l
ctp2\gs\slic\sliccmd.y
ctp2\gs\newdb\DBlexer.l
ctp2\ui\ldl\ldl.l
ctp2\ui\ldl\ldl.y

21.	Build>”CivCTP2_dbg.exe”

22.	Go to the store, talk to your girlfriend, remind your family you still exist.  In 25 minutes, “CivCTP2_dbg.exe” will have compiled with 0 errors.  The file size will be 14.2MB.  

23.	Copy “CivCTP2_dbg.exe” to “C:\Program Files\Activision\Call To Power 2\ctp2_program\ctp”, or wherever you installed the actual CTP2 game.

24.	Copy “anet2d.dll” from “C:\Activision\CTP2\ctp2_code\ctp” and put it in “C:\Program Files\Activision\Call To Power 2\ctp2_program\ctp” with the .exe file you just created and run the game!!!