This is driving me absolutely crazy! Can someone help me with this please?
I'm trying to use the example scripts from TelcoLou's post above. I downloaded Programmer's Notepad 2, went to Tools>Options>Defaults and set the default line endings to "Unix (LF)". To be doubly sure I also ticked Tools>Line Endings>Unix (LF).
Then created new file, copied and pasted this script into it:
TelcoLou posted on May 10 2006 at 06:48 PM said:
Here's one to launch a .gpe located in the root:
Code:
#!/bin/sh
/mnt/sd/APPorGAME.gpe
sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
...modified so the line "/mnt/sd/APPorGAME.gpe" now reads "/mnt/sd/calculator.gpe", pointing to calculator.gpe which is sitting on the root of my SD card. I save this script as "calc.gpe" to the root of my SD, pop the card into the GP2X, turn on and run. This works perfectly - launches calculator for me.
Then, I re-opened calc.gpe in Programmers Notepad 2 and changed it to read:
Code:
#!/bin/sh
/mnt/sd/Data/calculator.gpe
sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
So it now points to SD/Data/calculator.gpe (Not sure if it's relevant, but I created the folder "Data" and moved calculator.gpe into it using Windows XP).
As before, I check that the line endings are still set to Unix (LF) and save the file as calc.gpe to the SD root. Now, when I run the script the screen goes black for <1 second before exiting to the main menu.
In the same way, I also tried:
Code:
#!/bin/sh
/mnt/sd/Data/
./calculator.gpe
sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
with exactly the same result. Calculator runs normally when I navigate to it using the GP2X's Game menu, so it's definately a problem with the scripts rather than the program itself.
Any ideas? I don't understand why I can launch a program from sd/ but not from sd/data/
Thanks,
Melville