Beta Beta: Brave Souls Come Help Test Appdata In Same Place As .pnd


skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,063
Website
www.codejedi.com
The approach below is a total PITA to use, so really, everyone, just don't look at it; I'm hoping 2 or 3 people who are not Terminal-shy will say if this is the sort of thing they're looking for or not, and if so, we can make a real fix out of it. Most people, just stay away :) I'm way too busy to make a real fix right now :(

For background, see this other thread:
http://www.gp32x.de...29&#entry870929

This is a quick hack; it might not work, and it might crash the Earth into the sun. As I only want a few peopel to test this, I'm not providing a pnd-file, but Terminal instructions on how to set it up.

If its successful, I can make a pnd-file that will turn this option on or off, but for now, lets just see if it works and if people like it at all ;)

--

Goal:

Instead of putting an appdata named "snesemu" into /pandora/appdata/, you want it to go into /pandora/menu/snes since thats wehre you have snes.pnd in this example. ie: /pandora/menu/snes/snes.pnd and /pandora/menu/snes/snesemu for the appdata.

ie: You can already put pnd files in subdirectories of /pandora/menu and /pandora/desktop for organization sake, but the appdata will still go to /pandora/appdata/<APPNAME>; with this mode, the appdata will go to the same location as the pnd file.

NOTE:

For this hack, I don't want to update 'sudoers' file since its a little risky to muck around with, so this mod will create /pandora/menu/snes/pandora/appdata/snesemu for the appdata dir -- it'll be in the right place, but still have /pandora/appdata; if this works at all, we can clean that up buyt I'm in a super mega hurry, and telling you guys to edit sudoers is a Bad Idea :)

--

NOTE: crap, it needs sudo to run anyway; well, after doing this mod, do 'sudo bash' or something in the Terminal, so that it has the password cached; then you can run a couple pnd files until the timer runs out, then you have to sudo again. Ah wel, sucks :)
So, try the mod, see if its doing whaty you want 'more or less', and then go back to the original pnd_run.sh as noted below. If you like more or less what its doing, I'll make a pnd-file that does it for real, and fixes sudoers up.


Grab this file:
http://www.codejedi...._run_inplace.sh

Stick it onto your SD card in the root.

(Originally you could run this from SD, but people worried about security a lot, so I had to make it so it could only run from NAND instead of also from SD, so we'll have to do some tricks to move it to NAND.)

1) Stick SD into SD1 (left) on the pandora and fresh boot. Bring up the Terminal (using Select menu in minimenu, or use the popup menu of apps in XFCE.)
2) enter this into the terminal:
sudo cp /usr/pandora/scripts/pnd_run.sh /usr/pandora/scripts/pnd_run.sh.bak
3) sudo cp /media/mmcblk0p1/pnd_run_inplace.sh /usr/pandora/scripts/pnd_run.sh
-> when asked, enter your password (To let us copy the file into NAND.)

If things all blow up, you can restore by opening Terminal and doing:
sudo cp /usr/pandora/scripts/pnd_run.sh.bak /usr/pandora/scripts/pnd_run.sh

Should be installed now; possibly, if nothing works anymore, you may need to bring up terminal and enter "sudo chmod ugo+rx /usr/pandora/scripts/pnd_run.sh" to set permissions, but in theory should be fine.

--

After setting up this hacked pnd_run.sh, move all your pnd files into logical directory clumps..

create directory: /pandora/menu/emus
/pandora/menu/emus/hatari.pnd
/pandora/menu/emus/stella.pnd

create directory: /pandora/menu/games
...etc

Move your pnd files into your directories.

Run them :)

Running hatari should now create /pandora/menu/emus/hatari for the appdata, instead of /pandora/appdata/hatari (Well, actually, for this mod it will create /pandora/menu/emus/pandora/appdata/hatari, but thats just until we prove it all works, at which point I'll make a pnd-file to do it properly.)

--

Let me know if it works for you, or if the earth crashed into the sun.

Edit; if your curious, I just did a quick hack so that instead of pnd_run.sh hardcoding /pandora/appdata/$BASENAME, it uses $PND/pandora/appdata/$BASENAME instead. Sorry, its all I have time for today :)
 
Last edited by a moderator:
Given my free time is about to be nuked for the next month, I probably don't have time to do real justice to this.

So if you want to fiddloe with the above and see that it 'more or less' works, its not hard to turn it into a pnd-file.

I'm gong to see if anyone wants to take up a delegate task :)

1) Given the above modified pnd_run_inplace.sh, its easy to change the APPDATAPATH line to not have the embedded ..../pandora/appdata/.... bi in the middle; bam, path is fixed.
2) modify /etc/sudoers.d/99_libpnd to have the correct bits in it so the replacement pnd_run.sh will not need a password
3) make a pnd-file that backs up existing sudoers and pnd_run.sh, and sets up the new one; or reverses it. Use a zenity script. <- this is trivial, I can do this for ya

So someone take it upon themselves to sort out (2), and optionally, all (1)->(3).

Its as easy as can be, just I'm pulled in a lot of directions and about to have no free time for a month :)

jeff
 
Nice work so far from what it looks like.

Too many linuxy things here for me to try but thanks for the effort so far :)
 
PRobably something I will set up for oyu when I figure out how much free time I have; send me a PM in a week, okay? OR bug me till I do it for you :)

Its pretty easy change really,

jeff
 
Back
Top