Skip to content
Spooner edited this page Dec 22, 2011 · 15 revisions

Just a quick plan for the API once this becomes a gem, copying off gemspec:

require 'release_packager'

ReleasePackager.target :alpha_channel do |target|
  target.name = "Alpha Channel" # Defaults to the ID capitalized.
  target.version = AlphaChannel::VERSION # Will show in the file names if provided.
  target.execute = "path/to/main_script.rb" # Will run this.
  target.ruby_parameters = "-d"
  target.website = "http://spooner.github.com/games/alpha_channel" # Will provide a link file to this in win32 releases.
  target.readme = "path/to_readme" # Not sure this is needed.
  target.license = "path/to_license" # Will show this when installing and require acceptance.
  target.icon = "path/to/icon.ico" # Used for executables and installer.

  target.files = `git ls-files`.split("\n").reject{ |f| f[/^\./] }

  # Ocra params beyond the minimum to make it work.
  target.ocra_parameters = "--no-enc" # Don't include language encoding files in Ocra executables.

  # The types of output possible. Must define at least one.
  target.add_output :osx_app # alpha_channel_v1_1_0
  target.add_output :win32_standalone # alpha_channel_v1_1_0_WIN32_EXE
  target.add_output :win32_installer # alpha_channel_v1_1_0_WIN32_INSTALLER
  target.add_output :win32_folder # alpha_channel_v1_1_0_WIN32 - same folder as installer creates.
  target.add_output :source #  alpha_channel_v1_1_0_SOURCE

  # Define compressions, otherwise it will just generate plain folders.
  target.add_compression :zip
  target.add_compression :7z
  target.add_compression :tar_bz
end
Clone this wiki locally