HOWTO: debug taspring 0.40b2 source distribution
Moderator: Moderators
-
- Posts: 24
- Joined: 28 Apr 2005, 00:26
HOWTO: debug taspring 0.40b2 source distribution
Well it took some time messing around, but I think I've got a procedure which should allow you to run TaSpring in the MSVC++ .NET 2003 debugger. After you follow this procedure, you should be able to make code changes and simply hit F5 to run TaSpring and debug your code changes immediately.
1) Download the TASpring 0.40b2 binary-only distribution and install into "C:\program files\taspring"
2) Download the TASpring 0.40b2 source and extract to "C:\taspring_0.40b2_src"
3.1) Open the lesson2.sln solution file in MSVC++ .NET 2003
3.2) To make sure that the UnitSync.sln will link correctly, you will need to open HpiHandler.cpp and comment out line 56, change it to:
//info->AddLine("No hpi files found, enabling backup unit");
3.3)To make sure you can actually run the program in the MSVC++ Debugger, open Game.cpp and modify line 2039, change it to:
CFileHandler f("C:\taspring_0.40b2_src\rts\bagge\Debug.exe");
3.3) Build lesson2.sln (the output files will be written to "taspring_0.40b2_src\rts\bagge")
4.1) Open the crashrpt.sln solution file in MSVC++ .NET 2003
4.2) To build correctly, you may need to set the include path (Tools|Options|Projects|VC++ Directories|Include Directories) to taspring_0.40b2_src\crashrpt\wtl40
4.3 Build crashrpt (the output files will be written to "taspring_0.40b2_src\crashrpt\bin\debug")
4.4) Copy the following file from taspring_0.40b2_src\crashrpt\bin\debug into the folder "taspring_0.40b2_src\rts"
crashrpt.dll
5.1) Open the SpringClient.sln solution file in MSVC++ .NET 2003
5.2) Build SpringClient.sln (the output files will be written to "taspring_0.40b2_src\rts\debug")
5.3) Move the following files from "taspring_0.40b2_src\rts\bagge" into the folder "taspring_0.40b2_src\rts"
ClientControls.dll
SpringClient.exe
6.1) Open the RtsSettings.sln solution file in MSVC++ .NET 2003
6.2) Build RtsSettings.sln (the output files will be written to "taspring_0.40b2_src\RtsSettings\Debug")
6.3) Move the following file from "taspring_0.40b2_src\RtsSettings\Debug" into the folder "taspring_0.40b2_src\rts"
RtsSettings.exe
7.1) Open the UnitSync.sln solution file in MSVC++ .NET 2003
7.2) To build correctly, you may need to set the include path (Tools|Options|Projects|VC++ Directories|Include Directories) to taspring_0.40b2_src\rts, since UnitSync uses some Lesson2.sln headers.
7.3) Build UnitSync.sln (the output files will be written to "taspring_0.40b2_src\unitsync\Debug)
7.3) Copy the following file from "taspring_0.40b2_src\unitsync\Debug" to the folder "taspring_0.40b2_src\rts"
unitsync.dll
8.1) Browse to "taspring_0.40b2_src\CentralBuildAI" and open the TestAI.sln solution file in MSVC++ .NET 2003
8.2 Build the TestAi.sln file
9.1) Browse to "taspring_0.40b2_src\MetalMakerAI" and open the TestAI.sln solution file in MSVC++ .NET 2003
9.2 Build the TestAi.sln file
10.1) Browse to "taspring_0.40b2_src\SimpleFormationAI" and open the TestAI.sln solution file in MSVC++ .NET 2003
10.2 Build the TestAi.sln file
11.1) Rename the file "taspring_0.40b2_src\rts\bagge\aidll\default.dll" to "taspring_0.40b2_src\rts\bagge\aidll\simpleform.dll"
11.2) Copy the following folder (previously built when building the AIs) from "taspring_0.40b2_src\rts\bagge" to ""taspring_0.40b2_src\rts"
aidll
12) Copy the following file (previously built when building SpringClient.sln) from "taspring_0.40b2_src\SpringClient\utility\debug" into the folder "taspring_0.40b2_src\rts"
utility.dll
13) Copy the following folders from "c:\program files\taspring" into the folder "taspring_0.40b2_src\rts"
bitmaps
maps
shaders
14) Copy the following text files from "c:\program files\taspring" into the folder "taspring_0.40b2_src\rts"
armor.txt
selectkeys.txt,
uikeys.txt
15) Copy following files from "c:\program files\taspring" into the folder "taspring_0.40b2_src\rts"
bagge.fnt
Luxi.ttf
PALETTE.PAL
tower.sdu
dbghelp.dll
HPIUtil.dll
zlib.dll
SelectionEditor.exe
16) Copy the totala1.hpi file from your installation of Total Annihilation (c:\cavedog) and copy it into the folder "taspring_0.40b2_src\rts"
17) Double click on "taspring_0.40b2_src\rts\rtssettings.exe" to open the settings and then immediately close it by clicking on the OK button. This will save the default settings.
18.1) Open the lesson2.sln solution file in MSVC++ .NET 2003
18.2) Hit the F5 key to start and TASPRING should now be running in the MSVC++ Debugger! You should now be able to set breakpoints and examine how the code works in detail.
Notes:
Even though you are running taspring_0.40b2_src\rts\bagge\Debug.exe in the debugger, the program will expect to find all of its run-time files/folders within the taspring_0.40b2_src\rts directory. The source distribution does not have the run-time files/folders necessary, so this is why we copied files into the taspring_0.40b2_src\rts directory.
1) Download the TASpring 0.40b2 binary-only distribution and install into "C:\program files\taspring"
2) Download the TASpring 0.40b2 source and extract to "C:\taspring_0.40b2_src"
3.1) Open the lesson2.sln solution file in MSVC++ .NET 2003
3.2) To make sure that the UnitSync.sln will link correctly, you will need to open HpiHandler.cpp and comment out line 56, change it to:
//info->AddLine("No hpi files found, enabling backup unit");
3.3)To make sure you can actually run the program in the MSVC++ Debugger, open Game.cpp and modify line 2039, change it to:
CFileHandler f("C:\taspring_0.40b2_src\rts\bagge\Debug.exe");
3.3) Build lesson2.sln (the output files will be written to "taspring_0.40b2_src\rts\bagge")
4.1) Open the crashrpt.sln solution file in MSVC++ .NET 2003
4.2) To build correctly, you may need to set the include path (Tools|Options|Projects|VC++ Directories|Include Directories) to taspring_0.40b2_src\crashrpt\wtl40
4.3 Build crashrpt (the output files will be written to "taspring_0.40b2_src\crashrpt\bin\debug")
4.4) Copy the following file from taspring_0.40b2_src\crashrpt\bin\debug into the folder "taspring_0.40b2_src\rts"
crashrpt.dll
5.1) Open the SpringClient.sln solution file in MSVC++ .NET 2003
5.2) Build SpringClient.sln (the output files will be written to "taspring_0.40b2_src\rts\debug")
5.3) Move the following files from "taspring_0.40b2_src\rts\bagge" into the folder "taspring_0.40b2_src\rts"
ClientControls.dll
SpringClient.exe
6.1) Open the RtsSettings.sln solution file in MSVC++ .NET 2003
6.2) Build RtsSettings.sln (the output files will be written to "taspring_0.40b2_src\RtsSettings\Debug")
6.3) Move the following file from "taspring_0.40b2_src\RtsSettings\Debug" into the folder "taspring_0.40b2_src\rts"
RtsSettings.exe
7.1) Open the UnitSync.sln solution file in MSVC++ .NET 2003
7.2) To build correctly, you may need to set the include path (Tools|Options|Projects|VC++ Directories|Include Directories) to taspring_0.40b2_src\rts, since UnitSync uses some Lesson2.sln headers.
7.3) Build UnitSync.sln (the output files will be written to "taspring_0.40b2_src\unitsync\Debug)
7.3) Copy the following file from "taspring_0.40b2_src\unitsync\Debug" to the folder "taspring_0.40b2_src\rts"
unitsync.dll
8.1) Browse to "taspring_0.40b2_src\CentralBuildAI" and open the TestAI.sln solution file in MSVC++ .NET 2003
8.2 Build the TestAi.sln file
9.1) Browse to "taspring_0.40b2_src\MetalMakerAI" and open the TestAI.sln solution file in MSVC++ .NET 2003
9.2 Build the TestAi.sln file
10.1) Browse to "taspring_0.40b2_src\SimpleFormationAI" and open the TestAI.sln solution file in MSVC++ .NET 2003
10.2 Build the TestAi.sln file
11.1) Rename the file "taspring_0.40b2_src\rts\bagge\aidll\default.dll" to "taspring_0.40b2_src\rts\bagge\aidll\simpleform.dll"
11.2) Copy the following folder (previously built when building the AIs) from "taspring_0.40b2_src\rts\bagge" to ""taspring_0.40b2_src\rts"
aidll
12) Copy the following file (previously built when building SpringClient.sln) from "taspring_0.40b2_src\SpringClient\utility\debug" into the folder "taspring_0.40b2_src\rts"
utility.dll
13) Copy the following folders from "c:\program files\taspring" into the folder "taspring_0.40b2_src\rts"
bitmaps
maps
shaders
14) Copy the following text files from "c:\program files\taspring" into the folder "taspring_0.40b2_src\rts"
armor.txt
selectkeys.txt,
uikeys.txt
15) Copy following files from "c:\program files\taspring" into the folder "taspring_0.40b2_src\rts"
bagge.fnt
Luxi.ttf
PALETTE.PAL
tower.sdu
dbghelp.dll
HPIUtil.dll
zlib.dll
SelectionEditor.exe
16) Copy the totala1.hpi file from your installation of Total Annihilation (c:\cavedog) and copy it into the folder "taspring_0.40b2_src\rts"
17) Double click on "taspring_0.40b2_src\rts\rtssettings.exe" to open the settings and then immediately close it by clicking on the OK button. This will save the default settings.
18.1) Open the lesson2.sln solution file in MSVC++ .NET 2003
18.2) Hit the F5 key to start and TASPRING should now be running in the MSVC++ Debugger! You should now be able to set breakpoints and examine how the code works in detail.
Notes:
Even though you are running taspring_0.40b2_src\rts\bagge\Debug.exe in the debugger, the program will expect to find all of its run-time files/folders within the taspring_0.40b2_src\rts directory. The source distribution does not have the run-time files/folders necessary, so this is why we copied files into the taspring_0.40b2_src\rts directory.
-
- Posts: 24
- Joined: 28 Apr 2005, 00:26
Easiest way is probably
1: Extract source into directory (call it <base>)
2: Install the full installer into <base>/rts/bagge
3: Open the lesson02 project in <base>/rts
4: Set working dir to bagge
5: Compile as debug
6: Debug
Now this wont compile the different AI dlls etc as debug but normally you dont need to debug inside those.
1: Extract source into directory (call it <base>)
2: Install the full installer into <base>/rts/bagge
3: Open the lesson02 project in <base>/rts
4: Set working dir to bagge
5: Compile as debug
6: Debug
Now this wont compile the different AI dlls etc as debug but normally you dont need to debug inside those.
wow, thats good news. I was worried i'de have to go out and buy Visual Studio, So quick question then i'll go off and have a good rummage at the source...
Is there a cheaper alternative to the Microsoft Visual Studio c++ as it would be easier to use that instead of debugging the source...
What exactly is " C++ 7 "? is thats some kind of Microsoft Modification of C++? I'm just used to the good old original C++ nothing fancy.
Is there a cheaper alternative to the Microsoft Visual Studio c++ as it would be easier to use that instead of debugging the source...
What exactly is " C++ 7 "? is thats some kind of Microsoft Modification of C++? I'm just used to the good old original C++ nothing fancy.
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
At my programming course, instead of programming C# and ASP in Visual Studio, i'm using Borland C# builder which is free for non-comercial use (or something of the sort). It is a nice program.Jonny C wrote:...
Is there a cheaper alternative to the Microsoft Visual Studio c++ ...
[edit]
Was that a question or a statment?
[/edit]
I've just been having a look for the downloadable Microsoft c# but i can't find it! 
The MSDN website says you need a subscription, and i tried using my passport (MSN) but if i try to associate it with the MSDN it requests my 'Subscription or Personal ID' (which i'm presuming you need to work for microsoft or have a subscription to register)
any suggestions?
Jonny C.

The MSDN website says you need a subscription, and i tried using my passport (MSN) but if i try to associate it with the MSDN it requests my 'Subscription or Personal ID' (which i'm presuming you need to work for microsoft or have a subscription to register)

any suggestions?
Jonny C.
ok, so if i can't find a free version of Visual C++, can sombody give me a few tips as to how i initially load the RTS into my Borland C++ 5 compiler? (Or DEV bloodshead, which ever you prefer). I've tried looking through the lesson2.proj but its huge and i aint feeling like attempting to individually convert the syntax for a borland / DEV project file...
is their an easier way? please help I really wanna do some debugging for the game :)
Once i get going i can help ya with all your 'to do's...
Jonny C.
is their an easier way? please help I really wanna do some debugging for the game :)
Once i get going i can help ya with all your 'to do's...
Jonny C.
- [K.B.] Napalm Cobra
- Posts: 1222
- Joined: 16 Aug 2004, 06:15
hello again.
I've been fiddling with DEV bloodshead c++ and i found the import thing for the Microsoft project file but now i can't find the project file for the source code. The one in the source is 'lesson2.vcproj' If you try to import it, Dev just says that this isn't supported.
Any suggestions as to how i can compile the source code ? ? ?
Please Help! :)
Jonny C.
I've been fiddling with DEV bloodshead c++ and i found the import thing for the Microsoft project file but now i can't find the project file for the source code. The one in the source is 'lesson2.vcproj' If you try to import it, Dev just says that this isn't supported.
Any suggestions as to how i can compile the source code ? ? ?

Please Help! :)
Jonny C.
ok, I've 'opened' (included) all the files into both Borland 5 C++ and Dev C++.
As i was told; there was lots of errors. (Dev seems to have less, it says that there is a type conversion error where a variable is of type Int and it should be a float. (or somthing like that)... anyway, I'm wondering if there is anyone else out there that has a copy of the source wich is 'debugged' to work with Dev or Borland? (mainly because it could take me weeks just to get this code to compile properly...)
:)
thanks
As i was told; there was lots of errors. (Dev seems to have less, it says that there is a type conversion error where a variable is of type Int and it should be a float. (or somthing like that)... anyway, I'm wondering if there is anyone else out there that has a copy of the source wich is 'debugged' to work with Dev or Borland? (mainly because it could take me weeks just to get this code to compile properly...)
:)
thanks
Yeah I tried creating a project in DevCPP too. Like you said, GCC does not accept implicit int in a function declaration, such as "virtual SomeFunction (int a)". The TA spring linux port will solve that, but that brings up a question: Will the linux source tree be merged with the win32 source tree at some point? It would really help compatibility with DevC++ and maybe other compilers...
I also tried VC6 but it doesn't really compile well either, probably because the templates don't really match those of VC .NET 2003 (VC6 has incomplete template support).
hmm i'm getting a little OT though, sorry
I also tried VC6 but it doesn't really compile well either, probably because the templates don't really match those of VC .NET 2003 (VC6 has incomplete template support).
hmm i'm getting a little OT though, sorry
Yes, I hope.Zaphod wrote:Will the linux source tree be merged with the win32 source tree at some point?
Our (porters) code should still run under Windows; we'd like if somebody would let us know if it does. It compiles under Linux now, but does not work yet, so most if not all of those warnings should be gone.
https://lolut.utbm.info/svn/taspring_linux/trunk/