Commit 462c2b47 authored by Thomas Friedrichsmeier's avatar Thomas Friedrichsmeier
Browse files

Add gitInstall plugin to settings and add-ons page

parent 732ace36
TODOs:
- More tolerant handshake on Windows? Simply a matter of allowing more time?
- Added functionality to install add-on packages directly from git (formerly available as external plugin rk.gitInstall)
- Fixed: Disabling a <row> element in plugins would not make the sub-elements non-required
- Add option to show ANOVA table for linear regression
- Add default preview() function is available to plugins, reducing the code needed to add preview functionality
......@@ -8,6 +9,7 @@ TODOs:
- Better placement of messages in non-plot preview windows
- Fixed some problems with cancelling running commands
- Package installation uses inline widget to provide progress feedback, instead of separate dialogs
- TODO: Fix crash, if cancelling of operation is confirmed, after operation has finished (guard against deletion, while question sub-dialog is active)
- Package installation no longer uses an external process, unless required for root permissions
- Fixed: Package installation as root would fail to find kdesu/kdesudo on recent systems
- Fixed: R help pages would refuse to open in new tab
......
......@@ -33,9 +33,10 @@ Addons shown in bold have been reported to be useful and work well in RKWard, bu
<section title="RKWard Plugins" id="rkward_plugins">
RKWard plugins can be installed from a variety of sources, but the usual distribution of add-on packages is via R packages. To look for R packages that provide RKWard graphical dialogs,
use the regular dialog (Settings->Manage R packages and plugins), and check the option "Show only packages providing RKWard dialogs".
use the regular dialog (<link href="rkward://actions/rpackage_install">Settings->Manage R packages and plugins</link>), and check the option "Show only packages providing RKWard dialogs".
Not all RKWard plugins packaged this way will be visible in the R package installation dialog, as they are not hosted (yet) in the default repositories, notably, at the time of this writing, the very extensive <link href="https://github.com/rkward-community/rk.Teaching">rk.Teaching</link> set of plugins.
Not all RKWard plugins packaged this way will be visible in the R package installation dialog, as they are not hosted (yet) in the default repositories, notably, at the time of this writing, the very extensive <link href="https://github.com/rkward-community/rk.Teaching">rk.Teaching</link> set of plugins. Many of these are hosted on platforms such as github.com, and knowing the repository url,
can be installed with few clicks, using <link href="rkward://runplugin/rkward::install_from_git/fullURL.text=https://github.com/rkward-community/rk.Teaching.git">this dialog</link> (pre-initialized for installation of rk.Teaching).
</section>
<section title="Creating your own RKWard Plugins" id="writing_plugins">
......
......@@ -31,5 +31,8 @@
<!-- This plugin does not really belong, here, but nowhere else, either, since it's only for the purpose of testing some things in the
automated tests. It definitely should not be shown in the menu, of course. -->
<component type="standard" id="testing_run_code" file="testing/run_code.xml" label="Run Code"/>
<!-- This plugin does not really belong, here, either, but has no place in the menu, too. -->
<component type="standard" id="install_from_git" file="internal/Installfromgit.xml" label="Install from git"/>
</components>
</document>
......@@ -12,8 +12,6 @@ guess.getter <- TRUE
rk.set.indent(by=" ")
# should empty "else" clauses be kept in the JavaScript code?
rk.set.empty.e(TRUE)
# make your plugin translatable by setting this to TRUE
update.translations <- TRUE
aboutPlugin <- rk.XML.about(
name="rk.gitInstall",
......@@ -224,7 +222,7 @@ plugin.dir <- rk.plugin.skeleton(
#related=,
#technical=
),
create=c("pmap", "xml", "js", "desc", "rkh"),
create=c("xml", "js", "rkh"),
overwrite=overwrite,
#components=list(),,
#provides=c("logic", "dialog"),
......@@ -233,13 +231,6 @@ plugin.dir <- rk.plugin.skeleton(
edit=FALSE,
load=TRUE,
show=TRUE,
gen.info="$SRC/inst/rkward/rkwarddev_rk.gitInstall_plugin_script.R",
hints=FALSE
)
# you can make your plugin translatable, see top of script
if(isTRUE(update.translations)){
rk.updatePluginMessages(file.path(output.dir,"rk.gitInstall","inst","rkward","rk.gitInstall.pluginmap"))
} else {}
})
......@@ -33,6 +33,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
#include "../misc/rkstandardicons.h"
#include "../rbackend/rkrinterface.h"
#include "../rbackend/rksessionvars.h"
#include "../plugin/rkcomponentmap.h"
#include "../misc/rkstyle.h"
#include "../debug.h"
......@@ -341,9 +342,18 @@ RKSettingsModuleRPackages::RKSettingsModuleRPackages (RKSettings *gui, QWidget *
source_packages_box->setChecked (true);
source_packages_box->setEnabled (false);
#endif
RKCommonFunctions::setTips (QString ("<p>%1</p>").arg (i18n ("Installing packages from pre-compiled binaries (if available) is generally faster, and does not require an installation of development tools and libraries. On the other hand, building packages from source provides best compatibility. On Mac OS X and Linux, building packages from source is currently recommended.")), source_packages_box);
RKCommonFunctions::setTips (QString ("<p>%1</p>").arg (i18n ("Installing packages from pre-compiled binaries (if available) is generally faster, and does not require an installation of development tools and libraries. On the other hand, building packages from source provides best compatibility.")), source_packages_box);
main_vbox->addWidget (source_packages_box);
hbox = new QHBoxLayout();
main_vbox->addLayout(hbox);
auto button = new QPushButton(i18n("Install from git"));
auto label = RKCommonFunctions::wordWrappedLabel(i18n("Some add-on packages are not available in the CRAN repository, but can be installed from development repositories. Use the button \"%1\", to install such pacakges, comfortably.", button->text()));
hbox->addWidget(label);
hbox->setStretchFactor(label, 2);
connect(button, &QPushButton::clicked, this, []() { RKComponentMap::getMap()->invokeComponent("rkward::install_from_git", QStringList()); });
hbox->addWidget(button);
main_vbox->addStretch ();
libloc_selector = new MultiStringSelector (i18n ("R Library locations (where libraries get installed to, locally)"), this);
......@@ -351,7 +361,7 @@ RKSettingsModuleRPackages::RKSettingsModuleRPackages (RKSettings *gui, QWidget *
connect (libloc_selector, &MultiStringSelector::listChanged, this, &RKSettingsModuleRPackages::settingChanged);
connect (libloc_selector, &MultiStringSelector::getNewStrings, this, &RKSettingsModuleRPackages::addLibLoc);
main_vbox->addWidget (libloc_selector);
QLabel *label = new QLabel (i18n ("Note: The startup defaults will always be used in addition to the locations you specify in this list"), this);
label = new QLabel (i18n ("Note: The startup defaults will always be used in addition to the locations you specify in this list"), this);
main_vbox->addWidget (label);
main_vbox->addStretch ();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment