mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
STEAM_SYNC: reverted .desktop files
This commit is contained in:
parent
80cdbabde6
commit
d1216b696c
|
@ -23,7 +23,7 @@
|
||||||
"appendArgsToExecutable": true
|
"appendArgsToExecutable": true
|
||||||
},
|
},
|
||||||
"parserInputs": {
|
"parserInputs": {
|
||||||
"glob": "${title}.desktop"
|
"glob": "${title}.sh"
|
||||||
},
|
},
|
||||||
"titleFromVariable": {
|
"titleFromVariable": {
|
||||||
"limitToGroups": "",
|
"limitToGroups": "",
|
||||||
|
|
|
@ -75,7 +75,7 @@ add_to_steam() {
|
||||||
|
|
||||||
log d "Sanitized Name: $sanitized_name"
|
log d "Sanitized Name: $sanitized_name"
|
||||||
|
|
||||||
local launcher="$steamsync_folder/${sanitized_name}.desktop"
|
local launcher="$steamsync_folder/${sanitized_name}.sh"
|
||||||
log d "Creating desktop file: $launcher"
|
log d "Creating desktop file: $launcher"
|
||||||
|
|
||||||
# if [[ -v command_list_default[$system] ]]; then
|
# if [[ -v command_list_default[$system] ]]; then
|
||||||
|
@ -87,19 +87,28 @@ add_to_steam() {
|
||||||
|
|
||||||
# Populate the .sync script with the correct command
|
# Populate the .sync script with the correct command
|
||||||
# TODO: if there is any emulator defined in the xml we use that, else... how we can know which is the default one?
|
# TODO: if there is any emulator defined in the xml we use that, else... how we can know which is the default one?
|
||||||
local command="flatpak run net.retrodeck.retrodeck start -s $system \"$roms_folder/$system/$path\""
|
# TODO: if steam is flatpak the command wrapping will change in .desktop
|
||||||
|
local command="flatpak run net.retrodeck.retrodeck start -s $system '$roms_folder/$system/$path'"
|
||||||
|
# Create the launcher file using a heredoc - if you enable .desktp this remember to edit .desktop in SRM userConfigurations.json and the above launcher variable (and vice versa)
|
||||||
|
# cat <<EOF > "$launcher"
|
||||||
|
# [Desktop Entry]
|
||||||
|
# Version=1.0
|
||||||
|
# Name=$name
|
||||||
|
# Comment=$name via RetroDECK
|
||||||
|
# Exec=$command
|
||||||
|
# Icon=net.retrodeck.retrodeck
|
||||||
|
# Terminal=false
|
||||||
|
# Type=Application
|
||||||
|
# Categories=Game;Emulator;
|
||||||
|
# EOF
|
||||||
cat <<EOF > "$launcher"
|
cat <<EOF > "$launcher"
|
||||||
[Desktop Entry]
|
#!/bin/bash
|
||||||
Version=1.0
|
if [ test "$(whereis flatpak)" = "flatpak:" ]; then
|
||||||
Name=$name
|
flatpak-spawn --host $command
|
||||||
Comment=$name via RetroDECK
|
else
|
||||||
Exec=bash -c 'if [ "\$(whereis flatpak)" = "flatpak:" ]; then flatpak-spawn --host $command; else $command; fi'
|
$command
|
||||||
Icon=net.retrodeck.retrodeck
|
fi
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
Categories=Game;Emulator;
|
|
||||||
EOF
|
EOF
|
||||||
chmod +x "$launcher"
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue