Selaa lähdekoodia

Simplify qml sourcing

Donald Carr 8 vuotta sitten
vanhempi
commit
b05104b77d
3 muutettua tiedostoa jossa 6 lisäystä ja 10 poistoa
  1. 1 7
      artriculate
  2. 3 3
      src/main.cpp
  3. 2 0
      src/src.pro

+ 1 - 7
artriculate

@@ -5,13 +5,7 @@ script_dir=$(dirname ${executed_file})
 
 force_wayland=true
 
-bin_name=artriculate-bin
-dev_name=${script_dir}/src/${bin_name}
-if [[ -x ${dev_name} ]]; then
-  cmd=${dev_name}
-else
-  cmd=${script_dir}/${bin_name}
-fi
+cmd=${script_dir}/artriculate-bin
 
 args=""
 env=""

+ 3 - 3
src/main.cpp

@@ -125,9 +125,9 @@ int main(int argc, char *argv[])
 #ifdef COMPILED_RESOURCES
     qmlPath = "qrc:/qml";
 #else
-    if (QDir(app.applicationDirPath()).dirName() == "src") {
-        qmlPath = QCoreApplication::applicationDirPath() % "/../qml";
-    } else {
+    qmlPath = QCoreApplication::applicationDirPath() % "/qml";
+
+    if (!QDir(qmlPath).exists()) {
         qmlPath = "/usr/share/" % app.applicationName() % "/qml";
     }
 #endif

+ 2 - 0
src/src.pro

@@ -1,5 +1,7 @@
 TEMPLATE = app
 
+DESTDIR = ../
+
 QT += qml quick dbus sql
 CONFIG += c++11