[rkward-cvs] SF.net SVN: rkward-code:[4803] trunk/rkward/rkward/rkward_startup_wrapper. cpp

tfry at users.sf.net tfry at users.sf.net
Fri Sep 5 10:00:54 UTC 2014


Revision: 4803
          http://sourceforge.net/p/rkward/code/4803
Author:   tfry
Date:     2014-09-05 10:00:53 +0000 (Fri, 05 Sep 2014)
Log Message:
-----------
On Mac, amend the path, _before_ trying to locate kde4-config

Modified Paths:
--------------
    trunk/rkward/rkward/rkward_startup_wrapper.cpp

Modified: trunk/rkward/rkward/rkward_startup_wrapper.cpp
===================================================================
--- trunk/rkward/rkward/rkward_startup_wrapper.cpp	2014-09-05 09:38:20 UTC (rev 4802)
+++ trunk/rkward/rkward/rkward_startup_wrapper.cpp	2014-09-05 10:00:53 UTC (rev 4803)
@@ -118,6 +118,18 @@
 		}
 	}
 
+	// MacOS may need some path adjustments, first
+#ifdef Q_WS_MAC
+	QString oldpath = qgetenv ("PATH");
+	if (!oldpath.contains (INSTALL_PATH)) {
+		//ensure that PATH is set to include what we deliver with the bundle
+		qputenv ("PATH", QString ("\"%1/bin\":\"%1/sbin\":%2").arg (INSTALL_PATH).arg (oldpath).toLocal8Bit ());
+	}
+	// ensure that RKWard finds its own packages
+	qputenv ("R_LIBS"=R_LIBS);
+	QProcess::execute ("lanuchctl", QStringList () << "load" << "-w" << "\"" INSTALL_PATH "/Library/LaunchAgents/org.freedesktop.dbus-session.plist\"");
+#endif
+
 	// Locate KDE and RKWard installations
 	QString kdeinit4_exe;
 	QString rkward_frontend_exe;
@@ -191,17 +203,6 @@
 	qputenv ("LC_NUMERIC", "C");
 #endif
 
-#ifdef Q_WS_MAC
-	QString oldpath = qgetenv ("PATH");
-	if (!oldpath.contains (INSTALL_PATH)) {
-		//ensure that PATH is set to include what we deliver with the bundle
-		qputenv ("PATH", QString ("\"%1/bin\":\"%1/sbin\":%2").arg (INSTALL_PATH).arg (oldpath).toLocal8Bit ());
-	}
-	// ensure that RKWard finds its own packages
-	qputenv ("R_LIBS"=R_LIBS);
-	QProcess::execute ("lanuchctl", QStringList () << "load" << "-w" << "\"" INSTALL_PATH "/Library/LaunchAgents/org.freedesktop.dbus-session.plist\"");
-#endif
-
 	// Look for R:
 	//- command line parameter
 	//- Specified in cfg file next to rkward executable





More information about the rkward-tracker mailing list