AF wrote:That still doesn't tell me where my configuration files would go =/ am I just to dump it all in the data folder?
Yes, I feel that that sounds like exactly what could be an appropriate implementation.
My AI folder sits inside another folder inside another folder inside the normal folder, do I include that file structure in the archive? or do I go to the folder that sits in the same folder as my VS oroject and bundle that?
Soo.... leaving aside what we mean by 'spring source' for now, let's say you have a direcctory springsource, and I hate typing \s so just pretend they are / ok

Oh, fine have some \s :
In this directory we have:
Code: Select all
c:\springsource
\rts
\game
\AI
\Skimish
\AAI
\KAIK
\RAI
Add your directory next to RAI:
Code: Select all
c:\springsource
\rts
\game
\AI
\Skimish
\AAI
\KAIK
\RAI
\NTai
VERSION
blah.c
foo.c
\data
AIInfo.lua
AIOptions.lua
Add in a file called 'CMakeLists.txt', which you can copy from KAIK, RAI, or AAI. They're all identical:
Code: Select all
c:\springsource
\rts
\game
\AI
\Skimish
\AAI
\KAIK
\RAI
\NTai
VERSION
blah.c
foo.c
CMakeLists.txt
\data
AIInfo.lua
AIOptions.lua
Add in your configuration data:
Code: Select all
c:\springsource
\rts
\game
\AI
\Skimish
\AAI
\KAIK
\RAI
\NTai
VERSION
blah.c
foo.c
CMakeLists.txt
\data
AIInfo.lua
AIOptions.lua
ntai_config1.xml
ntai_config2.xml
...
Publishing to botrunner
For publishing for botrunner, simply tar.bz2, or .tar.gz, or just .tar, the NTai directory, so the archive file will contain:
Code: Select all
\NTai
VERSION
blah.c
foo.c
CMakeLists.txt
\data
AIInfo.lua
AIOptions.lua
ntai_config1.xml
ntai_config2.xml
...
Building
cmake
cmake is a meta-buildsystem: it generates build files for other build systems. Not 'it can', but 'it does': it is incapable of actually building anything directly itself, on any platform (I think?

)
cmake is cross-platform. It can generate build files for ... too many to list here... take a look:
http://www.cmake.org/cmake/help/cmake-2 ... Generators The list includes:
# MSYS Makefiles
# MinGW Makefiles
# NMake Makefiles
# Unix Makefiles
# Visual Studio 10
# Visual Studio 10 Win64
# Visual Studio 6
# Visual Studio 7
# Visual Studio 7 .NET 2003
# Visual Studio 8 2005
# Visual Studio 8 2005 Win64
# Visual Studio 9 2008
# Visual Studio 9 2008 Win64
Now whether our actual spring build system will pump out brilliant build files for all of those is another question, since I'm going to guess that some of the code will need tweaking to build in different systems, but in this case we're only discussing NTai, so 100% of the code in your AI is 100% under your control, so you can make sure that it does build nicely under visual studio.
cmake will pump out build files and if you ask it nicely it will pump out Visual Studio build files, and if your code will compile in visual studio, these build files will probably work just fine.
Not including spring itself, but that is out of scope. I assume you've figured out already how to get hold of a spring build that is compatible with your visual studio built AIs?
Getting cmake to spit out build files
Run cmake-gui, and in cmake-gui:
- set the 'source directory' to c:\springsource
- set the 'build directory' to c:\springsource\build
cmake-gui is I feel rather nice, and you can get it from
http://www.cmake.org/files/v2.6/cmake-2 ... 32-x86.exe
It's a Windows application, in a normal Windows window. No need for any cygwin stuff or anything like that. Just a normal Windows executable AFAIK. Fairly light-weight I think.
- click on 'configure'
- tweak the default build configuration if you wish
- click on 'configure' again
- click on 'generate', choose the build system you want to generate for
-- this is where you can try selecting other build systems. I bet there could be an error or two if you select visual studio as an output, so you might have to fix those errors, and commit those fixes to git.
- your build files should pop out into the c:\springsource\build directory
Building
Open visual studio, load the appropriate buildfile. Try building, fix the errors, repeat until it builds ok, commit the fixes to git.
What happens to the configuration files?
By default, the generic CMakeLists you copied into NTai will copy *everything* in the 'data' subdirectory into the root of your installed AI, so your AI when it is installed will look like this, and let's say you configured it to install everything into c:\spring:
Code: Select all
c:
\spring
\AI
\Interface
\Skirmish
\AAI
\KAIK
\NTai
\XE10
SkirmishAI.dll
AIInfo.lua
AIOptions.lua
ntai_config1.xml
ntai_config2.xml
...
Detailed notes:
- the exact name 'NTai' will be whatever was in data\AIInfo.lua file when you ran the configure
- the exact version 'XE10' will be whatever was in data\AIInfo.lua file when you ran the configure
Looking again at the configuration, you're free to put the config files in whatever subdirectory you want by just creating appropriate subdirectories in data.
For example, if you want the final installation structure to look like:
Code: Select all
c:
\spring
\AI
\Interface
\Skirmish
\AAI
\KAIK
\NTai
\XE10
SkirmishAI.dll
AIInfo.lua
AIOptions.lua
\config
ntai_config1.xml
ntai_config2.xml
...
...then simply, in the source-code directory, move the config files to a subdirectory 'config' of 'data':
Code: Select all
\NTai
VERSION
blah.c
foo.c
CMakeLists.txt
\data
AIInfo.lua
AIOptions.lua
\config
ntai_config1.xml
ntai_config2.xml
...
... presto! by magic, ntai_config1.xml and ntai_config2.xml will end up in a subdirectory 'config' of the installed AI:
Code: Select all
c:
\spring
\AI
\Interface
\Skirmish
\AAI
\KAIK
\NTai
\XE10
SkirmishAI.dll
AIInfo.lua
AIOptions.lua
\config
ntai_config1.xml
ntai_config2.xml
...
Conclusion
... none of which addresses the issue of how to pump learning data back upstream, which is admittedly a challenging problem.
Nevertheless this post does attempt to address:
- how to install config files
- how to get the config files you want to end up where you want
- how to use cmake on Windows
- that cmake is not I feel a build system, but is I feel a meta build system, that generates build files
- that cmake is capable of generating build files for visual studio
Let's solve these issues first, and then we can think about addressing the learning data issues, ok?