Skip to content

Commit ccbaa86

Browse files
Fix Citron command line arguments handling (#1464)
* Eden * Fix Citron command line arguments handling --------- Co-authored-by: Dragoon Dorise <rodrigosedano@me.com>
1 parent d5f9165 commit ccbaa86

File tree

9 files changed

+57
-69
lines changed

9 files changed

+57
-69
lines changed

configs/steam-rom-manager/userData/parsers/optional/nintendo_gb_mgba.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"steamCategories": [
77
"Nintendo Game Boy - mGBA (Standalone)"
88
],
9-
"executableArgs": "-f \"'${filePath}'\"",
9+
"executableArgs": "-f \"${filePath}\"",
1010
"executableModifier": "\"${exePath}\"",
1111
"startInDirectory": "",
1212
"titleModifier": "${fuzzyTitle}",

configs/steam-rom-manager/userData/parsers/optional/nintendo_gba_mgba.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"steamCategories": [
77
"Nintendo Game Boy Advance - mGBA (Standalone)"
88
],
9-
"executableArgs": "-f \"'${filePath}'\"",
9+
"executableArgs": "-f \"${filePath}\"",
1010
"executableModifier": "\"${exePath}\"",
1111
"startInDirectory": "",
1212
"titleModifier": "${fuzzyTitle}",

configs/steam-rom-manager/userData/parsers/optional/nintendo_gbc_mgba.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"steamCategories": [
77
"Nintendo Game Boy Color - mGBA (Standalone)"
88
],
9-
"executableArgs": "-f \"'${filePath}'\"",
9+
"executableArgs": "-f \"${filePath}\"",
1010
"executableModifier": "\"${exePath}\"",
1111
"startInDirectory": "",
1212
"titleModifier": "${fuzzyTitle}",

configs/steam-rom-manager/userData/parsers/optional/nintendo_switch_citron.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"configTitle": "Nintendo Switch - Citron",
44
"steamDirectory": "${steamdirglobal}",
55
"romDirectory": "${romsdirglobal}/switch",
6-
"executableArgs": "vblank_mode=0 %command% \"${filePath}\"",
6+
"executableArgs": "vblank_mode=0 %command% -f -g \"${filePath}\"",
77
"executableModifier": "\"${exePath}\"",
88
"startInDirectory": "",
99
"titleModifier": "${fuzzyTitle}",

configs/steam-rom-manager/userData/parsers/optional/nintendo_switch_yuzu.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"configTitle": "Nintendo Switch - Yuzu",
44
"steamDirectory": "${steamdirglobal}",
55
"romDirectory": "${romsdirglobal}/switch",
6-
"executableArgs": "vblank_mode=0 %command% -f -g \"'${filePath}'\"",
6+
"executableArgs": "vblank_mode=0 %command% -f -g \"${filePath}\"",
77
"executableModifier": "\"${exePath}\"",
88
"startInDirectory": "",
99
"titleModifier": "${fuzzyTitle}",

configs/steam-rom-manager/userData/userConfigurations.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3690,7 +3690,7 @@
36903690
"configTitle": "Nintendo Switch - Citron",
36913691
"steamDirectory": "${steamdirglobal}",
36923692
"romDirectory": "${romsdirglobal}/switch",
3693-
"executableArgs": "vblank_mode=0 %command% \"${filePath}\"",
3693+
"executableArgs": "vblank_mode=0 %command% -f -g \"${filePath}\"",
36943694
"executableModifier": "\"${exePath}\"",
36953695
"startInDirectory": "",
36963696
"titleModifier": "${fuzzyTitle}",
@@ -3776,7 +3776,7 @@
37763776
"configTitle": "Nintendo Switch - Eden",
37773777
"steamDirectory": "${steamdirglobal}",
37783778
"romDirectory": "${romsdirglobal}/switch",
3779-
"executableArgs": "vblank_mode=0 %command% \"${filePath}\"",
3779+
"executableArgs": "vblank_mode=0 %command% -f -g \"${filePath}\"",
37803780
"executableModifier": "\"${exePath}\"",
37813781
"startInDirectory": "",
37823782
"titleModifier": "${fuzzyTitle}",
@@ -3862,7 +3862,7 @@
38623862
"configTitle": "Nintendo Switch - Ryujinx",
38633863
"steamDirectory": "${steamdirglobal}",
38643864
"romDirectory": "${romsdirglobal}/switch",
3865-
"executableArgs": "--fullscreen \"'${filePath}'\"",
3865+
"executableArgs": "--fullscreen \"${filePath}\"",
38663866
"executableModifier": "\"${exePath}\"",
38673867
"startInDirectory": "",
38683868
"titleModifier": "${fuzzyTitle} (Ryujinx)",
@@ -6394,7 +6394,7 @@
63946394
"configTitle": "Sony PlayStation 2 - PCSX2",
63956395
"steamDirectory": "${steamdirglobal}",
63966396
"romDirectory": "${romsdirglobal}/ps2",
6397-
"executableArgs": "-batch -fullscreen -nogui \"'${filePath}'\"",
6397+
"executableArgs": "-batch -fullscreen -nogui \"${filePath}\"",
63986398
"executableModifier": "\"${exePath}\"",
63996399
"startInDirectory": "",
64006400
"titleModifier": "${fuzzyTitle}",
@@ -6481,7 +6481,7 @@
64816481
"steamDirectory": "${steamdirglobal}",
64826482
"startInDirectory": "",
64836483
"titleModifier": "${fuzzyTitle}",
6484-
"executableArgs": "--no-gui \"'${filePath}'\"",
6484+
"executableArgs": "--no-gui \"${filePath}\"",
64856485
"onlineImageQueries": "${${fuzzyTitle}}",
64866486
"imagePool": "${fuzzyTitle}",
64876487
"imageProviders": [
@@ -6562,7 +6562,7 @@
65626562
"configTitle": "Sony PlayStation 3 - RPCS3 (Installed PKG)",
65636563
"steamDirectory": "${steamdirglobal}",
65646564
"romDirectory": "/run/media/mmcblk0p1/Emulation/storage/rpcs3/dev_hdd0/game",
6565-
"executableArgs": "--no-gui \"'${filePath}'\"",
6565+
"executableArgs": "--no-gui \"${filePath}\"",
65666566
"executableModifier": "\"${exePath}\"",
65676567
"startInDirectory": "",
65686568
"titleModifier": "${fuzzyTitle}",

tools/launchers/citron.sh

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
#!/bin/bash
2-
. "$HOME/.config/EmuDeck/backend/functions/all.sh"
3-
emulatorInit "citron"
42
emuName="citron" #parameterize me
5-
emufolder="$emusFolder" # has to be applications for ES-DE to find it
63

7-
#find full path to emu executable
8-
exe=$(find $emufolder -iname "${emuName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null)
4+
. "$HOME/.config/EmuDeck/backend/functions/all.sh"
5+
emulatorInit "$emuName"
96

10-
echo $exe
7+
# find full path to emulator appimage
8+
appimage=$(find "$emusFolder" -iname "${emuName}*.AppImage" -print -quit 2>/dev/null)
119

12-
#if appimage doesn't exist fall back to flatpak.
13-
if [[ $exe == '' ]]; then
14-
#flatpak
15-
flatpakApp=$(flatpak list --app --columns=application | grep 'citron')
16-
exe="/usr/bin/flatpak run "$flatpakApp
10+
# if appimage doesn't exist fall back to flatpak
11+
if [[ -z "$appimage" ]]; then
12+
flatpakApp=$(/usr/bin/flatpak list --app --columns=application | grep -im1 "${emuName}")
13+
set -- /usr/bin/flatpak run "$flatpakApp" "$@"
1714
else
18-
#make sure that file is executable
19-
chmod +x $exe
15+
# make sure the appimage is executable
16+
chmod +x "$appimage"
17+
set -- "$appimage" "$@"
2018
fi
2119

22-
#run the executable with the params.
23-
#Fix first '
24-
param="${@}"
25-
param=$(echo $param | sed -e 's/^/"/' -e 's/$/"/')
26-
eval "${exe} -f -g ${param}"
20+
echo "Launching ${emuName} with:" "$@"
21+
"$@"
22+
2723
cloud_sync_uploadForced
28-
rm -rf "$savesPath/.gaming";
24+
rm -rf "$savesPath/.gaming"

tools/launchers/eden.sh

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
#!/bin/bash
2-
. "$HOME/.config/EmuDeck/backend/functions/all.sh"
3-
emulatorInit "eden"
4-
emuName="Eden" #parameterize me
5-
emufolder="$emusFolder" # has to be applications for ES-DE to find it
2+
emuName="eden" #parameterize me
63

7-
#find full path to emu executable
8-
exe=$(find $emufolder -iname "${emuName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null)
4+
. "$HOME/.config/EmuDeck/backend/functions/all.sh"
5+
emulatorInit "$emuName"
96

10-
echo $exe
7+
# find full path to emulator appimage
8+
appimage=$(find "$emusFolder" -iname "${emuName}*.AppImage" -print -quit 2>/dev/null)
119

12-
#if appimage doesn't exist fall back to flatpak.
13-
if [[ $exe == '' ]]; then
14-
#flatpak
15-
flatpakApp=$(flatpak list --app --columns=application | grep 'Eden')
16-
exe="/usr/bin/flatpak run "$flatpakApp
10+
# if appimage doesn't exist fall back to flatpak
11+
if [[ -z "$appimage" ]]; then
12+
flatpakApp=$(/usr/bin/flatpak list --app --columns=application | grep -im1 "${emuName}")
13+
set -- /usr/bin/flatpak run "$flatpakApp" "$@"
1714
else
18-
#make sure that file is executable
19-
chmod +x $exe
15+
# make sure the appimage is executable
16+
chmod +x "$appimage"
17+
set -- "$appimage" "$@"
2018
fi
2119

22-
#run the executable with the params.
23-
#Fix first '
24-
param="${@}"
25-
param=$(echo $param | sed -e 's/^/"/' -e 's/$/"/')
26-
eval "${exe} -f -g ${param}"
20+
echo "Launching ${emuName} with:" "$@"
21+
"$@"
22+
2723
cloud_sync_uploadForced
28-
rm -rf "$savesPath/.gaming";
24+
rm -rf "$savesPath/.gaming"

tools/launchers/suyu.sh

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
#!/bin/bash
2-
. "$HOME/.config/EmuDeck/backend/functions/all.sh"
3-
emulatorInit "suyu"
42
emuName="suyu" #parameterize me
5-
emufolder="$emusFolder" # has to be applications for ES-DE to find it
63

7-
#find full path to emu executable
8-
exe=$(find $emufolder -iname "${emuName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null)
4+
. "$HOME/.config/EmuDeck/backend/functions/all.sh"
5+
emulatorInit "$emuName"
96

10-
echo $exe
7+
# find full path to emulator appimage
8+
appimage=$(find "$emusFolder" -iname "${emuName}*.AppImage" -print -quit 2>/dev/null)
119

12-
#if appimage doesn't exist fall back to flatpak.
13-
if [[ $exe == '' ]]; then
14-
#flatpak
15-
flatpakApp=$(flatpak list --app --columns=application | grep 'citra')
16-
exe="/usr/bin/flatpak run "$flatpakApp
10+
# if appimage doesn't exist fall back to flatpak
11+
if [[ -z "$appimage" ]]; then
12+
flatpakApp=$(/usr/bin/flatpak list --app --columns=application | grep -im1 "${emuName}")
13+
set -- /usr/bin/flatpak run "$flatpakApp" "$@"
1714
else
18-
#make sure that file is executable
19-
chmod +x $exe
15+
# make sure the appimage is executable
16+
chmod +x "$appimage"
17+
set -- "$appimage" "$@"
2018
fi
2119

22-
#run the executable with the params.
23-
#Fix first '
24-
param="${@}"
25-
param=$(echo $param | sed -e 's/^/"/' -e 's/$/"/')
26-
eval "${exe} ${param}"
20+
echo "Launching ${emuName} with:" "$@"
21+
"$@"
22+
2723
cloud_sync_uploadForced
28-
rm -rf "$savesPath/.gaming";
24+
rm -rf "$savesPath/.gaming"

0 commit comments

Comments
 (0)