Environment env = Environment.getInstance();
// FileEnvironment
FileEnvironment fEnv = FileEnvironment.getInstance();
// splash
DocSplashViewer splash = new DocSplashViewer("splash.gif", "DocSearcher " + I18n.getString("ds.version") + " "
+ I18n.getString("ds.isloading"));
if (! hasCommands) {
splash.display();
}
// gets OS type
env.setOSType(Utils.getOSType());
// gets GUI mode
if (hasCommands) {
env.setGUIMode(false);
}
else {
env.setGUIMode(true);
}
// gets CDROM dir
env.setCDROMDir(Utils.getCDROMDir(env.getOSType()));
// users home
fEnv.setUserHome(Utils.getUserHome(env.getOSType(), System.getProperty("user.home")));
final DocSearch sw = new DocSearch();
splash.setMonitor(sw);
sw.init();
splash.close();
if (! hasCommands) {
sw.setVisible(true);
sw.checkUpdates();
}