Add missing nostalgia directory level in src tree

This commit is contained in:
2017-05-12 17:55:18 -05:00
parent 1b9f8f40f4
commit bfc87b50b1
43 changed files with 22 additions and 19 deletions
+44
View File
@@ -0,0 +1,44 @@
/*
* Copyright 2016-2017 gtalent2@gmail.com
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <QApplication>
#include <QFile>
#include <QTextStream>
#include <ox/clargs/clargs.hpp>
#include "json/json.hpp"
#include "mainwindow.hpp"
using namespace nostalgia::studio;
using namespace ox;
int run(int argc, char **args) {
ClArgs clargs(argc, (const char**) args);
QString argProfilePath = clargs.getString("profile").c_str();
NostalgiaStudioProfile config;
// load in config file
QFile file(argProfilePath);
if (file.exists()) {
file.open(QIODevice::ReadOnly);
QTextStream in(&file);
read(in.readAll(), &config);
}
QApplication app(argc, args);
app.setApplicationName(config.appName);
MainWindow w(config);
w.show();
return app.exec();
}
int main(int argc, char **args) {
return run(argc, args);
}