Changeset View
Changeset View
Standalone View
Standalone View
kstars/kstars.cpp
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 100 | #ifdef Q_OS_OSX | |||
---|---|---|---|---|---|
103 | qputenv("VLC_PLUGIN_PATH", vlcPlugins.toLatin1()); | 103 | qputenv("VLC_PLUGIN_PATH", vlcPlugins.toLatin1()); | ||
104 | QString phonon_backend_path = QDir(QCoreApplication::applicationDirPath() + "/../PlugIns/phonon4qt5_backend/phonon_vlc.so").absolutePath(); | 104 | QString phonon_backend_path = QDir(QCoreApplication::applicationDirPath() + "/../PlugIns/phonon4qt5_backend/phonon_vlc.so").absolutePath(); | ||
105 | qputenv("PHONON_BACKEND", phonon_backend_path.toLatin1()); | 105 | qputenv("PHONON_BACKEND", phonon_backend_path.toLatin1()); | ||
106 | 106 | | |||
107 | QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); | 107 | QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); | ||
108 | QString path = env.value("PATH", ""); | 108 | QString path = env.value("PATH", ""); | ||
109 | env.insert("PATH", "/usr/bin:/usr/local/bin:\"" + QCoreApplication::applicationDirPath() + "\":" + path); | 109 | env.insert("PATH", "/usr/bin:/usr/local/bin:\"" + QCoreApplication::applicationDirPath() + "\":" + path); | ||
110 | 110 | | |||
111 | //This Environment variable is needed sometimes in Craft built Mac KStars when running in Craft because it cannot find the qml directory inside craft. | ||||
112 | //This should not cause any issues for any other installation since the original path is preserved. | ||||
113 | QString qtDIR = env.value("QTDIR", ""); | ||||
114 | QString currentQMLPath = env.value("QML2_IMPORT_PATH", ""); | ||||
115 | QString newQMLPath = qtDIR + "/qml:" + qtDIR + "/lib/qml:" + currentQMLPath; | ||||
116 | qputenv("QML2_IMPORT_PATH", newQMLPath.toLatin1()); | ||||
117 | env.insert("QML2_IMPORT_PATH", newQMLPath); | ||||
118 | | ||||
111 | QProcess dbusCheck; | 119 | QProcess dbusCheck; | ||
112 | dbusCheck.setProcessEnvironment(env); | 120 | dbusCheck.setProcessEnvironment(env); | ||
113 | 121 | | |||
114 | QString pluginsDir = QDir(QCoreApplication::applicationDirPath() + "/../PlugIns").absolutePath(); | 122 | QString pluginsDir = QDir(QCoreApplication::applicationDirPath() + "/../PlugIns").absolutePath(); | ||
115 | QString dbusPlist = pluginsDir + "/dbus/org.freedesktop.dbus-kstars.plist"; | 123 | QString dbusPlist = pluginsDir + "/dbus/org.freedesktop.dbus-kstars.plist"; | ||
116 | QFile file(dbusPlist); | 124 | QFile file(dbusPlist); | ||
117 | if (file.open(QIODevice::ReadOnly)) | 125 | if (file.open(QIODevice::ReadOnly)) | ||
118 | { | 126 | { | ||
▲ Show 20 Lines • Show All 548 Lines • Show Last 20 Lines |