#!/usr/bin/env ruby require 'pathname' args = ARGV.dup gecko_runtime_search = (ENV['USE_XULRUNNER'] || args.delete("-xulrunner")) ? %w[xulrunner-bin xulrunner] : %w[firefox-bin firefox] runtime = gecko_runtime_search.detect { |runtime_cmd| !`which #{runtime_cmd}`.strip.length.zero? } raise("Could not find '#{gecko_runtime_search.join(", ")}' in your path. Please rectify this and try again.") unless runtime xulapp_ini_path = (Pathname(__FILE__).parent.parent + "xulapp/application.ini").expand_path exec(runtime, *["-app", xulapp_ini_path, *args])