<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 30, 2022 at 4:11 PM Dave Woodfall <<a href="mailto:dave@slackbuilds.org">dave@slackbuilds.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 30/04/22 15:23,<br>
Konrad J Hambrick <<a href="mailto:kjhambrick@gmail.com" target="_blank">kjhambrick@gmail.com</a>> put forth the proposition:<br>
> All --<br>
> Been playing with the OTB.SlackBuild and OTB Version 8.0.0<br>
> I am getting clean builds and the program works as expected.<br>
> `sbolint` returns no errors or warnings, but when I run<br>
> sbopkglint /tmp/OTB-8.0.0-x86_64-1_SBo.tgz I get a hint:<br>
> Running test: 35-desktop...usr/share/applications/monteverdi.desktop: hint:<br>
> value "Education;Science;ImageProcessing;Geography;Qt;" for key<br>
> "Categories" in group "Desktop Entry" contains more than one main category;<br>
> application might appear more than once in the application menu<br>
> OK<br>
> Otherwise, all tests are OK<br>
> Note that sbopkglint returns the same hint on the  OTB Version 7.3.0<br>
> Package file.<br>
> There is a doinst.sh script that I took from the Version 7.3 SlackBuild (<br>
> below by sig )<br>
> What is the proper way to set up a Desktop App in an SBo ?<br>
> Thanks.<br>
<br>
You need to decide which menu category the application should be in,<br>
then edit the .desktop to match.<br>
<br>
> value "Education;Science;ImageProcessing;Geography;Qt;"<br>
<br>
>From the description, I'd say ImageProcessing.<br>
<br>
OTB.desktop file is installed by the application so the usual way is<br>
to sed the file somewhere after the make install.<br>
<br>
--<br>
Dave<br></blockquote><div><span class="gmail_default" style="font-family:monospace,monospace">Well now ... </span></div><div><span class="gmail_default" style="font-family:monospace,monospace"><br></span></div><div><span class="gmail_default" style="font-family:monospace,monospace">There's a lot to know before a .desktop file will pass</span> <span class="gmail_default" style="font-family:monospace,monospace">`/usr/bin/desktop-file-validate`</span></div><div><div class="gmail_default" style="font-family:monospace,monospace"></div><div class="gmail_default" style="font-family:monospace,monospace">I ended up spending more time than I had to spend here:</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">   <a href="https://www.freedesktop.org/wiki/Specifications/menu-spec/">https://www.freedesktop.org/wiki/Specifications/menu-spec/</a><br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">and the specific info about Desktop Categories is here:</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">   <a href="https://specifications.freedesktop.org/menu-spec/latest/apa.html">https://specifications.freedesktop.org/menu-spec/latest/apa.html</a><br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><div><div class="gmail_default" style="font-family:monospace,monospace">I ended up with the if-block below my sig ...</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Note that the monteverdi app ends up all by itself under the 'Science and Math' </div><div class="gmail_default" style="font-family:monospace,monospace">Desktop Menu Category.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">But now the package passes sbopkglint without Errors, Warnings or Hints.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Thanks for the feedback Dave and B. Watson !</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Question:  is there a better way ( or a recommended way ) to enter long, formatted </div><div class="gmail_default" style="font-family:monospace,monospace">lists of text like NEW_CAT in the code snippet below ?</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Note that many other SBo Packages also fail `desktop-file-validate` so maybe this was </div><div class="gmail_default" style="font-family:monospace,monospace">all a fools-errand :)</div><div><br></div><div><div class="gmail_default" style="font-family:monospace,monospace"></div></div><div class="gmail_default" style="font-family:monospace,monospace">-- kjh</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace"># ------------------- cut  here -----------------</div><div class="gmail_default" style="font-family:monospace,monospace"># default Categories=Education;Science;ImageProcessing;Geography;Qt;<br># in build/monteverdi.desktop annoys sbopkglint try this instead ...<br># see: <a href="https://specifications.freedesktop.org/menu-spec/latest/apa.html">https://specifications.freedesktop.org/menu-spec/latest/apa.html</a><br><br>if [ "$MONTEVERDI" = "ON" ] ; then<br>   NEW_CAT="Science;Math;ImageProcessing;DataVisualization"<br>   NEW_CAT="$NEW_CAT;Geoscience;NumericalAnalysis;Qt;"<br><br>   sed -i -e "s/^Categories=.*$/Categories=$NEW_CAT/" \<br>   $PKG/usr/share/applications/monteverdi.desktop<br>fi<br></div><div class="gmail_default" style="font-family:monospace,monospace"># ------------------- cut there -----------------</div><br class="gmail-Apple-interchange-newline"><div class="gmail_default" style="font-family:monospace,monospace"></div><br></div></div></div>