Releasy

Releasy automates the release of Ruby applications, such as games or GUI applications, for non-Ruby users. By configuring a Releasy::Project in 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.

Features and Limitations

Features

Limitations

Installation

    $ gem install releasy

Example

Project's Rakefile

  require 'rubygems'
  require 'bundler/setup' # Releasy requires require that your application uses bundler.
  require 'releasy'

  #<<<
  Releasy::Project.new do
    name "My Application"
    version "1.3.2"
    verbose # Can be removed if you don't want to see all build messages.

    executable "bin/my_application.rb"
    files "lib/**/*.rb", "config/**/*.yml", "media/**/*.*"
    exposed_files "README.html", "LICENSE.txt"
    add_link "http://my_application.github.com", "My Application website"
    exclude_encoding # Applications that don't use advanced encoding (e.g. Japanese characters) can save build size with this.

    # 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

    # If building on a Windows machine, :windows_folder and/or :windows_installer are recommended.
    add_build :windows_folder do
      icon "media/icon.ico"
      executable_type :windows # Assuming you don't want it to run with a console window.
      add_package :exe # Windows self-extracting archive.
    end

    add_build :windows_installer do
      icon "media/icon.ico"
      start_menu_group "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.
      executable_type :windows # Assuming you don't want it to run with a console window.
      add_package :zip
    end

    # If unable to build on a Windows machine, :windows_wrapped is the only choice.
    add_build :windows_wrapped do
      wrapper "wrappers/ruby-1.9.3-p0-i386-mingw32.7z" # Assuming this is where you downloaded this file.
      executable_type :windows # Assuming you don't want it to run with a console window.
      exclude_tcl_tk # Assuming application doesn't use Tcl/Tk, then it can save a lot of size by using this.
      add_package :zip
    end

    add_deploy :local # Only deploy locally.
  end
  #>>>

Tasks created

Note: The windows:folder, windows:installer and windows:standalone will be created only if running on Windows. The 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.3.2
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.3.2
rake deploy:osx:app:tar_gz:local          # local <= osx app .tar.gz
rake deploy:source:7z:local               # local <= source .7z
rake deploy:windows:folder:exe:local      # local <= windows folder .exe
rake deploy:windows:installer:zip:local   # local <= windows installer .zip
rake package                              # Package My Application 1.3.2
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:local (Deploy all packages locally), 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:

See Releasy::Project#add_build

Package types supported

Optionally, release folders can be packaged into an archive using one or more of:

See Releasy::Mixins::HasPackagers#add_package

Deploy types supported

Optionally, packaged releases can be deployed using one or more of:

See Releasy::Project#add_deploy

CLI Commands

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 :exe archive format (it comes with the Windows version of 7z, so only need to use this command on OS X/Linux).

External Requirements

7-Zip

The 7z command must be installed on your system for Releasy to work:

To build :windows_installer release (Windows only)

InnoSetup is used to create an installer for the application.

To build :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.

To build :osx_app application bundle release (any platform)

libgosu app wrapper. Latest version of the OS X-compatible wrapper is "gosu-mac-wrapper-0.7.44.tar.gz" which uses Ruby 1.9.2 and includes some binary gems: Gosu, Chipmunk and TexPlay.

Warning: "gosu-mac-0.7.44.tar.gz" is NOT the complete OS X app wrapper, but rather just the Gosu gem pre-compiled for OS X!

Similar tools

Credits

Third Party Assets included