-
Notifications
You must be signed in to change notification settings - Fork 1
Build instructions
Pre-requisites:
- Windows 7 (these instructions were tested on Windows 7 64 bits, but might work on posterior versions. Won't work on Windows XP because Visual Studio 2017 cannot be installed there)
- StarCraft patched to 1.16.1
For the items below, install and configuration instructions are given on this page:
- BWAPI 3.7.4
- Visual Studio 2017
- Microsoft Visual C++ 2008 with SP1
- Microsoft Visual C++ 2010
- Boost 1.60.0
- Get
BWAPI.3.7.4.7zfile here - (If you don't have 7zip to unpack .7z files, grab it here)
- Extract the contents of
BWAPI.3.7.4.7ztoc:\softwareand rename the folder toBWAPI3.7.4(without space) - Copy the contents of
c :\software\BWAPI3.7.4\starcraftto your Starcraft folder. - Copy the contents of
c:\software\BWAPI3.7.4\WINDOWStoc:\Windows
-
Download and install Visual C++ 2008 with Service Pack 1 - link here
-
Download and install Visual C++ 2010 - link here
-
Download and install Visual Studio 2017 - link here (Select only
Desktop development with C++as a workload and hitInstall)
All three versions are required for building it because the code can only be compiled through VC++ 2008's toolset due to portability issues and VC++2010 is what allow us to use this toolset on Visual Studio 2017.
- Download
boost_1_60_0-msvc-9.0-32.exefrom here (This link goes directly to the 32 bit version compatible with VC++2008 and should work. If, for some reason, you need another version, look here) - Install Boost 1.60.0 to
c:\software\boost - Rename directory
c:\software\boost\lib32-msvc-9.0toC:\software\boost\lib
You must configure 2 environment variables:
-
BWAPI_DIRpointing to where you unpacked BWAPI (if you followed these instructions it will be:c:\software\BWAPI3.7.4 -
BOOST_DIRpointing to where you installed Boost (if you followed these instructions it will be:c:\software\boost
On Windows 7, the procedure is as follows:
- Open Start menu, right click "Computer" then "Properties"
- Click "Advanced system settings"
- In "Advanced" tab, click "Environment variables"
- In "System variables" click "New"
- Set the name and value as indicated (e.g.: name:
BWAPI_DIR/ value:c:\software\BWAPI3.7.4)
- Get Skynet from here and extract it. We'll name the destination directory
SKYNET_DIR. - Go to
SKYNET_DIR/src. Extract the contents ofSkynet_src.ziptoSKYNET_DIR/src. A new directory namedSkynetshould appear. Enter it. - Open Skynet.sln in Visual C++ 2008 with SP1. If you use a newer version of Visual Studio, make sure to use the
v90Platform toolset (right click the project -> Properties. Under 'Configuration', selectAll Configurations. UnderGeneralset the Platform Toolset toVisual Studio 2008 (v90)). - Build the solution using
Competitionconfiguration. - The resulting binary will be located in
SKYNET_DIR/src/Competition/Skynet.dll.
- Download Xelnaga's code from here
- Extract the file anywhere.
- Open the
srcfolder and openXelnaga.slnin Visual C++ 2008 with SP1. If you use a newer version of Visual Studio, make sure to use thev90Platform toolset (Accept the 'One-way Upgrade'. Then right click the project -> Properties. Under 'Configuration', selectAll Configurations. UnderGeneralset the Platform Toolset toVisual Studio 2008 (v90)). - Build the solution using
Releaseconfiguration. - At the end,
Xelnaga.dllwill be available onXelnaga/src/Release
- Download AIUR's code from here
- Extract the file anywhere.
- Extract the contents of
Aiur/AIUR-2.2.zip - Enter
AIUR-2.2/and openAiurProject.slnin Visual C++ 2008 with SP1. If you use a newer version of Visual Studio, make sure to use thev90Platform toolset (Accept the 'One-way Upgrade'. Then right click the project -> Properties. Under 'Configuration', selectAll Configurations. UnderGeneralset the Platform Toolset toVisual Studio 2008 (v90)). - Build the solution using
Releaseconfiguration. - At the end,
Aiur.dllwill be available onAIUR-2.2/Release
- Download Ximp's code from here
- Extract the file anywhere.
- Copy the folder
source/ximp/Ximpto yourBWAPI_DIRfolder (where you extracted theBWAPI3.7.4.zipfile). - Open
Ximp.slninside the folder with Visual C++ 2008 with SP1. If you open with Visual Studio 2017, on the pop-up message that will appear, change thePlatform toolsetoption toNo upgradeand hitOK. - Make sure the project will be built with VC++2008 (v90) toolset
- Build the solution using
Releaseconfiguration. - In the end,
Ximp.dllwill be available on theReleasefolder.
- Get MetaBot's code through the command "git clone https://github.com/andertavares/MetaBot/" on Git
- Initialize the submodule through the command "git submodule init" and update it with "git submodule update"
- Go to
METABOT_DIR/MetaBot/and openMetaBot.slnin Visual Studio 2017.METABOT_DIRis where you cloned or unpacked MetaBot's sources. - On the pop-up message that will appear, change the
Platform toolsetoption toNo upgradeand hitOK - Make sure the project will be built with VC++2008 (v90) toolset
- Build the solution using
Releaseconfiguration. - At the end,
MetaBot.dllis available atMETABOT_DIR/MetaBot/Release.
The project is probably not being built as a Release with Visual Studio 2008(v90). Go on Project->Properties and change Configuration to Release and Plataform Toolset on the General tab to Visual Studio 2008(v90).
Check the BWAPI_DIR variable, one common mistake is mispell the folder's name as "BWAPI 3.7.4" (with space)
The project file has been updated to the latest version of Visual Studio (2017). One easy way to solve it is by downloading the project files again at releases.
Remember to copy the contents of METABOT_DIR/config to STARCRAFT_DIR/bwapi-data/AI so the compiled file can access those informations.
Try these two choices (#2 seems to be the one that actually worked):
- You must install
Windows Universal CRT SDK(from https://stackoverflow.com/a/42778079). Follow the steps:
- On the menu, select: Tools -> Get tools and features
- Choose the "Individual components" tab
- Install
Windows Universal CRT SDK(in portuguese it isSDK do CRT Universal do Windows)
- Reopen the project and select a proper Windows SDK (under Visual Studio 2017)
- Delete the hidden
.vsdir insideMETABOT_DIR - Reopen the solution
- When the "Review solution actions" window appear, select the Windows SDK version as
10.0.[lots-of-numbers]and the Platform toolset asNo Upgrade