CSAI Build Instructions: Difference between revisions

From Spring
Jump to navigationJump to search
→Building CSAI: noted that compiling only C# AI does not require C++ compiler
Flozi (talk | contribs)
AI -> AI Dev
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Building CSAI ==
== Building CSAI ==


CSAI is built using nant, the Microsoft Visual C++ 2003 compiler, and Framework .Net 1.1
The CSAI zipfile comes with the binaries prebuilt. You might wish to build CSAI if:
 
*you want to modify/extend the C# AI
Note that if you only wish to modify the C# AI, ie the CSAI directory, you only need nant and the Framework .Net 1.1. You wont need the Visual C++ compiler or the platform SDK.
*you want to extend the C /C# AI interface
 
nant requires the C++ compiler and platform SDK if you change a file in the CSAILoader or CSAIInterfaces directory.


=== You will need ===
=== You will need ===


If you wish to modify the C# AI, ie the CSAI directory, you will need:
*Framework .Net 1.1 runtime (only need runtime, not SDK)
*nant
*nant
*Framework .Net 1.1
*Spring
*Visual C++ 2003 compiler
*Contents of CSharpAI.zip
 
If you want to extend the C  /C# interface, ie change the files in the CSAILoader or CSAIInterfaces directory, you will need in addition:
*Visual C   2003 compiler
*Microsoft Platform SDK
*Microsoft Platform SDK
*Spring
*Spring sourcecode
*Spring sourcecode


=== Build instructions ===
nant will automatically detect if you changed files in the CSAILoader or CSAIInterfaces directory, so as long as you dont change files in these directories it wont ask you for the C  compiler.
 
=== Build instructions, C# AI only ===
 
Using nant:
 
*open a cmd prompt and go to the unzipped CSharpAI directory
*open AllCSAI.build file with a text editor, and specify the locations of:
**spring (directory containing spring.exe)
*add nant to PATH
*type "nant" and press return
 
The C# AI dll should build and be copied into the appropriate place in the Spring application directory tree.
 
Alternatively, using Visual C# 2003:
 
*Create a new project of type "class library" called "CSAI"
*Add CSAIInterfaces\CSAIInterfaces.dll as a Reference
*Add the .cs files in the CSAI to the project
*Select "Build"
*Manually copy the CSAI.dll and CSAI.pdb files from the project's Debug directory into the AI\CSAI subdirectory of the spring application directory
 
=== Build instructions, C# AI and C# AI Interface ===


*open the msvcvars.bat cmd prompt and go to the CSharpAI directory
*open the msvcvars.bat cmd prompt and go to the unzipped CSharpAI directory
*open AllCSAI.build file with a text editor, and specify the locations of:
*open AllCSAI.build file with a text editor, and specify the locations of:
**spring (directory containing spring.exe)
**spring (directory containing spring.exe)
Line 27: Line 51:


With everything configured ok, the dlls should build and be copied into the appropriate place in the Spring application directory tree.
With everything configured ok, the dlls should build and be copied into the appropriate place in the Spring application directory tree.
[[Category: AI Dev]]

Latest revision as of 17:45, 23 March 2013

Building CSAI

The CSAI zipfile comes with the binaries prebuilt. You might wish to build CSAI if:

  • you want to modify/extend the C# AI
  • you want to extend the C /C# AI interface

You will need

If you wish to modify the C# AI, ie the CSAI directory, you will need:

  • Framework .Net 1.1 runtime (only need runtime, not SDK)
  • nant
  • Spring
  • Contents of CSharpAI.zip

If you want to extend the C /C# interface, ie change the files in the CSAILoader or CSAIInterfaces directory, you will need in addition:

  • Visual C 2003 compiler
  • Microsoft Platform SDK
  • Spring sourcecode

nant will automatically detect if you changed files in the CSAILoader or CSAIInterfaces directory, so as long as you dont change files in these directories it wont ask you for the C compiler.

Build instructions, C# AI only

Using nant:

  • open a cmd prompt and go to the unzipped CSharpAI directory
  • open AllCSAI.build file with a text editor, and specify the locations of:
    • spring (directory containing spring.exe)
  • add nant to PATH
  • type "nant" and press return

The C# AI dll should build and be copied into the appropriate place in the Spring application directory tree.

Alternatively, using Visual C# 2003:

  • Create a new project of type "class library" called "CSAI"
  • Add CSAIInterfaces\CSAIInterfaces.dll as a Reference
  • Add the .cs files in the CSAI to the project
  • Select "Build"
  • Manually copy the CSAI.dll and CSAI.pdb files from the project's Debug directory into the AI\CSAI subdirectory of the spring application directory

Build instructions, C# AI and C# AI Interface

  • open the msvcvars.bat cmd prompt and go to the unzipped CSharpAI directory
  • open AllCSAI.build file with a text editor, and specify the locations of:
    • spring (directory containing spring.exe)
    • spring sourcecode
    • Microsoft Platform SDK
  • add nant to PATH
  • type "nant" and press return

With everything configured ok, the dlls should build and be copied into the appropriate place in the Spring application directory tree.