fuel-scm/main.cpp
kostas 480bc28712 Added support for portable mode [Thanks Chris]
Portable mode is enabled by passing the "--portable" command line option
More i8n cleanups



FossilOrigin-Name: 9cb380713c661f2ac8250800ef8e8b01fa9dafdc
2012-04-22 13:48:41 +00:00

42 lines
877 B
C++

#include <QtGui/QApplication>
#include "MainWindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setApplicationName("Fuel");
app.setApplicationVersion("0.9.6");
app.setOrganizationDomain("fuel-scm.org");
app.setOrganizationName("Fuel-SCM");
#ifdef Q_WS_MACX
// Native OSX applications don't use menu icons
a.setAttribute(Qt::AA_DontShowIconsInMenus);
#endif
{
bool portable = false;
QString workspace;
Q_ASSERT(app.arguments().size()>0);
for(int i=1; i<app.arguments().size(); ++i)
{
QString arg = app.arguments()[i];
// Parse options
if(arg.indexOf("--")!=-1)
{
if(arg.indexOf("portable")!=-1)
portable = true;
continue;
}
else
workspace = arg;
}
MainWindow mainwin(0,
workspace.isEmpty() ? 0 : &workspace,
portable);
mainwin.show();
return app.exec();
}
}