Command line parameters when executing a PND?

Discussion in 'Support Area' started by Lanboy, Jul 29, 2019.

  1. Lanboy

    Lanboy Still Fresh

    Joined:
    Nov 22, 2009
    Messages:
    5
    I'd like to be able to supply command line parameters when running a PND like Darkplaces, just not sure how to do it. If there is a document on the subject I'd appreciate it if you could point me in the right direction. Thanks.
     
    Tags:
  2. xnopasaranx

    xnopasaranx Superbad!

    Joined:
    Jan 31, 2006
    Messages:
    3,328
    I am not sure how exactly, but I am sure it's possible. There is a script that starts pnds called pnd_run which probably passes through arguments if the pnd is set up properly, so maybe have a Iook at that. tried looking it up on the wiki, but couldn't find it, sorry.

    Edit: never mind i found it, have a look here:
    https://github.com/skeezix/libpnd-clone/blob/master/testdata/scripts/pnd_run.sh

    If you scroll through the script you will find the usage section which explains how to pass arguments and everything else:

    One more thing: I took basically the first repo I could find, so I don't know how old that script is. Please don't install it on your pandora, the one that comes with the firmware does the same thing, but might contain fixes the other one does not.
     
    Last edited: Jul 29, 2019
    FBnil likes this.
  3. Elw3

    Elw3 ƐʍlƎ

    Joined:
    Jul 21, 2013
    Messages:
    951
    What EXACTLY are you trying?
    Passing parameters to stuff inside a pnd will most likely not work since many run by using a startup script that would simply throw these commands away.
    Unpacking the pnd and then just write your arguments to that startup script may be what you want.
     
  4. Lanboy

    Lanboy Still Fresh

    Joined:
    Nov 22, 2009
    Messages:
    5
    Thanks for the help guys. I did some digging before asking but couldn't find any relevant information.

    I'm trying to run Quake (Darkplaces and GL Quake ES) and load maps and mods that require additional resources, which require you to pass parameters on the command line. Even just running a map that uses Quoth requires command line options.
     
  5. Elw3

    Elw3 ƐʍlƎ

    Joined:
    Jul 21, 2013
    Messages:
    951
    Yea just unpack it, using "unsquashfs file.pnd", and adjust the startup by hand.
    it should not make a difference if its a folder or a pnd so you can just shove that on the SD card.
     
    xnopasaranx likes this.
  6. Lanboy

    Lanboy Still Fresh

    Joined:
    Nov 22, 2009
    Messages:
    5
    I'll give that a shot. I guess I'll need different .pnd files for specific options.

    Can I assume that I just use squashfs to re-create the pnd?

    Thanks for the help, I appreciate it.
     
  7. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    11,086
    Location:
    Somewhere off the coast of the EU
    I'm not sure why you cut off lines 150 and 151 which are an addendum to the usage which seems to be relevant here:
    That seems to be what the OP is asking about to me. I take your warning that this doesn't seem to be live code, but I doubt that facility was explicitly excluded from the latest code.

    Edit: Of course, it's possible if not likely that actually the first run thing is a script which doesn't parse any arguments, so arguments that make it through pnd_run wouldn't actually go any further. If you examine and modify the run script you wouldn't need to repack it necessarily for testing at least; you could put it in your appdata for the pnd, and that will replace the copy inside the pnd before running. If you want various different options here though, you'll need to repack the pnd as part of any solution though I think.

    Making a PND is not a simple matter of running squashfs as far as I recall, there's also a separate copy of the PXML appended to the end. There should me a helper script called makepnd around somewhere, possibly in usr/pandora/scripts, but you might have success just appending the PXML to the end.
     
    Last edited: Jul 29, 2019
    xnopasaranx likes this.
  8. xnopasaranx

    xnopasaranx Superbad!

    Joined:
    Jan 31, 2006
    Messages:
    3,328
    Yeah I didn't mean to cut off those lines but I posted this from my cellphone and it was super hard to copy and paste on the touch screen.
     
    levi likes this.

Share This Page

Loading...