Using plasmapkg to install the tiger plasmoid
Richard Dale
richard.j.dale at gmail.com
Thu Jun 26 12:36:39 CEST 2008
I've been trying out plasmpkg with installing the tiger javascript plasmoid
in the playground, and there were some things that needed fixing before I
got it working.
In the plasmapkg code I needed to uncomment the constructor for the
KApplication, and also remove code that was assuming that only the list
option would have no args:
Index: main.cpp
===================================================================
--- main.cpp (revision 823864)
+++ main.cpp (working copy)
@@ -73,14 +73,14 @@
options.add("packageroot <path>", ki18n("Absolute path to the package
root. If not supplied, then the standard data directories for this KDE
session will be searched instead."));
KCmdLineArgs::addCmdLineOptions( options );
- //KApplication app;
+ KApplication app;
//QCoreApplication app;
//TODOs:
// implement list
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- if (args->count() == 0 || args->isSet("list")) {
+ if (args->isSet("list")) {
listPackages();
} else {
// install and remove
Then I could run the command:
$ plasmapkg --install /tmp/tiger --type plasmoid
In package.cpp, the code that actually installs the package as a complete
directory was calling KIO::file_copy() for a sinIgle file, and not
KIO::copy() for a directory copy. I also added errorString() calls for the
error messages when something like this went wrong. I'm not a KIO expert and
possibly copy() is still the wrong call.
Then I got a crash with the code to look up the Icon from the KConfigGroup,
and I haven't been able to track down what's causing that yet:
QFile icon(packageRoot + cg.readEntry("Icon"));
if (icon.exists()) {
...
Once I commented that out, a
.kde4/share/kde4/services/plasmapkg_plasma_applet_tiger.desktop was
installed and the plasmoidviewer found the plasmoid and started it. I didn't
have the svg installed that it was expecting, and so it didn't actually work
but obviously that doesn't really matter.
-- Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/panel-devel/attachments/20080626/802ea4b2/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: package_install_tiger.patch
Type: text/x-patch
Size: 2025 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080626/802ea4b2/attachment.bin
More information about the Panel-devel
mailing list