-
Notifications
You must be signed in to change notification settings - Fork 19
Build with Vagrant
Vagrant is like a VirtualMachine manager with some extra stuff. In fact, a Vagrant Box depends on a Virtual Machine (VM). Shoes has some vagrant boxes. Each box builds a version of Shoes for a certain platform. If you have Vagrant and Oracles VirtualBox (VB) installed on your system, you can easily build Shoes for your platform and most of the other platforms Shoes supports. Without dealing with dependencies or having the correct compilers - those are in the Vagrant box.
A word of caution, please. You can build say, Shoes for OSX but you can't run it unless you have an OSX box. You can run Shoes/Windows with out a Windows box. Something you might not think about - you can build binary gems for those other boxes too but that's harder to do than Shoes and not covered here.
Windows users - Please Read.
Go to Oracle's site and download VirtualBox. Get the extensions pack if available.
Go to Vagrant's site and download and install Vagrant.
- Install git if you don't have it.
- Clone the Shoes3 repository
git clone https://github.com/shoes/shoes3.git
if you haven't already. Change directory into the shoes3 directory. - If you cloned Shoes, you should have a working Vagrantfile so skip the next step.
- Optional: Create a Vagrantfile. I'd copy this one and save as shoes3/Vagrantfile
Vagrant.configure("2") do |config|
config.vm.define "empty" do |empty|
empty.vm.box = "bento/ubuntu-16.04"
end
config.vm.define "lin" do |lin|
lin.vm.box = "shoes3/linux"
end
config.vm.define "win" do |win|
win.vm.box = "shoes3/windows"
end
config.vm.define "rpi" do |rpi|
rpi.vm.box = "shoes3/raspberry"
end
config.vm.define "osx" do |osx|
osx.vm.box = "shoes3/darwin14"
end
config.vm.provider "virtualbox" do |vb|
# vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "2048"
end
end
You're almost done.
vagrant up win
or lin
or osx
or rpi
That downloads a Vagrant box, installs it into VirtualBox, starts the VM and creates a shared folder of you current directory (shoes3 - right?). It takes a while to download the box if this is the first time and it takes a few minutes to get the VM started. Any errors will be highlighted.
Now just vagrant ssh win
or osx
or whichever box you brought up. Note: Windows users - you probably have to do the putty thing here. You should get a prompt, and be in /home/vagrant. Congratulations! You're terminal is in a Linux box now. Connect to the shared directory: cd /vagrant
, ls
. Looks like your shoes3 directory doesn't it?
Because you are running Linux you'll get the Linux list of tasks from rake -T
Note: the task or target names may not match the name of the vagrant box - but it's close enough for a good guess.
rake setup:lin64
rake
rake package
logout
Or rake setup:mxe
or rake setup:darwin14
or rake setup:xrpi
Note: We don't have a working vagrant for freebsd. Freebsd does not support the Virtualbox shared folder protocols. It could be done with an nfs setup but those are highly unique and problematic.
Menu
In This Section:
- Shoes Rakefiles
- Rake files
- App.yaml secrets
- Custom.yaml
- Gems for Shoes
- Build with Vagrant
- Building Shoes on Linux
- Building Shoes on Pi2
- Mingw Dependencies
- Building Shoes on Windows
- Cross compile mingw
- OSX 10.10 Dependencies
- OSX 10.9 Dependencies
- OSX 10.6 Dependencies
- Caution Using brew 10.6
- Build-MinGW-with-OSX
- NSIS Installer for Windows
- MSYS2 cross compiling
- Cross-compile-for-arm-(raspberry)
- MXE-Dependencies
- FreeBSD and Shoes