-
Notifications
You must be signed in to change notification settings - Fork 19
5.0 Building Shoes
Breaking news - there is vagrant support. You still need to know everything below.
I'm going to apologize right up top. This is not as easy as you expect nor as easy as we would like. Here's an overview of how it works
Get a list of all targets for you platform. The not all targets are available for all platforms. Linux is more equal than others.
$ rake -T
rake build # Build using your OS setup
rake clean # remove objects and libshoes.dylib
rake clobber # remove all build products
rake default # Same as `rake build'
rake package # Package Shoes for distribution
rake setup:darwin14 # Setup for OSX 10.10+ (osxcross tools)
rake setup:lin64 # Setup for Linux X86_64 (chroot)
rake setup:minlin # Minimal Shoes for linux (default)
rake setup:mxe # Setup for Windows 7+ (MXE tools - recommended)
rake setup:xlin64 # Setup for Linux x86_64
rake setup:xrpi # Setup for Linux armeabihf (Pi) using X86_64-linux
rake setup:xwin7 # Setup for Win7+ using Linux (debian tools)
rake stubs # Build stubs (MinGW cross compile only)
Pick one. Lets cross compile for Windows
$ rake setup:mxe
$ rake
The bare rake
notes that you picked a setup so it does some setup things like copying gems and ruby and then proceeds to compile all the code, link it together and create the shoes.exe and cshoes.exe launchers. If you modify one of the source files and do 'rake' again, only that file and any dependent on it are recompiled.
rake clean
deletes all of the compiled object files so the next 'rake' will compile everything.
rake clobber
deletes everything including your setup choice.
Custom.yaml files are something you have to create to describe where to find things on your system. There is no way to guess where things are for everyone. It also gives you, the developer, a lot of flexibility.
If you are new to Shoes and are running Linux, OSX, or BSD you should start with the 'minxxx' targets because they don't need custom.yaml files, the build with debug symbols and are very pleasant to work with. They have one limitation and it's important - You can't package them for distribution. They won't work on any system but yours.
See Custom Yaml for the details on custom.yaml files.
Here is where the bulk of ugly lives. Shoes uses lots of open source libraries which we call dependencies. Ruby is a dependency and the the libraries Ruby needs are also dependencies. We need to build A Ruby our way and it lib's and then the libs Shoes wants. It's not hard if you know how to read error messages (some folks do get confused - so it's a skill to learn). It may not be hard but it is a lengthy process - give your self a couple of full days OR you can download prebuild dependencies for OSX 10.10 and Windows.
Linux is not a free walk either because we setup chroots and install an older version of Linux in it before we build Ruby in it and apt-get all the easy stuff. It's even more interesting settup up chroot that runs QEMU before we install the armhf debian and use it to build dependencies (including Ruby). It takes time and some Linux knowledge to set things up for a Tight Shoes build.
- Build with Vagrant
- Build Servers An overview of building - System Admin Level
- Shoes Rakefiles
- Rake files
- App.yaml secrets
- Custom.yaml
- Gems for Shoes
- Building Shoes on Linux
- Building Shoes on Pi2
- Mingw Dependencies
- Building Shoes on Windows
- Cross compile mingw
- NSIS Installer for Windows
- OSX 10.9 Dependencies
- OSX 10.6 Dependencies
- Caution-Using-brew-10.6
- Build-MinGW-with-OSX
- Msys2 and Shoes for Windows
- Setup an schroot build environment
- FreeBSD and Shoes
- MXE Dependencies
Tight Shoes is one you can bundle up and send to someone else. It lives in its own sandbox and includes a copy of Ruby (the Ruby it was built with). Your Ruby is probably not built to do that successfully. It's called Tight because its a very controlled setup.
Loose Shoes doesn't have those restrictions it just uses whatever it can find for a Ruby and it links against that Ruby's libs. It doesn't have to carry around a copy of Ruby or bundle up dependencies and gems. That makes it small and quick to compile and you can install it (on your system) if you like it. It allows Shoes access to all the gems you've installed. What you can't do is distribute that Shoes.
In Windows, the tight/loose distinction is a little more subtle because you have to have all the DLL's in any Shoes but the distinction still exists (gems primarily), even on Windows.
In OSX there is no difference between tight and loose - it's always tight.
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