Skip to content

Commit

Permalink
fmk - making sure app folder exists in Documents
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Oct 15, 2019
1 parent 2d5232a commit 50a0584
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ int main(int argc, char *argv[])
//Setting Core Application Name, Organization and Version
QCoreApplication::setApplicationName("PBE");
QCoreApplication::setOrganizationName("SimCenter");
QCoreApplication::setApplicationVersion("1.2.0");

QCoreApplication::setApplicationVersion("2.0.0");
//GoogleAnalytics::SetTrackingId("UA-126256136-1");
GoogleAnalytics::StartSession();
GoogleAnalytics::ReportStart();
Expand All @@ -66,9 +65,17 @@ int main(int argc, char *argv[])
//

logFilePath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)
+ QDir::separator() + QCoreApplication::applicationName()
+ QDir::separator() + QString("debug.log");
+ QDir::separator() + QCoreApplication::applicationName();

// make sure tool dir exists in Documentss folder
QDir dirWork(logFilePath);
if (!dirWork.exists())
if (!dirWork.mkpath(logFilePath)) {
qDebug() << QString("Could not create Working Dir: ") << logFilePath;
}

// full path to debug.log file
logFilePath = logFilePath + QDir::separator() + QString("debug.log");

// remove old log file
QFile debugFile(logFilePath);
Expand Down Expand Up @@ -154,15 +161,15 @@ int main(int argc, char *argv[])
we provide and will be enthused to provide their own applications for others \
to use. \
<p>\
This is Version 1.2.0 of the tool and as such is limited in scope. Researchers are\
This is Version 2.0.0 of the tool and as such is limited in scope. Researchers are\
encouraged to comment on what additional features and applications they would \
like to see in the PBE App. If you want a feature, chances are many of your \
colleagues would also benefit from it.\
<p>";

w.setAbout(textAboutPBE);

QString version("Version 1.2.0");
QString version("Version 2.0.0");
w.setVersion(version);

QString citeText("Frank McKenna, Adam Zsarnoczay, Charles Wang, Wael Elhaddad, & Michael Gardner. (2019, June 30). NHERI-SimCenter/PBE: Release v1.2.0 (Version v1.2.0). Zenodo. http://doi.org/10.5281/zenodo.3263910");
Expand Down

0 comments on commit 50a0584

Please sign in to comment.