Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Trying to make script module for my application please help


  • Global Moderator

    @ziggurat said in Trying to make script module for my application please help:

    You see my configure section I need to run addPort to make sure the Ports folder is made and available in emulation station. But my script is incompatible with the runcommand.sh Maybe it is very rude of me to ping @BuZz if so my sincere apologies.

    You'll probably be hearing from him when you'll submit the PR :).

    I can take a look over your module script - do you have a source for the main script ? The Github repo you listed is not available.

    One thought that pops to mind - since you don't actually run any games, maybe it's ok to not have it appear as a game - so you don't need runcommand to work - and just expose your GUI by implementing gui_piegalaxy (which will run your main script). Similar to how the scrapers included in RetroPie are doing.


  • Global Moderator

    @ziggurat One trick to make sure that the output/input is not 'swalled' when running your script through RetroPie-Setup is to use see >/dev/tty </dev/tty after the command, see here how alsamixer is run.



  • @mitu said in Trying to make script module for my application please help:

    I can take a look over your module script - do you have a source for the main script ? The Github repo you listed is not available.

    Yes I have the source, I can give you access. I intend to make it public as soon as I can get this packaging to work properly. There is also a partial blocker for release that it requires you to log into the GOG account via SSH at the time of writing. What is your github account?

    Also please look at the main script at this commit https://github.com/sigboe/pie-galaxy/blob/679e80c51fb8f422143ba824fd3dbabc065ed4b4/pie-galaxy.sh
    Because I need to roll back the following commit, where I tried to fix this but made it worse.

    One thought that pops to mind - since you don't actually run any games, maybe it's ok to not have it appear as a game - so you don't need runcommand to work - and just expose your GUI by implementing gui_piegalaxy (which will run your main script). Similar to how the scrapers included in RetroPie are doing.

    Yeah, I could put it in the path, but then I would rather but my script dir in the path because I find the downloaded binaries by doing this scriptdir="$(dirname "$(readlink -f "${0}")")"


  • Global Moderator

    @ziggurat said in Trying to make script module for my application please help:

    Yes I have the source, I can give you access. I intend to make it public as soon as I can get this packaging to work properly. There is also a partial blocker for release that it requires you to log into the GOG account via SSH at the time of writing. What is your github account?

    I prefer for you to release it publicly for review, so others may chime in. When you're confortable with the functionality and you feel it's ready, submit the PR or post in this topic.

    Unfortunately I don't think I have a GoG account :(.

    Yeah, I could put it in the path, but then I would rather but my script dir in the path because I find the downloaded binaries by doing this scriptdir="$(dirname "$(readlink -f "${0}")")"

    If you use the standard RetroPie installation conventions, your binaries will be copied to the $md_inst dir (expanded as /opt/retropie/ports/piegalaxy automatically), so you can safely assume you can find them there.



  • @mitu when I get home I will experiment with using >$(tty) <$(tty)

    You can register for a free GOG account and "purchase" a few free game.
    I support DOSBox and ScummVM games, which there are a number of free games for.

    I also support automatically Teenagent (Free) will install as a ScummVM even though it ships with DOSBox on GOG.

    There are more free games like Akalabeth, and other Ultima games,
    Beneath a Steel Sky, Jill of the Jungle, lure of the temptress, shadow warrior, tyrian, flight of the amazon queen.

    All these will install with my program.

    Notably, Doom is now on sale like $2 (i dont know, I have another currency), and it ships with DOSBox, but my script will install the WAD as a port. :)

    I am working on supporting more native games, maybe I will get X server games working, similar to how steamlink works, then maybe Heroes 3, Jedi Outcast, Jedi Academy and Morrowind might be possible. Also I am furiously reading up on trying to get NEO-GEO games and Amiga games working, but I haven't gotten that working.


  • Global Moderator

    @ziggurat said in Trying to make script module for my application please help:

    Notably, Doom is now on sale like $2 (i dont know, I have another currency), and it ships with DOSBox, but my script will install the WAD as a port. :)

    I already have DOOM :). It's possible I already have an account, just not using it actively.



  • @ziggurat I'm interested in this project :) I have a GoG account and I'll be happy to test the script when you release it to the public.



  • @hiulit I am very much looking forward to public, first I need to wrestle with a few more bugs that only really are there when using the run command. Which takes time due to me wrestling with a cold.

    @mitu The >$(tty) <$(tty) did work to get all the ncurses based menus on the screen, but there are more stdin/stdout issues, I think the runcommand is designed to steal them for them selves because all the other programs that the runcommand use just use stdin/out/err for logging and errors, I use them for example, taking output of commands into variables, and that seams to break.

    When I get it working using the runcommand, it seams to also work without the runcommand, but just in case, I will write in a way to only use the fixes while running retropie. What are the proper way to detect retropie? cat /etc/*releasejust shows raspbian, maybe it is better to try to detect being launched by the runcommand instead.


  • Global Moderator

    @ziggurat I would then recommend to not use runcommand at the moment and design your script to work for now without considering the runcommand interference.
    For the other question - RetroPie is not an OS, it can be installed on Ubuntu/Debian/etc. on PC, so don't rely on OS versions. I think it's better to detect if you're starting from runcommand if you want to check if you're on a RetroPie system.



  • @mitu I got it working with the runcommand now. Only a small visual issue (no progress bar while downloading a game).

    But I found a bug in downloadAndExtract, and I opened a pull request :D
    https://github.com/RetroPie/RetroPie-Setup/pull/2628



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.