src: move set app path to linux includes
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
@@ -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/");
|
||||
|
||||
Reference in New Issue
Block a user