/*
* Copyright (C) 2014 Alec Dhuse
*
* This program 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.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
package co.foldingmap;
import co.foldingmap.map.themes.FontLoader;
import java.io.File;
/**
* This class is the main entry point into the program.
* It opens the MainWindow Class and reads in configuration information.
*
* @author Alec
*/
public class Main {
public static String VERSION_ID = "0.1";
/**
* The method called to start the program, it also gathers information about system
*
* @param args[] Command line arguments
*/
public static void main(String args[]) {
File configFile;
String osName, configFilePath;
UserConfig userConfig;
configFilePath = System.getProperty("user.home") + File.separator + ".foldingmap";
configFile = new File(configFilePath);
userConfig = new UserConfig(configFile);
osName = System.getProperty("os.name");
if (osName.equalsIgnoreCase("Mac OS X")) {
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Folding Map");
System.setProperty("apple.laf.useScreenMenuBar", "true");
}
System.setProperty("sun.java2d.opengl", Boolean.toString(userConfig.useOpenGL()));
//load fonts
FontLoader fl = new FontLoader();
fl.start();
MainWindow mw = new MainWindow(userConfig);
}
}