[rkward] /: Allow RKWard to find all files directly in the build tree, without installation.
Thomas Friedrichsmeier
null at kde.org
Sat Jan 25 08:47:54 GMT 2020
Git commit 098904ea60fac66e4f44af1f10b581de02f68cb1 by Thomas Friedrichsmeier.
Committed on 25/01/2020 at 08:47.
Pushed by tfry into branch 'master'.
Allow RKWard to find all files directly in the build tree, without installation.
This should make development / testing easier.
M +3 -0 ChangeLog
M +12 -3 rkward/CMakeLists.txt
M +2 -2 rkward/main.cpp
M +7 -1 rkward/misc/rkcommonfunctions.cpp
M +1 -1 rkward/rbackend/rpackages/rkward/DESCRIPTION
M +4 -0 rkward/settings/rksettingsmoduleplugins.cpp
https://commits.kde.org/rkward/098904ea60fac66e4f44af1f10b581de02f68cb1
diff --git a/ChangeLog b/ChangeLog
index e9cc585a..13663579 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
--- Version 0.7.2 - UNRELEASED
* TODO: Bring new code hinting features to the console window!
+- On unix-systems, RKWard can now be run without installation
+- Kate addons are now supported within RKWard. Intially, search-in-files, snippets, and projects are loaded by default
+ * TODO: Allow to configure which (additional) plugins get loaded
--- Version 0.7.1 - Jan-23-2020
- Code hinting in script editor windows has been reworked, and now also completes argument names
diff --git a/rkward/CMakeLists.txt b/rkward/CMakeLists.txt
index f8244eca..2cf6bfe1 100644
--- a/rkward/CMakeLists.txt
+++ b/rkward/CMakeLists.txt
@@ -81,10 +81,19 @@ ENDIF(KF5Crash_FOUND)
########### install files ###############
-INSTALL(DIRECTORY plugins/ pages DESTINATION ${DATA_INSTALL_DIR}/rkward
- PATTERN .svn EXCLUDE)
-
+INSTALL(DIRECTORY plugins/ pages DESTINATION ${DATA_INSTALL_DIR}/rkward)
INSTALL(FILES resource.ver DESTINATION ${DATA_INSTALL_DIR}/rkward)
+IF(NOT WIN32)
+ # This is for running directly from the build tree. Not on windows for now (until cmake supports symlinks, there)
+ ADD_CUSTOM_TARGET(local_install ALL
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/pages ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/pages
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/plugins ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/plugins
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/resource.ver ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/resource.ver
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/rbackend/rpackages ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/rpackages
+ )
+ENDIF(NOT WIN32)
+
IF(APPLE)
INSTALL(TARGETS rkward DESTINATION ${BUNDLE_INSTALL_DIR})
diff --git a/rkward/main.cpp b/rkward/main.cpp
index 426a1cd4..b1cf82b7 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -2,7 +2,7 @@
main.cpp - description
-------------------
begin : Tue Oct 29 20:06:08 CET 2002
- copyright : (C) 2002-2019 by Thomas Friedrichsmeier
+ copyright : (C) 2002-2020 by Thomas Friedrichsmeier
email : thomas.friedrichsmeier at kdemail.net
***************************************************************************/
@@ -245,7 +245,7 @@ int main (int argc, char *argv[]) {
KUrlAuthorized::allowUrlAction ("redirect", QUrl("rkward://"), QUrl ("help:"));
KLocalizedString::setApplicationDomain ("rkward");
- KAboutData aboutData ("rkward", i18n ("RKWard"), RKWARD_VERSION, i18n ("Frontend to the R statistics language"), KAboutLicense::GPL, i18n ("(c) 2002, 2004 - 2019"), QString (), "http://rkward.kde.org");
+ KAboutData aboutData ("rkward", i18n ("RKWard"), RKWARD_VERSION, i18n ("Frontend to the R statistics language"), KAboutLicense::GPL, i18n ("(c) 2002, 2004 - 2020"), QString (), "http://rkward.kde.org");
aboutData.addAuthor (i18n ("Thomas Friedrichsmeier"), i18n ("Project leader / main developer"));
aboutData.addAuthor (i18n ("Pierre Ecochard"), i18n ("C++ developer between 2004 and 2007"));
aboutData.addAuthor (i18n ("Prasenjit Kapat"), i18n ("Many plugins, suggestions, plot history feature"));
diff --git a/rkward/misc/rkcommonfunctions.cpp b/rkward/misc/rkcommonfunctions.cpp
index 5df8ec5f..3d19c111 100644
--- a/rkward/misc/rkcommonfunctions.cpp
+++ b/rkward/misc/rkcommonfunctions.cpp
@@ -2,7 +2,7 @@
rkcommonfunctions - description
-------------------
begin : Mon Oct 17 2005
- copyright : (C) 2005-2018 by Thomas Friedrichsmeier
+ copyright : (C) 2005-2020 by Thomas Friedrichsmeier
email : thomas.friedrichsmeier at kdemail.net
***************************************************************************/
@@ -21,6 +21,7 @@
#include <qregexp.h>
#include <QDir>
#include <QStandardPaths>
+#include <QCoreApplication>
#include <KLocalizedString>
#include <kxmlguiclient.h>
@@ -172,6 +173,11 @@ namespace RKCommonFunctions {
QString getRKWardDataDir () {
static QString rkward_data_dir;
if (rkward_data_dir.isNull ()) {
+ QString inside_build_tree = QCoreApplication::applicationDirPath() + "/rkwardinstall/";
+ if (QFileInfo(inside_build_tree).isReadable()) {
+ rkward_data_dir = inside_build_tree;
+ return rkward_data_dir;
+ }
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
QStringList candidates = QStandardPaths::locateAll (QStandardPaths::AppDataLocation, "resource.ver");
candidates += QStandardPaths::locateAll (QStandardPaths::AppDataLocation, "rkward/resource.ver"); // Well, isn't this just silly? AppDataLocation may or may not contain the application name (on Mac)
diff --git a/rkward/rbackend/rpackages/rkward/DESCRIPTION b/rkward/rbackend/rpackages/rkward/DESCRIPTION
index b440482e..6039a6f1 100755
--- a/rkward/rbackend/rpackages/rkward/DESCRIPTION
+++ b/rkward/rbackend/rpackages/rkward/DESCRIPTION
@@ -18,7 +18,7 @@ Authors at R: c(person(given="Thomas", family="Friedrichsmeier",
role=c("aut")), person(given="the RKWard team",
email="rkward-devel at kde.org", role=c("cre","ctb")))
Version: 0.7.2
-Date: 2020-01-23
+Date: 2020-01-25
RoxygenNote: 6.1.0
Collate:
'base_overrides.R'
diff --git a/rkward/settings/rksettingsmoduleplugins.cpp b/rkward/settings/rksettingsmoduleplugins.cpp
index 2439da0b..6aa28e9f 100644
--- a/rkward/settings/rksettingsmoduleplugins.cpp
+++ b/rkward/settings/rksettingsmoduleplugins.cpp
@@ -191,6 +191,10 @@ void RKSettingsModulePlugins::loadSettings (KConfig *config) {
// Note that in the case of installationMoved(), checkAdjustLoadedPath() has already kicked in, above, but rescanning is still useful
// e.g. if users have installed to a new location, because they had botched their previous installation
QDir def_plugindir (RKCommonFunctions::getRKWardDataDir ());
+ if (def_plugindir.dirName() == QStringLiteral ("rkwardinstall")) {
+ // For running from build-dir: Work around bad design choice of installation layout
+ def_plugindir.cd ("plugins");
+ }
QStringList def_pluginmaps = def_plugindir.entryList (QStringList ("*.pluginmap"));
for (int i = 0; i < def_pluginmaps.size (); ++i) {
def_pluginmaps[i] = def_plugindir.absoluteFilePath (def_pluginmaps[i]);
More information about the rkward-tracker
mailing list