1 # Copyright (c) 2009 Paolo Capriotti <p.capriotti@gmail.com>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
9 $basedir = File.dirname(__FILE__)
13 require 'require_bundle'
23 app = KDE::Application.init(
26 :name => KDE.ki18n('Kaya'),
27 :description => KDE.ki18n('KDE Board Game Suite'),
28 :copyright => KDE.ki18n('(C) 2009 Paolo Capriotti'),
29 :authors => [[KDE.ki18n('Paolo Capriotti'), 'p.capriotti@gmail.com']],
30 :contributors => [[KDE.ki18n("Jani Huhtanen"), KDE.ki18n('Gaussian blur code')],
31 [KDE.ki18n("Yann Dirson"), KDE.ki18n('Minishogi')]],
32 :bug_tracker => 'http://github.com/pcapriotti/kaya/issues',
33 :options => [['+[game]', KDE.ki18n('Initial game')],
34 ['auto-reload', KDE.ki18n("Reload source files when modified")]])
36 require 'plugins/loader'
39 args = KDE::CmdLineArgs.parsed_args
41 if args.is_set("auto-reload")
43 AutoReload.start($basedir)
46 game = if args.count > 0
48 g = Game.get(name.to_sym)
50 warn "No such game #{name}. Defaulting to #{default_game}"
56 game ||= Game.get(default_game)
58 plugin_loader = PluginLoader.new
60 main = MainWindow.new(plugin_loader, game)