#!/usr/bin/ruby # so my editor will like the file... =begin Copyright 2010, Roger Pack This file is part of Sensible Cinema. Sensible Cinema is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Sensible Cinema is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Sensible Cinema. If not, see . =end puts 'Starting Sensible Cinema...' require File.expand_path(File.dirname(__FILE__) + "/../lib/add_any_bundled_gems_to_load_path.rb") begin require 'sane' require 'whichr' rescue LoadError => e raise 'please run the rake command to copy dependencies (like rebundle_copy_in_dependencies) first, as we prefer using cached gems ' + e.to_s end raise 'probably need jruby' unless OS.java? # put after loading sane gem so we have the OS gem available :) require_relative '../lib/gui/dependencies' require_relative '../lib/gui/base' require_relative '../lib/gui/normal' require_relative '../lib/gui/create' # LODO maybe don't need to require all these every time... require_relative '../lib/gui/create-file' require_relative '../lib/gui/upconvert' if $0 == __FILE__ if ARGV.index('-h') || ARGV.index('--help') puts <<-EOL # jruby bin/sensible-cinema # DVD/file EDL player $ jruby bin/sensible-cinema --create-mode # DVD output "parser/cutter" create mode [advanced] $ jruby bin/sensible-cinema --upconvert-mode # DVD/file upconverting player --exit-immediately # don't show the GUI, for benchmarking startup times $ jruby bin/sensible-cinema-cli # the experimental OCR tracker for edited arbitrary online/local/internet players. run it with --help to see its various options. $ jruby lib/**.rb Many library files have their own "main" method for example to 'just' parse an EDL file, etc. Ask for more details. EOL else a = SensibleSwing::MainWindow.new true, ARGV a.setup_default_buttons puts 'Please use the Sensible Cinema GUI window popup...' if ARGV.index('--exit-immediately') a.dispose end end end