[rkward/frameworks] rkward: Fix lookup of RKWard frontend exe

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Sun Aug 14 19:11:10 UTC 2016


Git commit 9e706930cb0dc79a6ba31c3d9ba87c3c7c725d0d by Thomas Friedrichsmeier.
Committed on 14/08/2016 at 19:08.
Pushed by tfry into branch 'frameworks'.

Fix lookup of RKWard frontend exe

M  +1    -1    rkward/CMakeLists.txt
M  +4    -0    rkward/rkward_startup_wrapper.cpp

http://commits.kde.org/rkward/9e706930cb0dc79a6ba31c3d9ba87c3c7c725d0d

diff --git a/rkward/CMakeLists.txt b/rkward/CMakeLists.txt
index 03e69ce..d9fe31e 100644
--- a/rkward/CMakeLists.txt
+++ b/rkward/CMakeLists.txt
@@ -69,7 +69,7 @@ ADD_EXECUTABLE (rkward rkward_startup_wrapper.cpp rkward_windows_icon.rc rkward.
 add_definitions (-DR_EXECUTABLE="${R_EXECUTABLE}")
 add_definitions (-DINSTALL_PATH="${CMAKE_INSTALL_PREFIX}")
 add_definitions (-DR_LIBS="${R_LIBDIR}")
-add_definitions (-DRKWARD_FRONTEND_LOCATION="${RKWARD_FRONTEND_LOCATION}")
+add_definitions (-DRKWARD_FRONTEND_LOCATION="${CMAKE_INSTALL_PREFIX}/${RKWARD_FRONTEND_LOCATION}")
 TARGET_LINK_LIBRARIES(rkward Qt5::Gui Qt5::Core Qt5::DBus Qt5::Widgets)
 
 ADD_DEPENDENCIES(rkward.frontend rkward)
diff --git a/rkward/rkward_startup_wrapper.cpp b/rkward/rkward_startup_wrapper.cpp
index d42577d..caf1552 100644
--- a/rkward/rkward_startup_wrapper.cpp
+++ b/rkward/rkward_startup_wrapper.cpp
@@ -216,6 +216,10 @@ int main (int argc, char *argv[]) {
 	if (rkward_frontend_exe.isNull ()) rkward_frontend_exe = findRKWardAtPath (RKWARD_FRONTEND_LOCATION);
 	if (rkward_frontend_exe.isNull ()) rkward_frontend_exe = findRKWardAtPath (kde_dir.absoluteFilePath ("bin"));
 	if (rkward_frontend_exe.isNull ()) rkward_frontend_exe = findRKWardAtPath (kde_dir.absoluteFilePath ("../lib/libexec"));
+	for (int i = 0; i < syspath.size (); ++i) {
+		rkward_frontend_exe = findRKWardAtPath (syspath[i]);
+		if (!rkward_frontend_exe.isNull ()) break;
+	}
 
 	if (rkward_frontend_exe.isNull ()) {
 		QMessageBox::critical (0, "RKWard frontend binary missing", "RKWard frontend binary could not be found. When moving / copying RKWard, make sure to copy the whole application folder, or create a shorcut / link, instead.");



More information about the rkward-tracker mailing list