summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/instancemanager.cpp21
3 files changed, 14 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e255f2b8..0146edd5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(organizer)
+
SET(DEPENDENCIES_DIR CACHE PATH "")
# hint to find qt in dependencies path
LIST(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}/qt5/lib/cmake)
@@ -11,4 +12,4 @@ GET_FILENAME_COMPONENT(BOOST_ROOT ${BOOST_ROOT} DIRECTORY)
SET(ZLIB_ROOT ${DEPENDENCIES_DIR}/zlib)
-ADD_SUBDIRECTORY(src) \ No newline at end of file
+ADD_SUBDIRECTORY(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fda85b76..a6434acf 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -297,8 +297,6 @@ INCLUDE_DIRECTORIES(${project_path}/uibase/src
${project_path}/game_gamebryo/src
${project_path}/game_features/src)
-MESSAGE(STATUS ${project_path}/gameGamebryo/src)
-
INCLUDE_DIRECTORIES(shared ${ZLIB_INCLUDE_DIRS})
LINK_DIRECTORIES(${lib_path}
diff --git a/src/instancemanager.cpp b/src/instancemanager.cpp
index 48c12d42..d48d02d2 100644
--- a/src/instancemanager.cpp
+++ b/src/instancemanager.cpp
@@ -172,18 +172,21 @@ QString InstanceManager::determineDataPath()
QStringList instanceList = instances();
- qDebug("%d - %s", instanceList.size(), qPrintable(instanceList.join(";")));
-
if (instanceList.size() == 0) {
- switch (queryInstallMode()) {
- case InstallationMode::PORTABLE: {
- instanceId = QString();
- } break;
- case InstallationMode::REGULAR: {
- instanceId = queryInstanceName();
- } break;
+ if (QFileInfo(qApp->applicationDirPath()).isWritable()) {
+ switch (queryInstallMode()) {
+ case InstallationMode::PORTABLE: {
+ instanceId = QString();
+ } break;
+ case InstallationMode::REGULAR: {
+ instanceId = queryInstanceName();
+ } break;
+ }
+ } else {
+ instanceId = queryInstanceName();
}
} else {
+ // don't offer portable instance if we can't set one up.
instanceId = chooseInstance(instanceList);
}
}