#!/usr/bin/env ruby this_dir = File.dirname(__FILE__) Dir.chdir( this_dir ) WEFT_LIBDIR = File.join( this_dir, 'lib' ) WEFT_SHAREDIR = File.join( this_dir, 'share' ) $LOAD_PATH.unshift(WEFT_LIBDIR) require 'weft' require 'weft/wxgui' # Create a new application gui = QDA::GUI::WeftClient.new # If there is a command line argument, assume it's a project file and should # be opened if dbfile = ARGV.shift dbfile = File.expand_path(dbfile) gui.run_on_init { | client | client.open_project(dbfile) } end # don't start the application if generating executable with rs2exe if defined?(ASSEMBLING) dummy = QDA::Backend::SQLite::InMemoryDatabase.new else # off we go ... gui.main_loop() end