I&#39;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.<br><br>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:<br>
<br>Index: main.cpp<br>===================================================================<br>--- main.cpp&nbsp;&nbsp;&nbsp; (revision 823864)<br>+++ main.cpp&nbsp;&nbsp;&nbsp; (working copy)<br>@@ -73,14 +73,14 @@<br>&nbsp;&nbsp;&nbsp;&nbsp; options.add(&quot;packageroot &lt;path&gt;&quot;, ki18n(&quot;Absolute path to the package root. If not supplied, then the standard data directories for this KDE session will be searched instead.&quot;));<br>
&nbsp;&nbsp;&nbsp;&nbsp; KCmdLineArgs::addCmdLineOptions( options );<br><br>-&nbsp;&nbsp;&nbsp; //KApplication app;<br>+&nbsp;&nbsp;&nbsp; KApplication app;<br>&nbsp;&nbsp;&nbsp;&nbsp; //QCoreApplication app;<br><br>&nbsp;&nbsp;&nbsp;&nbsp; //TODOs:<br>&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp; implement list<br><br>&nbsp;&nbsp;&nbsp;&nbsp; KCmdLineArgs *args = KCmdLineArgs::parsedArgs();<br>
-&nbsp;&nbsp;&nbsp; if (args-&gt;count() == 0 || args-&gt;isSet(&quot;list&quot;)) {<br>+&nbsp;&nbsp;&nbsp; if (args-&gt;isSet(&quot;list&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listPackages();<br>&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // install and remove<br><br>Then I could run the command:<br>
<br>$ plasmapkg --install /tmp/tiger --type plasmoid<br><br>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&#39;m not a KIO expert and possibly copy() is still the wrong call.<br>
<br>Then I got a crash with the code to look up the Icon from the KConfigGroup, and I haven&#39;t been able to track down what&#39;s causing that yet:<br><br>&nbsp;&nbsp;&nbsp; QFile icon(packageRoot + cg.readEntry(&quot;Icon&quot;));<br>
&nbsp;&nbsp;&nbsp; if (icon.exists()) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br><br>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&#39;t have the svg installed that it was expecting, and so it didn&#39;t actually work but obviously that doesn&#39;t really matter. <br>
<br>-- Richard<br><br>