提交 6a50b1ac 编写于 作者: L likejiao

update readme for installing sc2 on windows

上级 60d51667
......@@ -14,7 +14,7 @@ Mean win_rate (evaluate 5 episode) for 1000 epchos training (1 epcho = 5 episode
## StarCraft II Installation
The environment is based on the full game of StarCraft II (version >= 3.16.1). To install the game, follow the commands bellow, or check more detail in [SMAC](https://github.com/oxwhirl/smac#installing-starcraft-ii)
The environment is based on the full game of StarCraft II. To install the game, follow the commands bellow, or check more detail in [SMAC](https://github.com/oxwhirl/smac#installing-starcraft-ii)
### Linux
```shell
......@@ -24,10 +24,13 @@ $ SC2PATH=~ bash install_sc2.sh
### MacOS/Windows (use Docker)
```shell
$ cd starcraft2
$ bash build_docker.sh # build the Dockerfile
$ bash build_docker.sh # build Dockerfile
$ bash install_sc2.sh # download startcraft II and maps
```
### Windows (use Docker)
- Step 1: Build docker images, `cd starcraft2 && bash build_docker.sh`
- Step 2: Download [Starcraft II package](https://github.com/Blizzard/s2client-proto#linux-packages) (version >= 3.16.1), unzip to folder `/starcraft2/StarCraftII` (password: `iagreetotheeula`)
- Step 3: Download [Map](https://github.com/oxwhirl/smac/releases/download/v0.1-beta1/SMAC_Maps.zip), unzip to folder `/starcraft2/StarCraftII/Maps/SMAC_Maps`
## How to use
......
......@@ -4,4 +4,4 @@
#### build docker image
#### -------------------------------------------------------------------
echo 'Building Dockerfile with image name parl-starcraft2:1.0'
docker build -t parl-starcraft2:1.0 .
docker build -t parl-starcraft2:1.0 .
\ No newline at end of file
#!/bin/bash
#### -------------------------------------------------------------------
#### Install SC2 and add the custom maps
#### Install StarCraft II
#### -------------------------------------------------------------------
if [ -z "$SC2PATH" ]
then
if [ -z "$SC2PATH" ]; then
SC2PATH=`pwd`'/StarCraftII'
else
SC2PATH=$SC2PATH'/StarCraftII'
......@@ -15,25 +14,41 @@ export SC2PATH=$SC2PATH
echo 'SC2PATH is set to '$SC2PATH
if [ ! -d $SC2PATH ]; then
echo 'StarCraftII is not installed. Installing now ...';
echo 'StarCraftII is not installed. Installing now ...'
wget http://blzdistsc2-a.akamaihd.net/Linux/SC2.4.6.2.69232.zip
unzip -P iagreetotheeula SC2.4.6.2.69232.zip
rm -rf SC2.4.6.2.69232.zip
rm -f SC2.4.6.2.69232.zip
echo 'Finished installing StarCraftII'
else
echo 'StarCraftII is already installed.'
fi
if [ -f $SC2PATH/Libs/libstdc++.so* ]; then
echo 'Successfully installing StarCraft II'
else
echo 'Fail to install StarCraft II !'
exit 1
fi
#### -------------------------------------------------------------------
#### Add the custom maps
#### -------------------------------------------------------------------
echo 'Adding SMAC maps.'
MAP_DIR="$SC2PATH/Maps/"
MAP_DIR="$SC2PATH/Maps"
echo 'MAP_DIR is set to '$MAP_DIR
mkdir -p $MAP_DIR
cd ..
wget https://github.com/oxwhirl/smac/releases/download/v0.1-beta1/SMAC_Maps.zip
unzip SMAC_Maps.zip
mv SMAC_Maps $MAP_DIR
rm -rf SMAC_Maps.zip
echo 'StarCraft II and SMAC are installed.'
rm -f SMAC_Maps.zip
cp $MAP_DIR/SMAC_Maps/3m.SC2Map ./
if [ -f $MAP_DIR/SMAC_Maps/3m.SC2Map ]; then
echo 'Successfully adding custom maps'
else
echo 'Fail to add maps !'
exit 1
fi
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册