[education/rkward] rkward/plugins: Update DownloadAppImage plugin to use new RCommand()

Thomas Friedrichsmeier null at kde.org
Wed May 7 14:21:37 BST 2025


Git commit f44825ffe499be76ff3b05018f01d5882b693665 by Thomas Friedrichsmeier.
Committed on 07/05/2025 at 13:21.
Pushed by tfry into branch 'master'.

Update DownloadAppImage plugin to use new RCommand()

M  +1    -1    rkward/plugins/00saveload/DownloadAppImage.js
M  +7    -6    rkward/plugins/00saveload/DownloadAppImage.xml
M  +7    -6    rkward/plugins/rkwarddev_scripts/rkwarddev_rk.download_appimage_plugin_script.R

https://invent.kde.org/education/rkward/-/commit/f44825ffe499be76ff3b05018f01d5882b693665

diff --git a/rkward/plugins/00saveload/DownloadAppImage.js b/rkward/plugins/00saveload/DownloadAppImage.js
index a192c38c5..49333ef72 100644
--- a/rkward/plugins/00saveload/DownloadAppImage.js
+++ b/rkward/plugins/00saveload/DownloadAppImage.js
@@ -41,7 +41,7 @@ function calculate(is_preview) {
 		echo(",\n    overwrite = FALSE");
 	}
 	if (aiuBranch == "stable") {
-		echo(",\n    url = \"https://download.kde.org/stable/rkward/0.8.0\"" +
+		echo(",\n    url = \"https://download.kde.org/stable/rkward/0.8.1\"" +
 		     ",\n    pattern = \"rkward.*x86_64\\\\.AppImage\"");
 	} else if (aiuBranch == "develop") {
 		echo(",\n    url = \"https://cdn.kde.org/ci-builds/education/rkward/master/linux\"" +
diff --git a/rkward/plugins/00saveload/DownloadAppImage.xml b/rkward/plugins/00saveload/DownloadAppImage.xml
index 0b218a359..04eaced26 100644
--- a/rkward/plugins/00saveload/DownloadAppImage.xml
+++ b/rkward/plugins/00saveload/DownloadAppImage.xml
@@ -20,13 +20,14 @@ SPDX-License-Identifier: GPL-2.0-or-later
   <logic>
     <script>
       <![CDATA[
-        doRCommand('Sys.getenv("APPIMAGE")', "commandFinished");
-            commandFinished = function (result, id) {
-              if (result != "") {
-                gui.setValue("aiu_file.selection", result);
-                return;
-              }
+          new RCommand('Sys.getenv("APPIMAGE")').then(result => {
+            if (result != "") {
+              gui.setValue("aiu_file.selection", result);
+              return;
             }
+          }).catch(err => {
+            // no error handling
+          });
       ]]>
     </script>
     <convert id="aiu_lgc_branch_stable" sources="aiu_branch.string" mode="equals" standard="stable" />
diff --git a/rkward/plugins/rkwarddev_scripts/rkwarddev_rk.download_appimage_plugin_script.R b/rkward/plugins/rkwarddev_scripts/rkwarddev_rk.download_appimage_plugin_script.R
index 617d0f6f4..5a611f978 100644
--- a/rkward/plugins/rkwarddev_scripts/rkwarddev_rk.download_appimage_plugin_script.R
+++ b/rkward/plugins/rkwarddev_scripts/rkwarddev_rk.download_appimage_plugin_script.R
@@ -196,13 +196,14 @@ pluginDialog <- rk.XML.dialog(
 aiu_logic <- rk.XML.logic(
   rk.comment(
     id("
-      doRCommand('Sys.getenv(\"APPIMAGE\")', \"commandFinished\");
-            commandFinished = function (result, id) {
-              if (result != \"\") {
-                gui.setValue(\"", aiu_file, ".selection\", result);
-                return;
-              }
+          new RCommand('Sys.getenv(\"APPIMAGE\")').then(result => {
+            if (result != \"\") {
+              gui.setValue(\"", aiu_file, ".selection\", result);
+              return;
             }
+          }).catch(err => {
+            // no error handling
+          });
     ", js=FALSE)
   ),
   aiu_gov_branch_stable <- rk.XML.convert(sources=list(string=aiu_branch), mode=c(equals="stable"), id.name="aiu_lgc_branch_stable"),



More information about the rkward-tracker mailing list