Making Desktop Shortcuts (Launcher) That Disappear on SD Removal


rError

Member
Joined
Dec 30, 2012
Messages
86
Location
Canada
I know how to make a launcher pointing to something, but the launcher always stays there regardless whether the SD card is inserted or not.

How do I make a launcher that shows when the SD is inserted and disappear when the SD is taken out? Just like a PND in /pandora/desktop or /pandora/apps

That's the gist of it. Thanks guys!  :)

Heres my situation:

I wanted to play Wolfenstein 3D. Grabbed PND from here but Picklelauncher never wanted to work properly. I unpacked the PND in it's appdata folder and was able to play by launching the executable directly. I then went to create a desktop shortcut pointing to the executable but terminal would always pop up saying there were files missing (exe was looking for game files in the same location as the launcher). So I created an .sh file in the /appdata/wolf4sdl folder containing:


cd /media/SD/pandora/appdata/wolf4sdl/base/
./wolf3d
and then pointed the launcher to the .sh file. Launcher on desktop works perfectly now but is always there. So when I remove or switch the SD card, the launcher gives errors if selected by accident. How do I make the launcher icon disappear when I remove the SD card containing wolf4sdl? Is there a simple workaround, like making the Launcher in /pandora/apps instead of /pandora/desktop?
 
Last edited by a moderator:
You don't need to actually make a PND.   Instead of putting it in appdata, put it in a folder inside pandora/apps or pandora/desktop and include a PXML file that points to the right script.   The PND daemon will see it as a PND and create a shortcut for it when the SD card is inserted.

- Neelix
 
Worked perfectly. Thank you Neelix!

Moved game folder from appdata to /pandora/apps. Created PXML file using samples from the wiki.

Code:
<PXML xmlns="[url=http://openpandora.org/namespaces/PXML]http://openpandora.org/namespaces/PXML[/url]">
<package id="Wolf3D">
<version major="1" minor="0" release="0" build="0" type="release"/>
<author name="ID Software" website="www.idsoftware.com"/>
<titles>
<title lang="en_US">Wolfenstein 3D</title>
</titles>
<descriptions>
<description lang="en_US">Take control of William "B.J." Blazkowicz and kill some Nazis!</description>
</descriptions>
<icon src="wolf3dicon3.png"/>
</package>
<application id="Wolf3D">
<exec command="wolf3d.sh"/>
<version major="1" minor="0" release="0" build="0" type="release"/>
<osversion major="1" minor="0" release="0" build="0"/>
<author name="ID Software" website="www.idsoftware.com"/>
<titles>
<title lang="en_US">Wolfenstein 3D</title>
</titles>
<title lang="en_US">Wolfenstein 3D</title>
<descriptions>
<description lang="en_US">Take control of William "B.J." Blazkowicz and kill some Nazis!</description>
</descriptions>
<description lang="en_US">Take control of William "B.J." Blazkowicz and kill some Nazis!</description>
<icon src="wolf3dicon3.png"/>
<categories>
<category name="Game">
<subcategory name="ActionGame"/>
</category>
<category name="Game">
<subcategory name="ActionGame"/>
</category>
</categories>
</application>
</PXML>
 
Last edited by a moderator:
I wanted to play Wolfenstein 3D. Grabbed PND from here but Picklelauncher never wanted to work properly.
I was also having problems with this at first. I think it started to work after I renamed the data files so that the file names were in lower case.
 
Back
Top