Releasy automates the release of Ruby applications for non-Ruby users, such as games or GUI applications. By configuring ain your application's Rakefile, Releasy can generate Rake tasks for use when there is a need to build, package (archive) and/or deploy a new version of the application.
- Author: Bil Bas (Spooner)
- Licence: MIT
- Github project
- Reporting issues
- Releasy has been tested on Ruby 1.9.3 and 1.8.7 on Windows, Lubuntu and OS X. However, since this is an early version, please ensure that you double-check any releases created by Releasy before publishing them!
- Package up Ruby applications (Games, GUI applications, etc.) for non-ruby users.
- Build OSX application bundle (.app) on any platform.
- Build Windows executable (.exe) on any platform.
- Build Windows installer on Windows only.
- Build, package (compress) and deploy your executables for all platforms from a single rake command ('rake deploy').
gem install releasy
require 'rubygems' require 'bundler/setup' # Releasy doesn't require that your application uses bundler, but it does make things easier. require 'releasy' require 'lib/my_application/version' #<<< ::. do name "My Application" version MyApplication::VERSION executable "bin/my_application.rbw" files `git ls-files`.split("\n") files.exclude '.gitignore' exposed_files ["README.html", "LICENSE.txt"] "http://my_application.github.com", "My Application website" exclude_encoding # Create a variety of releases, for all platforms. add_build :osx_app do url "com.github.my_application" wrapper "wrappers/gosu-mac-wrapper-0.7.41.tar.gz" # Assuming this is where you downloaded this file. icon "media/icon.icns" add_package :tar_gz end add_build :source do add_package :7z" end add_build :windows_folder do icon "media/icon.ico" add_package :exe end add_build :windows_installer do icon "media/icon.ico" "Spooner Games" readme "README.html" # User asked if they want to view readme after install. license "LICENSE.txt" # User asked to read this and confirm before installing. add_package :zip end add_build :windows_wrapped do wrapper "wrappers/ruby-1.9.3-p0-i386-mingw32.7z" # Assuming this is where you downloaded this file. exclude_tcl_tk add_package :zip end add_deploy :github # Upload to a github project. end #>>>
windows:standalone will be created only if running on Windows.
windows:wrapped task will not be created if running on Windows.
The output from "rake -T" on Windows would be:
rake build # Build My Application 1.4.0 rake build:osx # Build all osx rake build:osx:app # Build OS X app rake build:source # Build source rake build:windows # Build all windows rake build:windows:folder # Build windows folder rake build:windows:installer # Build windows installer rake deploy # Deploy My Application 1.4.0 rake deploy:osx:app:tar_gz:github # github <= osx app .tar.gz rake deploy:source:7z:github # github <= source .7z rake deploy:windows:folder:exe:github # github <= windows folder .exe rake deploy:windows:installer:zip:github # github <= windows installer .zip rake generate:images # Generate images rake package # Package My Application 1.4.0 rake package:osx:app:tar_gz # Package osx app .tar.gz rake package:source:7z # Package source .7z rake package:windows:folder:exe # Package windows folder .exe rake package:windows:installer:zip # Package windows installer .zip
A variety of unlisted tasks are also created, that allow for more control, such as
deploy:github (Deploy all packages to Github only),
deploy:windows:folder (deploy all windows folder packages all destinations) or
package:windows (Package all windows builds).
Build types supported
The project can build one or more release folders:
- Plain source folder, which can be used by anyone with Ruby already installed.
- OS X application bundle (.app) build, requiring a pre-made Ruby OS X wrapper. Note that this only contains binary gems for Gosu, TexPlay and Chipmunk, but will work with applications using any other source gems.
- A folder containing Ruby, application source files and an EXE to run them.
- Available on Windows only.
- A folder containing Ruby, application source files and an EXE to run them, requiring a copy of a RubyInstaller archive.
- Available on OS X and Linux only.
- Creates larger release than other Windows build options.
- A Windows installer.
- Available on Windows only and requires InnoSetup to be installed.
- Standalone EXE file that self-extracts to a temporary directory, which is the default behaviour for Ocra.
- Available on Windows only.
- Slower startup than the other Windows build options (up to 2s slower).
Package types supported
Optionally, release folders can be packaged into an archive using one or more of:
- 7Zip format (.7z - Best compression).
- OS X self-extractor (.dmg - requires
hdiutilto be installed, so only available on OS X).
- Available on OS X only (
- OS X self-extractor (.dmg - requires
- Windows self-extractor (.exe - Includes a 7z decompression module, so not efficient for small releases).
- Bzip2 tarball (.tar.bz2).
- Gzip tarball (.tar.gz).
- Standard zip format (.zip - Poor compression, but best compatibility).
Deploy types supported
Optionally, packaged releases can be deployed using one or more of:
- Upload to a Github project's downloads page.
- Copy files locally, for example into a local web server or dropbox folder.
- Upload to remote server with rsync (requires 'rsync' command be installed).
Releasy also provides some supplementary commands:
releasy install-sfx [options]- Installs a copy of the Windows self-extractor in the local 7z installation, to allow use of the
:exearchive format (it comes with the Windows version of 7z, so only need to use this command on OS X/Linux).
7-Zip (OS X/Linux only - Windows
7za executable included in Windows)
The 7z command must be installed on your system for Releasy to work:
Installing on OS X homebrew:
brew install p7zip
Installing on Ubuntu/Debian:
sudo apt-get install p7zip-full
Installing on other OS
:windows_installer release (Windows only)
InnoSetup is used to create an installer for the application.
:windows_wrapped release (OS X/Linux)
RubyInstaller 7-ZIP archives for Ruby 1.8.7, 1.9.2 or 1.9.3. Used as a wrapper for a Windows release built on non-Windows systems.
:osx_app application bundle release (any platform)
libgosu app wrapper. Latest version of the OS X-compatible wrapper is "gosu-mac-wrapper-0.7.41.tar.gz" which uses Ruby 1.9.2 and includes some binary gems: Gosu, Chipmunk and TexPlay.
Warning: "gosu-mac-0.7.41.tar.gz" is NOT the complete OS X app wrapper, but rather just the Gosu gem pre-compiled for OS X!
- Thanks to jlnr for creating "RubyGosu App.app", an OS X application bundle used to wrap application code.
- Thanks to larsh for the Ocra gem, which is used for generating Win32 executables.
- Thanks to jlnr and shawn42 for help testing on OS X; without you I would have been screwed!
- Thanks to shawn42 and everyone at #gosu and #rubylang for suggestions on how to improve the API.
- Thanks to kyrylo for coming up with the name, Releasy!