src: move set app path to linux includes

This commit is contained in:
Andreas Stallinger
2016-03-08 13:01:00 +01:00
parent cabdb69956
commit 90c0d15d20
3 changed files with 11 additions and 6 deletions
+4 -1
View File
@@ -53,7 +53,10 @@ if [ $PLATFORM == "Windows" ]; then
cmd //c 'mklink /d /j '.$MY_PATH.'\..\bin\app\Debug\user '.$MY_PATH.'\..\bin\app\user' &
cmd //c 'mklink /d /j '.$MY_PATH.'\..\bin\app\Release\data '.$MY_PATH.'\..\bin\app\data' &
cmd //c 'mklink /d /j '.$MY_PATH.'\..\bin\app\Release\user '.$MY_PATH.'\..\bin\app\user' &
elif [ $PLATFORM == "Linux" ]; then
echo -e $INFO "create symbolic links for data"
ln -s bin/app/data bin/app/Release/data
ln -s bin/app/data bin/app/Debug/data
fi
# Setup both Debug and Release configuration
-4
View File
@@ -35,10 +35,6 @@ void init()
void prepare(int argc, char *argv[])
{
if (AppPath::getAppPath().empty())
{
AppPath::setAppPath(QCoreApplication::applicationDirPath().toStdString() + "/");
}
setup(argc, argv);
init();
@@ -1,6 +1,7 @@
#ifndef INCLUDES_DEFAULT_H
#define INCLUDES_DEFAULT_H
#include <QCoreApplication>
#include "utility/AppPath.h"
#include "utility/UserPaths.h"
#include "utility/file/FilePath.h"
@@ -9,7 +10,12 @@
void setup(int argc, char *argv[])
{
std::string userdir(std::getenv("HOME"));
if (AppPath::getAppPath().empty())
{
AppPath::setAppPath(QCoreApplication::applicationDirPath().toStdString() + "/");
}
std::string userdir(std::getenv("HOME"));
if(isTrial())
{
userdir.append("/.config/coatitrial/");