diff options
Diffstat (limited to 'src/pvsmgr.cpp')
| -rw-r--r-- | src/pvsmgr.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/pvsmgr.cpp b/src/pvsmgr.cpp new file mode 100644 index 0000000..83f5fe0 --- /dev/null +++ b/src/pvsmgr.cpp @@ -0,0 +1,55 @@ +/* + # Copyright (c) 2009 - OpenSLX Project, Computer Center University of Freiburg + # + # This program is free software distributed under the GPL version 2. + # See http://openslx.org/COPYING + # + # If you have any feedback please consult http://openslx.org/feedback and + # send your suggestions, praise, or complaints to feedback@openslx.org + # + # General information about OpenSLX can be found at http://openslx.org/ + # ----------------------------------------------------------------------------- + # pvs.cpp + # - main loop for pvsmgr GUI. + # ----------------------------------------------------------------------------- + */ + +#include <QtGui> +#include <QtGui/QDesktopServices> +#include "gui/mainWindow.h" +#include "util/consoleLogger.h" +#include "util/pvsSettingsManager.h" +#include "util/CertManager.h" + +QApplication *qtApp; + +int main(int argc, char** argv) +{ + //system("openssl genrsa 1024 >~/.pvs/"); + qtApp = new QApplication(argc, argv); + qtApp->setOrganizationName("openslx"); + qtApp->setOrganizationDomain("openslx.org"); + qtApp->setApplicationName("pvsmgr"); + + // use system locale as language to translate gui + QTranslator translator; + translator.load(":pvsmgr"); + qtApp->installTranslator(&translator); + + ConsoleLog setLogName(QString("log.server")); + ConsoleLog writeLine(QString("PVS-Server started.")); + + QSslKey k = CertManager::getPrivateKey("manager"); // preload key so the gui won't hang later + /* + if (k.isNull()) + { + printf("FATAL: Private key could not be generated or loaded!\n"); + exit(123); + } + */ + PVSSettingsManager::getManager()->setConfigFile(getPolicyFilePath("serverconf")); + MainWindow w; + w.show(); + return qtApp->exec(); +} + |
