• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

questions about runcommand.sh

Scheduled Pinned Locked Moved Ideas and Development
runcommand
32 Posts 5 Posters 15.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    caver01 @BuZz
    last edited by 4 Aug 2016, 18:13

    @BuZz Makes sense. There is a better way obtain the chosen ROM and Emulator then? I'd certainly rather work within the overall vision than branch off on my own, especially if it's something others might be able use.

    My 4-player cocktail style cabinet built as a custom "roadcase"

    1 Reply Last reply Reply Quote 0
    • C
      caver01 @edmaul69
      last edited by 4 Aug 2016, 18:14

      @edmaul69 said in A question about runcommand.sh:

      @caver01 the newest version of linapple does let you configure which controller, buttons and axis. If you download the newest one you need to copy the linapple.conf from the /opt/retropie/emulators/linapple/ to the /opt/retropie/configs/apple2 folder overwriting the old config

      I want to pick this up on another thread. This sounds promising!

      My 4-player cocktail style cabinet built as a custom "roadcase"

      1 Reply Last reply Reply Quote 0
      • B
        BuZz administrators
        last edited by BuZz 8 Apr 2016, 19:20 4 Aug 2016, 18:18

        There is - processing order needs to change - I will implement it.

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        1 Reply Last reply Reply Quote 0
        • B
          BuZz administrators
          last edited by BuZz 8 Apr 2016, 19:25 4 Aug 2016, 18:23

          the PR didn't actually work btw - it would try and launch a script with the parameters as the name of the script. You would need to do bash "$configdir/all/runcommand-onstart.sh" "$@" not bash "$configdir/all/runcommand-onstart.sh $@"

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 1
          • B
            BuZz administrators
            last edited by 4 Aug 2016, 19:04

            implemented in https://github.com/RetroPie/RetroPie-Setup/commit/0c39c7438b7986997313e74707e9873e820bbfa1

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            M 1 Reply Last reply 4 Aug 2016, 19:20 Reply Quote 2
            • M
              meleu @BuZz
              last edited by 4 Aug 2016, 19:20

              @BuZz Really cool man! Thanks!

              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              1 Reply Last reply Reply Quote 0
              • M
                meleu
                last edited by 10 Aug 2016, 19:05

                Another runcommand question:

                Why runcommand.log went to /dev/shm?

                • Useful topics
                • joystick-selection tool
                • rpie-art tool
                • achievements I made
                1 Reply Last reply Reply Quote 0
                • B
                  BuZz administrators
                  last edited by 10 Aug 2016, 19:19

                  ram based.

                  To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                  M 1 Reply Last reply 10 Aug 2016, 21:09 Reply Quote 0
                  • M
                    meleu @BuZz
                    last edited by 10 Aug 2016, 21:09

                    @BuZz
                    one more question...

                    Premise: thinking in RetroArch only.

                    I'm using runcommand-onstart.sh to change a system specific's retroarch.cfg before launching the game. Is the $system passed to runcommand-onstart.sh a valid configdir?

                    In other words, can I use /opt/retropie/configs/$system/retroarch.cfg?

                    I'm doing this way and it's working fine for the classic consoles (atari2600, nes, snes, megadrive, etc...). But I'm worried if this will work for any libretro emulator.

                    • Useful topics
                    • joystick-selection tool
                    • rpie-art tool
                    • achievements I made
                    B 1 Reply Last reply 10 Aug 2016, 21:13 Reply Quote 0
                    • B
                      BuZz administrators @meleu
                      last edited by 10 Aug 2016, 21:13

                      @meleu yes.

                      https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/supplementary/runcommand/runcommand.sh#L119-L123

                      To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                      M 1 Reply Last reply 11 Aug 2016, 12:30 Reply Quote 1
                      • M
                        meleu @BuZz
                        last edited by meleu 8 Nov 2016, 13:39 11 Aug 2016, 12:30

                        @BuZz
                        (* sigh * here I go bother you again...)

                        would you mind to export the log variable in runcommand.sh?

                        reason:
                        make it accessible in runcommand-on{start,end}.sh.

                        use case:
                        Since users can execute custom commands in runcommand-on{start,end}.sh some bugs can be inserted.
                        It would be a good practice for those who want to write something in these scripts, to log some info for bug tracking.
                        Another benefit: It helps us to help inexperienced users with problems because of third-party on{start,end} scripts.

                        • Useful topics
                        • joystick-selection tool
                        • rpie-art tool
                        • achievements I made
                        1 Reply Last reply Reply Quote 0
                        • B
                          BuZz administrators
                          last edited by BuZz 8 Nov 2016, 14:03 11 Aug 2016, 12:59

                          Just write your own log or use the same filename. Actually, I will redirect stderr to the log, so errors will get logged automatically.

                          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                          M 2 Replies Last reply 11 Aug 2016, 14:40 Reply Quote 1
                          • M
                            meleu @BuZz
                            last edited by 11 Aug 2016, 14:40

                            @BuZz
                            Oh! You did it!
                            I'll redirect log messages to stderr. Thanks again!

                            • Useful topics
                            • joystick-selection tool
                            • rpie-art tool
                            • achievements I made
                            1 Reply Last reply Reply Quote 0
                            • M
                              meleu @BuZz
                              last edited by meleu 21 Aug 2016, 02:11

                              @BuZz
                              Don't you think that would be useful to register the start/end of the runcommand-on{start,end}.sh?

                              The goal is to facilitate problem diagnosis in runcommand.log. Example: If some user has problems on launching a game because of a bad runcommand-onstart.sh and don't know it, he can paste his runcommand.log and this info would help the diagnose.

                              I was thinking in something like this:

                              # calls script with parameters system, emulator, rom, and commandline
                              function user_script() {
                                  local script="$configdir/all/$1"
                                  if [[ -f "$script" ]]; then
                                      echo "--- start of \"$script\" ---" >> "$log"
                                      bash "$script" "$system" "$emulator" "$rom" "$command" </dev/tty 2>>"$log"
                                      echo "--- end of \"$script\" ---" >> "$log"
                                  fi
                              }
                              

                              [EDIT: I know we can register this info using the script itself, but not everyone follows this good practice.]

                              • Useful topics
                              • joystick-selection tool
                              • rpie-art tool
                              • achievements I made
                              B 1 Reply Last reply 21 Aug 2016, 08:20 Reply Quote 0
                              • B
                                BuZz administrators @meleu
                                last edited by BuZz 21 Aug 2016, 08:20

                                @meleu I don't. Runcommand will continue even if there is an error. Please try to not constantly send me questions and requests.

                                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                1 Reply Last reply Reply Quote 1
                                • First post
                                  Last post

                                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.

                                  [[user:consent.lead]]
                                  [[user:consent.not_received]]