1 // Copyright (C) 2007, 2008, 2009 Ben Asselstine
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 3 of the License, or
6 // (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU Library General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 #include "Configuration.h"
29 #include "GraphicsCache.h"
32 #include "armyset-window.h"
36 int main(int argc, char* argv[])
38 srand(time(NULL)); // set the random seed
40 initialize_configuration();
41 Vector<int>::setMaximumWidth(1000);
43 setlocale(LC_ALL, Configuration::s_lang.c_str());
44 textdomain ("lordsawar");
46 // Check if armysets are in the path (otherwise exit)
47 Armyset::scanSystemCollection();
50 g_set_application_name(_("LordsAWar! Armyset Editor"));
52 ArmySetWindow* armyset_window = NULL;
55 Gtk::Main kit(argc, argv);
58 armyset_window = new ArmySetWindow (argv[1]);
60 armyset_window = new ArmySetWindow;
62 armyset_window->show();
64 kit.run(armyset_window->get_window());
65 delete armyset_window;
67 catch (const Glib::Error &ex) {
68 std::cerr << ex.what() << std::endl;