diff --git a/.gitignore b/.gitignore index 660478a..59df4d4 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ Desktop.ini # Generated Project Files premake/*/ +bin/* # Vagrant .vagrant/ diff --git a/README.md b/README.md index e94a7f1..298bd2f 100644 --- a/README.md +++ b/README.md @@ -78,16 +78,15 @@ When following instructions below, the compiled binary will be output in the bin ### Using Vagrant - # Launch VM + # Launch VM and build vagrant up + + # Patch VM and re-build + vagrant provision + + # Manual build vagrant ssh - cd /vagrant - - # Install Linux dependencies (first time setup) - ./vagrant.sh - - # Build demboyz - cd premake + cd /vagrant/premake ./gmake.sh && cd gmake make diff --git a/Vagrantfile b/Vagrantfile index 7e8de7d..67ff6ec 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -119,4 +119,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # chef-validator, unless you changed the configuration. # # chef.validation_client_name = "ORGNAME-validator" + + # Shell provisioner + config.vm.provision "shell", path: "vagrant.sh" end diff --git a/vagrant.sh b/vagrant.sh index 3b2eef5..6793084 100755 --- a/vagrant.sh +++ b/vagrant.sh @@ -1,13 +1,28 @@ -#!/bin/bash +#!/bin/sh # http://askubuntu.com/a/497033 sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt-get update -sudo apt-get install build-essential -y +# Remove X11 cruft +sudo apt-get autoremove -y -sudo apt-get install gcc-4.9 g++-4.9 -y -sudo apt-get install gcc-4.9-multilib g++-4.9-multilib -y +# Keep things up to date +sudo apt-get upgrade -y -sudo apt-get install clang-3.6++ -y -sudo ln -s /usr/bin/clang++-3.6 /usr/bin/clang++ +packages=""; # Start with nothing; can re-order rest to heart's content + +packages="$packages build-essential" +packages="$packages gcc-4.9 g++-4.9" +packages="$packages gcc-4.9-multilib g++-4.9-multilib" +packages="$packages clang-3.6++" + +sudo apt-get install -y $packages + +# Why doesn't clang do this for us? +sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.6 10 +sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.6 10 + +# Build it! +cd /vagrant/premake +./gmake.sh && { cd gmake; make; }