build: renaming to sourcetrail

This commit is contained in:
Andreas Stallinger
2017-04-07 13:19:09 +02:00
parent 8391a6da57
commit 045a259b2e
224 changed files with 885 additions and 4271 deletions
+14 -1
View File
@@ -55,14 +55,27 @@ void setupPlatform(int argc, char *argv[])
// ----------------------------------------------------------------------------
// Makes the mac bundle copy the user files to the Application Support folder
QString dataPath = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
QString oldDataPath = QString::fromStdString(UserPaths::getUserDataPath() + "user/");
QDir dataDir(dataPath);
if (!dataDir.exists())
{
dataDir.mkpath(dataPath);
if (dataPath.endsWith("Sourcetrail"))
{
QString coatiDataPath = dataPath;
coatiDataPath.append("/../Coati");
QDir coatiDataDir(coatiDataPath);
if (coatiDataDir.exists())
{
oldDataPath = coatiDataPath;
}
}
}
utility::copyNewFilesFromDirectory(QString::fromStdString(UserPaths::getUserDataPath() + "user/"), dataPath);
utility::copyNewFilesFromDirectory(oldDataPath, dataPath);
UserPaths::setUserDataPath(dataPath.toStdString() + "/");
// ----------------------------------------------------------------------------