Main Page

From RubyPackager

Jump to: navigation, search

RubyPackager

Contents

[edit] What is RubyPackager ?

RubyPackager is a Ruby tool that help developers package and ship their Ruby programs on any platform (various OS, either providing Ruby or not).

Here are the points RubyPackager aims to solve when packaging a Ruby program:

[edit] Packaging libraries

  • Create an installer (executable, Gem, RPM...).
  • Give the possibility to generate several installers depending on options (with or without Ruby, different flavors...).
  • Generate HTML documentation based on source code (RDoc).
  • Generate release notes (HTML and text).

[edit] Packaging binaries

  • The same points as packaging libraries.
  • Create a simple executable with a custom icon to run the program.
  • Ship Ruby itself (or part of it) in the executable for the program to execute on platforms not having Ruby.
  • Adapt to extensible programs (plugins):
    • Keep some files not part of the main executable, in order to have some working plugins architecture without having to regenerate the executable.
    • Ship the complete Ruby distribution if needed in order to run further developed plugins without having to regenerate the executable.

[edit] Distributing libraries and binaries

  • Upload deliverables (installers, release notes...) on different platforms (SourceForge, RubyGems, RubyForge...).

[edit] How can RubyPackager be useful to me ?

If you have a working Ruby library or application (including many files, libraries...) that executes correctly on an environment shipped with Ruby, RubyPackager will make your library/application downloadable on any platform through an easy-to-use installer, without asking your users to install Ruby.

Please not however that currently (2012 Mar 01) RubyPackager ships only on Windows and Linux platforms (with or without Ruby). MacOS will be handled later unless volunteers are willing to help (contact me if you are interested, I will be very glad).

[edit] How can I install RubyPackager ?

[edit] Simple method

Use RubyGems:

>gem install RubyPackager
Successfully installed rUtilAnts-1.0.0.20120223
Successfully installed allinoneruby-0.2.11
Successfully installed highline-1.6.11
Successfully installed RubyPackager-1.0.0.20120301
4 gems installed
Installing ri documentation for rUtilAnts-1.0.0.20120223...
Installing ri documentation for allinoneruby-0.2.11...
Installing ri documentation for highline-1.6.11...
Installing ri documentation for RubyPackager-1.0.0.20120301...
Installing RDoc documentation for rUtilAnts-1.0.0.20120223...
Installing RDoc documentation for allinoneruby-0.2.11...
Installing RDoc documentation for highline-1.6.11...
Installing RDoc documentation for RubyPackager-1.0.0.20120301...

[edit] Method to get different versions

If you want to download previous versions of RubyPackager:

  1. Download the Gem from the website.
  2. Install it using 'gem install <DownloadedGemFile>'

[edit] How can I use RubyPackager ?

Use Release command directly:

>Release -h
RubyPackager v. 1.0.0.20120301 - Beta

Release.rb [-h|--help] [-e|--debug] [-v|--version <Version>] [-t|--tag <TagName>]* [-c|--comment <Comment>] [-r|--ruby] [-n|--includeTest] [-o|--no-rdoc] [-i|--installer <InstallerName>]* [-d|--distributor <DistributorName>]* <ReleaseFile>
    -h, --help                       Display help usage.
    -e, --debug                      Activate debugging logs.
    -v, --version <Version>          <Version>: Version string of the release.
                                     Set the version to display for this release.
    -t, --tag <TagName>              <TagName>: Tag to apply to this version.
                                     Set a Tag to this version. A Tag is a way to categorize the version (i.e. UltimateEdition, Alpha...).
    -c, --comment <Comment>          <Comment>: Comment to add to the release note.
                                     Set the release comment to display for this release.
    -r, --ruby                       Include Ruby distribution in the release (only applicable for executable releases).
    -n, --includeTest                Include Test files in the release.
    -o, --no-rdoc                    Do NOT generate RDoc.
    -i, --installer <InstallerName>  <InstallerName>: Name of an Installer to use.
                                     Generate an installer. Can be specified multiple times. Available Installers are: Gem, NSIS
    -d <DistributorName>,            <DistributorName>: Name of a Distributor to use.
        --distributor                Ship generated installers to a distributor. Can be specified multiple times. Available Distributors are: RubyGems, SourceForge

Depending on your system configuration, you might have to call Release.rb.bat (on Windows), or Release.rb instead of Release.

You have to write a release file for your application to be shipped. The goal of a release file is to describe what is to be delivered and how.

Check the Release file API to know how to write a release file.

Check the Command line options to know how to use the Release executable.

Check RubyPackager process flow to know what will RubyPackager exactly do when releasing a project.

[edit] How can I uninstall RubyPackager ?

>gem uninstall RubyPackager
Remove executables:
        Release.rb

in addition to the gem? [Yn]
Removing Release.rb
Successfully uninstalled RubyPackager-0.1.0.20091021

[edit] Current limitations of RubyPackager

Here are the current limitations RubyPackager is facing. We are aware of it and we expect them to be removed very soon:

  • Run currently only on Windows, Linux and Cygwin.
  • Need to have external applications installed on the developer's platform (they should be later automatically installed along with RubyPackager):
    • To generate executables on Windows: Exerb
    • To generate executables with embedded Ruby: AllInOneRuby
    • To generate executable installers on Windows: NSIS
    • To upload RDoc on SourceForge: ZIP

Please note that RubyPackager is still in Beta mode, and there are plenty of features yet to implement.

RubyPackager development is very active. Don't hesitate to use the bugs tracker and features tracker to ask for new improvements !

[edit] Who uses RubyPackager ?

Here are the current referenced projects using RubyPackager. If you know a project that uses it and that is not mentioned here, feel free to complete the list or contact me.

[edit] Different solutions already tackle the problem

Indeed, there are many softwares that help solving the issue. In fact, RubyPackager uses those solutions in order to solve its problematic the best way it can.

Here is a list of software that was considered to create RubyPackager:

[edit] AllInOneRuby

[edit] Exerb

[edit] NSIS

[edit] Ocra

[edit] Crate

  • Jeremy Hinegardner <jeremy@hinegardner.org>
  • http://copiousfreetime.rubyforge.org/crate/
  • Currently not used as it is still in early stage, but should be considered as the long-term solution for RubyPackager's way to include Ruby in programs.

[edit] Contact

If you have any questions, suggestions to improve RubyPackager, will to help in its development, please feel free to contact me.

Thanks

Muriel

Personal tools