mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-01-31 20:45:38 +00:00
Fixed startup script (finally)
This commit is contained in:
parent
e5083e1a73
commit
49ed78444e
|
@ -494,15 +494,6 @@ modules:
|
|||
- name: retrodeck
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
|
||||
# RA is already doing this no?
|
||||
#- rm -f ${FLATPAK_DEST}/etc/retroarch.cfg
|
||||
#- mv retroarch.cfg ${FLATPAK_DEST}/etc/retroarch.cfg
|
||||
|
||||
# - symlink useful dirs and files in ~/retrodeck
|
||||
# TODO: cannot see home folder at this point, same for es_settings.xml
|
||||
#- ln -s ${FLATPAK_DEST}/etc/retroarch.cfg ~/retrodeck/retroarch.cfg
|
||||
#- ln -s ${FLATPAK_DEST}/share/emulationstation/themes/ ~/retrodeck/
|
||||
|
||||
# Prep the ES-DE and RetroArch config files
|
||||
- rm -rf /app/share/emulationstation/resources/systems/unix/es_find_rules.xml
|
||||
|
@ -513,10 +504,12 @@ modules:
|
|||
- mkdir -p ${FLATPAK_DEST}/retrodeck/
|
||||
- cp es_settings.xml ${FLATPAK_DEST}/retrodeck/es_settings.xml
|
||||
- cp retrodeck-retroarch.cfg ${FLATPAK_DEST}/retrodeck/retrodeck-retroarch.cfg
|
||||
- cp systemfolders.zip ${FLATPAK_DEST}/retrodeck/
|
||||
|
||||
# Logo
|
||||
# Logo, res
|
||||
- rm -f /app/share/emulationstation/resources/graphics/splash.svg
|
||||
- cp splash.svg /app/share/emulationstation/resources/graphics/splash.svg
|
||||
- cp icon.svg /app/share/icons/hicolor/scalable/apps/com.xargon.retrodeck.svg
|
||||
|
||||
# Tools
|
||||
- mkdir -p ${FLATPAK_DEST}/retrodeck/tools/
|
||||
|
@ -526,11 +519,12 @@ modules:
|
|||
- cp retrodeck.sh /app/bin/retrodeck.sh
|
||||
- chmod +x /app/bin/retrodeck.sh
|
||||
|
||||
# Desktop entry
|
||||
- cp desktop_entry /app/share/applications/com.xargon.retrodeck.desktop
|
||||
|
||||
#cleanup: ['*']
|
||||
sources:
|
||||
#- type: file
|
||||
# path: retroarch.cfg
|
||||
- type: file # Remove this when/if commited to ES-DE
|
||||
- type: file
|
||||
path: es_find_rules.xml
|
||||
- type: file
|
||||
path: es_settings.xml
|
||||
|
@ -542,8 +536,11 @@ modules:
|
|||
path: retrodeck-retroarch.cfg
|
||||
- type: file
|
||||
path: tools-gamelist.xml
|
||||
- type: file
|
||||
path: res/splash.svg
|
||||
- type: dir
|
||||
path: res
|
||||
- type: dir
|
||||
path: tools
|
||||
# create desktop entry
|
||||
- type: file
|
||||
path: desktop_entry
|
||||
- type: file
|
||||
path: systemfolders.zip
|
11
desktop_entry
Normal file
11
desktop_entry
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Name=RetroDECK
|
||||
GenericName=Frontend for the libretro API
|
||||
Type=Application
|
||||
Comment=All you need for emulation on Steam Deck
|
||||
Icon=com.xargon.retrodeck
|
||||
Exec=
|
||||
Terminal=false
|
||||
StartupNotify=false
|
||||
Keywords=multi;engine;emulator;standalone;steam;deck
|
||||
Categories=Game;Emulator;
|
59
retrodeck.sh
59
retrodeck.sh
|
@ -23,49 +23,52 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
kdialog --title "RetroDECK" --msgbox "RetroDECK will initialize the system, please wait a few minutes, a popup will tell you when the process is finished."
|
||||
# initializing ES-DE
|
||||
|
||||
mkdir -p $roms_folder
|
||||
rm -rf /var/config/.emulationstation/ROMs
|
||||
rm -rf /var/config/.emulationstation/roms
|
||||
mkdir -p /var/config/.emulationstation
|
||||
ln -s $roms_folder /var/config/.emulationstation/roms
|
||||
mkdir -p /var/config/retrodeck/tools
|
||||
|
||||
mkdir -p /var/config/.emulationstation
|
||||
rm -rf /var/config/.emulationstation/es_settings.xml
|
||||
rm -rf /var/config/.emulationstation/es_input.xml
|
||||
cp /app/retrodeck/es_settings.xml /var/config/.emulationstation/es_settings.xml
|
||||
cp /app/retrodeck/es_settings.xml /var/config/.emulationstation/es_input.xml
|
||||
# Cleaning
|
||||
rm -rf /var/config/emulationstation/
|
||||
rm ~/retrodeck/bios
|
||||
rm /var/config/retrodeck/tools/*
|
||||
|
||||
ls -ln /var/config/ #DEBUG
|
||||
ls -ln /var/config/emulationstation/.emulationstation #DEBUG
|
||||
read -n 1 -r -s -p $'Press enter to continue...\n' #DEBUG
|
||||
|
||||
kdialog --title "RetroDECK" --msgbox "EmulationStation will now initialize the system, please don't edit the rom location.\nJust select CREATE DIRECTORIES, YES, QUIT buttons.\nRetroDECK will manage the rest."
|
||||
|
||||
mkdir -p /var/config/emulationstation/
|
||||
|
||||
emulationstation --home /var/config/emulationstation
|
||||
|
||||
mv /var/config/emulationstation/ROMs /var/config/emulationstation/ROMs.bak
|
||||
ln -s $roms_folder /var/config/emulationstation/ROMs
|
||||
mv /var/config/emulationstation/ROMs.bak $roms_folder
|
||||
|
||||
# XMLSTARLET HERE
|
||||
cp /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml
|
||||
|
||||
mkdir -p ~/retrodeck/saves
|
||||
mkdir -p ~/retrodeck/states
|
||||
mkdir -p ~/retrodeck/screenshots
|
||||
|
||||
mkdir -p /var/config/retrodeck/tools
|
||||
cp -r /app/retrodeck/tools/* /var/config/retrodeck/tools
|
||||
|
||||
mkdir -p /var/config/retroarch/system
|
||||
ln -s ~/.var/app/com.xargon.retrodeck/config/retroarch/system ~/retrodeck/bios
|
||||
|
||||
|
||||
cp /app/retrodeck/retrodeck-retroarch.cfg /var/config/retroarch/retroarch.cfg
|
||||
|
||||
mkdir -p /var/config/.emulationstation/gamelists/tools/
|
||||
cp /app/retrodeck/tools-gamelist.xml /var/config/.emulationstation/gamelists/tools/gamelist.xml
|
||||
|
||||
mkdir -p /var/config/emulationstation/.emulationstation/gamelists/tools/
|
||||
cp /app/retrodeck/tools-gamelist.xml /var/config/emulationstation/.emulationstation/custom_systems/tools/gamelist.xml
|
||||
|
||||
mkdir -p /var/config/retroarch/cores/
|
||||
cp /app/share/libretro/cores/* /var/config/retroarch/cores/
|
||||
|
||||
|
||||
touch ~/retrodeck/.lock
|
||||
|
||||
kdialog --title "RetroDECK" --msgbox "Initialization completed, please put your roms in: $roms_folder.\nIf you wish to change the roms location you may use the tool located the tools section of RetroDECK."
|
||||
fi
|
||||
|
||||
#numFields=$(xmlstarlet sel -t -m '//system' -o "." /app/share/emulationstation/resources/systems/unix/es_systems.xml | wc -c)
|
||||
#for i in $(seq 1 $numFields); do
|
||||
# system=$(xmlstarlet sel -t -m "//system[$i]" -v "name" /app/share/emulationstation/resources/systems/unix/es_systems.xml)
|
||||
# if test -d ~/retrodeck/roms/${system}; then
|
||||
# mkdir -p ~/retrodeck/roms/${system}
|
||||
# fi
|
||||
#done
|
||||
|
||||
emulationstation --home /var/config/
|
||||
else
|
||||
emulationstation --home /var/config/emulationstation
|
||||
fi
|
Loading…
Reference in a new issue