From 8405c05f745c5db779203d98ecd6d11beadca39b Mon Sep 17 00:00:00 2001 From: Scot Spinner Date: Mon, 7 Nov 2016 15:26:16 -0500 Subject: [PATCH 1/5] moving environment binaries into the starter packages --- website/archiveStarterPackages.sh | 18 ++++++++++++++++++ website/downloads.php | 14 +++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/website/archiveStarterPackages.sh b/website/archiveStarterPackages.sh index 5d1021555..3b8c2d3cb 100755 --- a/website/archiveStarterPackages.sh +++ b/website/archiveStarterPackages.sh @@ -16,6 +16,24 @@ 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 +#TODO +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 + + 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..4332382f5 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

From 9d17697f07fd1756796b904f8399bc566a44560b Mon Sep 17 00:00:00 2001 From: Scot Spinner Date: Mon, 7 Nov 2016 15:31:59 -0500 Subject: [PATCH 2/5] more files to add --- environment/Makefile | 2 +- environment/install.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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..e5dfa874a 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,7 @@ unzip HaliteEnvironment-Source.zip -d HaliteEnvironment-Source rm HaliteEnvironment-Source.zip cd HaliteEnvironment-Source make -make install +#make install cd ../ +mv HaliteEnvironment-Source/halite ./bin/halite rm -r HaliteEnvironment-Source From 16f68c4350f46b30687583bbb95b2ec80cbad539 Mon Sep 17 00:00:00 2001 From: Scot Spinner Date: Mon, 7 Nov 2016 15:35:48 -0500 Subject: [PATCH 3/5] add .exe file to zip --- website/archiveStarterPackages.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/archiveStarterPackages.sh b/website/archiveStarterPackages.sh index 3b8c2d3cb..08bdcd786 100755 --- a/website/archiveStarterPackages.sh +++ b/website/archiveStarterPackages.sh @@ -25,13 +25,18 @@ cp ../environment/install.sh Halite-Scala-Starter-Package/ cp ../environment/install.sh Halite-C#-Starter-Package/ # add halite.exe to all zip archives -#TODO 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/ From c8e499f3e221e88e366b94e3cbccfb672a54e356 Mon Sep 17 00:00:00 2001 From: Scot Spinner Date: Mon, 7 Nov 2016 16:01:46 -0500 Subject: [PATCH 4/5] some fixes --- website/downloads.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/website/downloads.php b/website/downloads.php index 4332382f5..d0b5e29b8 100644 --- a/website/downloads.php +++ b/website/downloads.php @@ -32,7 +32,7 @@

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;
+                
cd Halite-Python-Starter-Package
                 ./install.sh
                 ./bin/halite -[some example arguments]
@@ -47,15 +47,11 @@

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.

From 7ebb99e60ccc67d985a0867bc6ef6a9ec2cc0f62 Mon Sep 17 00:00:00 2001 From: Scot Spinner Date: Mon, 7 Nov 2016 16:03:29 -0500 Subject: [PATCH 5/5] missed a file --- environment/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/environment/install.sh b/environment/install.sh index e5dfa874a..34a0f52a2 100755 --- a/environment/install.sh +++ b/environment/install.sh @@ -9,5 +9,6 @@ cd HaliteEnvironment-Source make #make install cd ../ +mkdir -p bin mv HaliteEnvironment-Source/halite ./bin/halite rm -r HaliteEnvironment-Source