diff --git a/environment/Makefile b/environment/Makefile index e7c0a4548..903156e31 100644 --- a/environment/Makefile +++ b/environment/Makefile @@ -1,5 +1,5 @@ CXXFLAGS += -std=c++11 -pthread -I ./ -INSTALL_PATH?=/usr/local +INSTALL_PATH?=./ SOURCES=$(shell find . -name "*.cpp") OBJECTS=$(SOURCES:%.cpp=%.o) TARGET=halite diff --git a/environment/install.sh b/environment/install.sh index 76e564f38..34a0f52a2 100755 --- a/environment/install.sh +++ b/environment/install.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # Install Halite environment curl "https://halite.io/downloads/environment/HaliteEnvironment-Source.zip" -o "HaliteEnvironment-Source.zip" mkdir HaliteEnvironment-Source @@ -5,6 +7,8 @@ unzip HaliteEnvironment-Source.zip -d HaliteEnvironment-Source rm HaliteEnvironment-Source.zip cd HaliteEnvironment-Source make -make install +#make install cd ../ +mkdir -p bin +mv HaliteEnvironment-Source/halite ./bin/halite rm -r HaliteEnvironment-Source diff --git a/website/archiveStarterPackages.sh b/website/archiveStarterPackages.sh index 5d1021555..08bdcd786 100755 --- a/website/archiveStarterPackages.sh +++ b/website/archiveStarterPackages.sh @@ -16,6 +16,29 @@ cp -r CSharp/* Halite-C#-Starter-Package/ cp -r Scala/* Halite-Scala-Starter-Package/ rm Halite-Scala-Starter-Package/MyBot.java +# Add install.sh to all zip archives +cp ../environment/install.sh Halite-Python-Starter-Package/ +cp ../environment/install.sh Halite-Java-Starter-Package/ +cp ../environment/install.sh Halite-C++-Starter-Package/ +cp ../environment/install.sh Halite-Rust-Starter-Package/ +cp ../environment/install.sh Halite-Scala-Starter-Package/ +cp ../environment/install.sh Halite-C#-Starter-Package/ + +# add halite.exe to all zip archives +mkdir Halite-Python-Starter-Package/bin +mkdir Halite-Java-Starter-Package/bin +mkdir Halite-C++-Starter-Package/bin +mkdir Halite-Rust-Starter-Package/bin +mkdir Halite-Scala-Starter-Package/bin +mkdir Halite-C#-Starter-Package/bin +cp downloads/environment/halite.exe Halite-Python-Starter-Package/bin/ +cp downloads/environment/halite.exe Halite-Java-Starter-Package/bin/ +cp downloads/environment/halite.exe Halite-C++-Starter-Package/bin/ +cp downloads/environment/halite.exe Halite-Rust-Starter-Package/bin/ +cp downloads/environment/halite.exe Halite-Scala-Starter-Package/bin/ +cp downloads/environment/halite.exe Halite-C#-Starter-Package/bin/ + + zip -r Halite-Python-Starter-Package.zip Halite-Python-Starter-Package/ zip -r Halite-C++-Starter-Package.zip Halite-C++-Starter-Package/ zip -r Halite-Java-Starter-Package.zip Halite-Java-Starter-Package/ diff --git a/website/downloads.php b/website/downloads.php index 8cf772089..d0b5e29b8 100644 --- a/website/downloads.php +++ b/website/downloads.php @@ -16,7 +16,7 @@

Starter Packages

- This set of starter packages was uploaded on November 6nd. We fixed a minor bug with the getDistance() method in the Python starter package. + This set of starter packages was uploaded on November 6nd. We fixed a minor bug with the getDistance() method in the Python starter package. These packages also contain the Game Environment.

+

Running the Environment

+

Linux/macOS

+

After unpacking the Started Package, open your terminal and cd into the unzipped directory. Run the install.sh script to download and install the environment. Then you can execute the environment with ./bin/halite

+
cd Halite-Python-Starter-Package
+                ./install.sh
+                ./bin/halite -[some example arguments]
+ +

Windows

+ I'm not sure how to run it on windows?! + +

Game Environment

+

If you'd rather download the Game Environment separately you can.

The environment is on version 1.0. This version of the environment was posted on November 2nd.

Linux/macOS

Execute:

sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/HaliteChallenge/Halite/master/environment/install.sh)"
-

Now, the halite command will run the environment.

+

Now, the binary will be installed into ./bin/ and ./bin/halite should work.

Windows

Download halite.exe.

-

Building from Source

-

Extract this archive.

-

If you are on Unix, run make and sudo make install inside the extracted folder. The halite command will now run the environment.

-

If you are on Windows, run the "make.bat" file. The file named "halite.exe" is your new environment binary.