[rkward-cvs] SF.net SVN: rkward:[3503] trunk/rkward/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Apr 3 11:46:28 UTC 2011


Revision: 3503
          http://rkward.svn.sourceforge.net/rkward/?rev=3503&view=rev
Author:   tfry
Date:     2011-04-03 11:46:27 +0000 (Sun, 03 Apr 2011)

Log Message:
-----------
Next attempt at supporting non-standard installations, correctly (not yet tested on Windows).

Modified Paths:
--------------
    trunk/rkward/rkward/main.cpp
    trunk/rkward/rkward/rkward.bat.template
    trunk/rkward/rkward/rkward.sh.template

Modified: trunk/rkward/rkward/main.cpp
===================================================================
--- trunk/rkward/rkward/main.cpp	2011-03-31 08:57:17 UTC (rev 3502)
+++ trunk/rkward/rkward/main.cpp	2011-04-03 11:46:27 UTC (rev 3503)
@@ -54,7 +54,6 @@
 #include <kaboutdata.h>
 #include <klocale.h>
 #include <ktemporaryfile.h>
-#include <kstandarddirs.h>
 
 #include <qstring.h>
 #include <QMutex>
@@ -165,11 +164,6 @@
 	}
 	args->clear();
 
-	// Usually, KDE always adds the current directory to the list of prefixes.
-	// However, since RKWard 0.5.6, the main binary is in KDE's libexec dir, which defies this mechanism. Therefore, RKWARD_ENSURE_PREFIX is set from the wrapper script.
-	char *add_path = getenv ("RKWARD_ENSURE_PREFIX");
-	if (add_path) KGlobal::dirs ()->addPrefix (QString::fromLocal8Bit (add_path));
-
 	// do it!
 	int status = app.exec ();
 

Modified: trunk/rkward/rkward/rkward.bat.template
===================================================================
--- trunk/rkward/rkward/rkward.bat.template	2011-03-31 08:57:17 UTC (rev 3502)
+++ trunk/rkward/rkward/rkward.bat.template	2011-04-03 11:46:27 UTC (rev 3503)
@@ -16,7 +16,10 @@
 
 ECHO Starting RKWard
 SET RKWARD.BIN=%~dsp0\..\lib\kde4\libexec\rkward.frontend.exe
-SET RKWARD_ENSURE_PREFIX=%~dsp0\..
+IF %KDEDIRS% == "" GOTO add
+SET KDEDRIS="%KDEDRIS%;"
+:add
+SET KDEDIRS="%KDEDRIS%%~dsp0\.."
 SET DEBUGGER=
 
 IF NOT "%1" == "--debugger" GOTO run

Modified: trunk/rkward/rkward/rkward.sh.template
===================================================================
--- trunk/rkward/rkward/rkward.sh.template	2011-03-31 08:57:17 UTC (rev 3502)
+++ trunk/rkward/rkward/rkward.sh.template	2011-04-03 11:46:27 UTC (rev 3503)
@@ -49,7 +49,14 @@
   rkward_binary="`dirname $0`/rkward.frontend"
 else
   # for regular installations
-  export RKWARD_ENSURE_PREFIX="`dirname $0`/.."
+  # Usually, KDE always adds the current directory to the list of prefixes.
+  # However, since RKWard 0.5.6, the main binary is in KDE's libexec dir, which defies this mechanism. Therefore, we need to make sure, KDEDIRS is set appropriately
+  EFFECTIVE_PREFIX=`readlink -e \`dirname $0\`/..`
+  if [ -z "${KDEDIRS}" ]; then
+    export KDEDIRS="${EFFECTIVE_PREFIX}"
+  else
+    export KDEDIRS="${EFFECTIVE_PREFIX}:${KDEDIRS}"
+  fi
   rkward_binary="@LIBEXEC_INSTALL_DIR@/rkward.frontend"
 fi
 exec $R_binary CMD $debugger ${rkward_binary} "$@"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list