SheffeyG / CheatDeck

Launch games with cheat or trainer and manage launch options for steamdeck
GNU General Public License v3.0
56 stars 6 forks source link

Feature request: Pass argument to Executable #24

Closed ACiDxCHRiST closed 5 months ago

ACiDxCHRiST commented 5 months ago

I would like to start Cheat Engine.exe and load the cheat table so I need the command to be "path/to/Cheat\ Engine.exe cheat_table.ct"

Can you add an option below where you select the EXE to pass arguments.

eXhumer commented 5 months ago

It should be possible by modifying the PROTON_REMOTE_DEBUG_CMD environment variable. Add an unescaped space` instead of\ and pass the argument for the executable after it. If the argument has spaces in it, make sure to escape it with\ instead of `.

In your case, suppose the PROTON_REMOTE_DEBUG_CMD="path/to/Cheat\ Engine.exe" is set currently, you will need to modify it to PROTON_REMOTE_DEBUG_CMD="path/to/Cheat\ Engine.exe cheat_table.ct" or if the path to cheat_table.ct contains spaces PROTON_REMOTE_DEBUG_CMD="path/to/Cheat\ Engine.exe path/with\ spaces/to/cheat_table.ct".

eXhumer commented 5 months ago

Proton uses python's shlex.split to parse the remote debug command out of the environment variable.

SheffeyG commented 5 months ago

Also the host disk would be mounted as z:\home\deck\... in the proton container. you can try PROTON_REMOTE_DEBUG_CMD="path/to/Cheat\ Engine.exe\ z:\\home\\deck\\path\\to\\cheat_table.ct" if that home\deck\... path dosen't work. referance here

ACiDxCHRiST commented 5 months ago

Thanks, I edited the launch option from: PROTON_REMOTE_DEBUG_CMD="/home/deck/Cheat\ Engine\ 7.5/Cheat\ Engine.exe" ...

to: PROTON_REMOTE_DEBUG_CMD="/home/deck/Cheat\ Engine\ 7.5/Cheat\ Engine.exe cheat_table.ct" ...

It works as desired since the table is in the same folder.