[rkward-cvs] SF.net SVN: rkward-code:[4825] trunk/rkward/rkward/rkward_startup_wrapper. cpp
tfry at users.sf.net
tfry at users.sf.net
Tue Sep 16 12:04:36 UTC 2014
Revision: 4825
http://sourceforge.net/p/rkward/code/4825
Author: tfry
Date: 2014-09-16 12:04:34 +0000 (Tue, 16 Sep 2014)
Log Message:
-----------
Support running directly from build tree on Mac
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-16 08:58:20 UTC (rev 4824)
+++ trunk/rkward/rkward/rkward_startup_wrapper.cpp 2014-09-16 12:04:34 UTC (rev 4825)
@@ -41,9 +41,11 @@
QDir dir (path);
dir.makeAbsolute ();
if (QFileInfo (dir.filePath (appname)).isExecutable ()) return dir.filePath (appname);
+#ifdef Q_WS_WIN
if (QFileInfo (dir.filePath (appname + ".exe")).isExecutable ()) return dir.filePath (appname + ".exe");
if (QFileInfo (dir.filePath (appname + ".com")).isExecutable ()) return dir.filePath (appname + ".com");
if (QFileInfo (dir.filePath (appname + ".bat")).isExecutable ()) return dir.filePath (appname + ".bat");
+#endif
return QString ();
}
@@ -167,6 +169,9 @@
if (debug_level > 3) qDebug ("Setting environment variable RKWARD_ENSURE_PREFIX=%s", qPrintable (kde_dir.path ()));
QString rkward_frontend_exe = findRKWardAtPath (app.applicationDirPath ()); // this is for running directly from a build tree
+#ifdef Q_WS_MAC
+ if (rkward_frontend_exe.isNull ()) rkward_frontend_exe = findRKWardAtPath ("rkward.frontend.app/Contents/MacOS"); // this is for running directly from a build tree
+#endif
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"));
More information about the rkward-tracker
mailing list