/* Copyright (C) 2008 John Hobbs - john@velvetcache.org This file is part of The Mana World Buddy. The Mana World Buddy 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. The Mana World Buddy 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 The Mana World Buddy. If not, see . */ #include #include #include #include #include "mainWindow.h" void printHelp () { std::cout << "Help!" << std::endl; exit(1); } int main(int argc, char *argv[]) { std::string configFile = getenv("HOME"); configFile += "/.tmwbuddy/config"; if(argc > 1) { for(int i = 1; i < argc; i++) { if(0 == strcmp(argv[i],"--config")) { if(argc >= (i+1)) configFile = argv[++i]; else printHelp(); } else { printHelp(); } } } Gtk::Main kit(argc, argv); tmwb::mainWindow window(configFile); Gtk::Main::run(window); return 0; }