mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2024-06-02 19:47:51 -04:00
Script cleanup
This commit is contained in:
parent
064a55e3d7
commit
441a9c2d08
173
install.sh
173
install.sh
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
NONE='\033[00m'
|
||||
RED='\033[01;31m'
|
||||
GREEN='\033[01;32m'
|
||||
|
@ -66,11 +66,11 @@ echo -e ""
|
|||
|
||||
text="Do you want to install your roms on your SD Card or on your Internal Storage?"
|
||||
zenity --question \
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="SD Card" \
|
||||
--cancel-label="Internal Storage" \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="SD Card" \
|
||||
--cancel-label="Internal Storage" \
|
||||
--text="${text}" &>> /dev/null
|
||||
ans=$?
|
||||
if [ $ans -eq 0 ]; then
|
||||
echo "Storage: SD" &>> ~/emudeck/emudeck.log
|
||||
|
@ -81,14 +81,14 @@ else
|
|||
destination="INTERNAL"
|
||||
fi
|
||||
|
||||
emulationPath="~/Emulation/"
|
||||
romsPath="~/Emulation/roms/"
|
||||
toolsPath="~/Emulation/tools/"
|
||||
biosPath="~/Emulation/bios/"
|
||||
emulationPath=~/Emulation/
|
||||
romsPath=~/Emulation/roms/
|
||||
toolsPath=~/Emulation/tools/
|
||||
biosPath=~/Emulation/bios/
|
||||
|
||||
if [ $destination == "SD" ]; then
|
||||
#check if sd card exists
|
||||
sdCard=$(ls /run/media | grep -ve '^deck$' | head -n1)
|
||||
sdCard=$(ls /run/media | grep -ve '^deck$' | head -n1)
|
||||
|
||||
#Detect non ext4 cards. Not enabled because of issues when creating symlinks.
|
||||
#if [ "$(ls -A /run/media/deck)" ]; then
|
||||
|
@ -100,16 +100,16 @@ if [ $destination == "SD" ]; then
|
|||
# sdCard="/run/media/${sdCard}"
|
||||
#fi
|
||||
|
||||
if [ $sdCard != "mmcblk0p1" ]; then
|
||||
if [ "$sdCard" != "mmcblk0p1" ]; then
|
||||
text="`printf "<b>You need to format your SD Card using Steam UI</b>\nEmuDeck will not work if your SD card is not formatted in ext4 format because of SteamOS permissions limitations on other non ext4 formatted cards.\nPlease come back when your SD Card is ready"`"
|
||||
zenity --error \
|
||||
--title="EmuDeck Error" \
|
||||
--width=400 \
|
||||
--text="${text}" &>> /dev/null
|
||||
exit
|
||||
fi
|
||||
--title="EmuDeck Error" \
|
||||
--width=400 \
|
||||
--text="${text}" &>> /dev/null
|
||||
exit
|
||||
fi
|
||||
|
||||
sdCardFull="/run/media/${sdCard}"
|
||||
sdCardFull="/run/media/${sdCard}"
|
||||
emulationPath="${sdCardFull}/Emulation/"
|
||||
romsPath="${sdCardFull}/Emulation/roms/"
|
||||
toolsPath="${sdCardFull}/Emulation/tools/"
|
||||
|
@ -117,9 +117,9 @@ if [ $destination == "SD" ]; then
|
|||
|
||||
fi
|
||||
|
||||
mkdir -p $emulationPath
|
||||
mkdir -p $toolsPath
|
||||
find $romsPath -name "readme.md" -type f -delete &>> ~/emudeck/emudeck.log
|
||||
mkdir -p "$emulationPath"
|
||||
mkdir -p "$toolsPath"
|
||||
find "$romsPath" -name "readme.md" -type f -delete &>> ~/emudeck/emudeck.log
|
||||
|
||||
#SECONDTIME
|
||||
if [ -f "$SECONDTIME" ]; then
|
||||
|
@ -218,27 +218,27 @@ if [ -f "$FILE" ]; then
|
|||
else
|
||||
text="Do you want to install <span weight=\"bold\" foreground=\"red\">EmulationStation DE</span> and all of its RetroArch cores?"
|
||||
zenity --question \
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Yes" \
|
||||
--cancel-label="No" \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Yes" \
|
||||
--cancel-label="No" \
|
||||
--text="${text}" &>> /dev/null
|
||||
ans=$?
|
||||
if [ $ans -eq 0 ]; then
|
||||
$doESDE=true
|
||||
doESDE=true
|
||||
echo "ESDE: Yes" &>> ~/emudeck/emudeck.log
|
||||
echo -e "${BOLD}Installing EmulationStation Desktop Edition${NONE}"
|
||||
|
||||
curl https://gitlab.com/leonstyhre/emulationstation-de/-/package_files/34287334/download --output $toolsPath/EmulationStation-DE-x64_SteamDeck.AppImage >> ~/emudeck/emudeck.log
|
||||
chmod +x $toolsPath/EmulationStation-DE-x64_SteamDeck.AppImage
|
||||
curl https://gitlab.com/leonstyhre/emulationstation-de/-/package_files/34287334/download --output "$toolsPath"/EmulationStation-DE-x64_SteamDeck.AppImage >> ~/emudeck/emudeck.log
|
||||
chmod +x "$toolsPath"/EmulationStation-DE-x64_SteamDeck.AppImage
|
||||
|
||||
#text="Do you want to install a selection of themes for <span weight=\"bold\" foreground=\"red\">EmulationStation DE</span>?"
|
||||
#zenity --question \
|
||||
# --title="EmuDeck" \
|
||||
# --width=250 \
|
||||
# --ok-label="Yes" \
|
||||
# --cancel-label="No" \
|
||||
# --text="${text}" &>> /dev/null
|
||||
# --title="EmuDeck" \
|
||||
# --width=250 \
|
||||
# --ok-label="Yes" \
|
||||
# --cancel-label="No" \
|
||||
# --text="${text}" &>> /dev/null
|
||||
#ans=$?
|
||||
#if [ $ans -eq 0 ]; then
|
||||
# echo "ESDE themes: Yes" &>> ~/emudeck/emudeck.log
|
||||
|
@ -255,7 +255,7 @@ else
|
|||
fi
|
||||
|
||||
echo -e "Installing PCSX2"
|
||||
flatpak install flathub net.pcsx2.PCSX2 -y &>> ~/emudeck/emudeck.log
|
||||
flatpak install flathub net.pcsx2.PCSX2 -y &>> ~/emudeck/emudeck.log
|
||||
echo -e "Bad characters" &>> ~/emudeck/emudeck.log
|
||||
echo -e "Installing PrimeHack"
|
||||
flatpak install flathub io.github.shiiion.primehack -y &>> ~/emudeck/emudeck.log
|
||||
|
@ -289,10 +289,10 @@ if [ -f "$FILE" ]; then
|
|||
echo "" &>> /dev/null
|
||||
else
|
||||
curl https://cemu.info/releases/cemu_1.26.2.zip --output $romsPath/wiiu/cemu_1.26.2.zip &>> ~/emudeck/emudeck.log
|
||||
unzip -o $romsPath/wiiu/cemu_1.26.2.zip -d $romsPath/wiiu/tmp &>> ~/emudeck/emudeck.log
|
||||
mv $romsPath/wiiu/tmp/*/* $romsPath/wiiu &>> ~/emudeck/emudeck.log
|
||||
rm -rf $romsPath/wiiu/tmp &>> ~/emudeck/emudeck.log
|
||||
rm -f $romsPath/wiiu/cemu_1.26.2.zip &>> ~/emudeck/emudeck.log
|
||||
unzip -o "$romsPath"/wiiu/cemu_1.26.2.zip -d "$romsPath"/wiiu/tmp &>> ~/emudeck/emudeck.log
|
||||
mv "$romsPath"/wiiu/tmp/*/* "$romsPath"/wiiu &>> ~/emudeck/emudeck.log
|
||||
rm -rf "$romsPath"/wiiu/tmp &>> ~/emudeck/emudeck.log
|
||||
rm -f "$romsPath"/wiiu/cemu_1.26.2.zip &>> ~/emudeck/emudeck.log
|
||||
fi
|
||||
|
||||
echo -e ""
|
||||
|
@ -303,11 +303,11 @@ if [ $destination == "SD" ]; then
|
|||
else
|
||||
echo -ne "${BOLD}Creating roms folder in your home folder...${NONE}"
|
||||
fi
|
||||
mkdir -p $romsPath
|
||||
mkdir -p $biosPath
|
||||
mkdir -p $biosPath/yuzu/
|
||||
mkdir -p "$romsPath"
|
||||
mkdir -p "$biosPath"
|
||||
mkdir -p "$biosPath"/yuzu/
|
||||
sleep 3
|
||||
rsync -r ~/dragoonDoriseTools/EmuDeck/roms/ $romsPath &>> ~/emudeck/emudeck.log
|
||||
rsync -r ~/dragoonDoriseTools/EmuDeck/roms/ "$romsPath" &>> ~/emudeck/emudeck.log
|
||||
echo -e "${GREEN}OK!${NONE}"
|
||||
#Steam RomManager
|
||||
echo -ne "${BOLD}Configuring Steam Rom Manager...${NONE}"
|
||||
|
@ -342,18 +342,17 @@ if [ $doRA == true ]; then
|
|||
mkdir -p ~/.var/app/org.libretro.RetroArch/config/retroarch
|
||||
mkdir -p ~/.var/app/org.libretro.RetroArch/config/retroarch/cores
|
||||
raUrl="https://buildbot.libretro.com/nightly/linux/x86_64/latest/"
|
||||
raCorePath=""
|
||||
RAcores=(bsnes_hd_beta_libretro.so flycast_libretro.so gambatte_libretro.so genesis_plus_gx_libretro.so genesis_plus_gx_wide_libretro.so mednafen_lynx_libretro.so mednafen_ngp_libretro.so mednafen_wswan_libretro.so melonds_libretro.so mesen_libretro.so mgba_libretro.so mupen64plus_next_libretro.so nestopia_libretro.so picodrive_libretro.so ppsspp_libretro.so snes9x_libretro.so stella_libretro.so yabasanshiro_libretro.so yabause_libretro.so yabause_libretro.so mame2003_plus_libretro.so mame2010_libretro.so mame_libretro.so melonds_libretro.so fbneo_libretro.so bluemsx_libretro.so desmume_libretro.so sameboy_libretro.so gearsystem_libretro.so mednafen_saturn_libretro.so)
|
||||
echo -e "${BOLD}Downloading RetroArch Cores for EmuDeck${NONE}"
|
||||
for i in "${RAcores[@]}"
|
||||
do
|
||||
FILE=~/.var/app/org.libretro.RetroArch/config/retroarch/cores/${i}
|
||||
if [ -f "$FILE" ]; then
|
||||
echo -e "${i}...${YELLOW}Already Downloaded${NONE}"
|
||||
echo -e "${i}...${YELLOW}Already Downloaded${NONE}"
|
||||
else
|
||||
curl $raUrl$i.zip --output ~/.var/app/org.libretro.RetroArch/config/retroarch/cores/${i}.zip >> ~/emudeck/emudeck.log
|
||||
#rm ~/.var/app/org.libretro.RetroArch/config/retroarch/cores/${i}.zip
|
||||
echo -e "${i}...${GREEN}Downloaded!${NONE}"
|
||||
echo -e "${i}...${GREEN}Downloaded!${NONE}"
|
||||
fi
|
||||
done
|
||||
echo $doESDE;
|
||||
|
@ -364,23 +363,23 @@ if [ $doRA == true ]; then
|
|||
do
|
||||
FILE=~/.var/app/org.libretro.RetroArch/config/retroarch/cores/${i}
|
||||
if [ -f "$FILE" ]; then
|
||||
echo -e "${i}...${YELLOW}Already Downloaded${NONE}"
|
||||
echo -e "${i}...${YELLOW}Already Downloaded${NONE}"
|
||||
else
|
||||
curl $raUrl$i.zip --output ~/.var/app/org.libretro.RetroArch/config/retroarch/cores/${i}.zip >> ~/emudeck/emudeck.log
|
||||
#rm ~/.var/app/org.libretro.RetroArch/config/retroarch/cores/${i}.zip
|
||||
echo -e "${i}...${GREEN}Downloaded!${NONE}"
|
||||
echo -e "${i}...${GREEN}Downloaded!${NONE}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for entry in ~/.var/app/org.libretro.RetroArch/config/retroarch/cores/*.zip
|
||||
do
|
||||
unzip -o $entry -d ~/.var/app/org.libretro.RetroArch/config/retroarch/cores/ &>> ~/emudeck/emudeck.log
|
||||
unzip -o "$entry" -d ~/.var/app/org.libretro.RetroArch/config/retroarch/cores/ &>> ~/emudeck/emudeck.log
|
||||
done
|
||||
|
||||
for entry in ~/.var/app/org.libretro.RetroArch/config/retroarch/cores/*.zip
|
||||
do
|
||||
rm -f $entry >> ~/emudeck/emudeck.log
|
||||
rm -f "$entry" >> ~/emudeck/emudeck.log
|
||||
done
|
||||
|
||||
raConfigFile=~/.var/app/org.libretro.RetroArch/config/retroarch/retroarch.cfg
|
||||
|
@ -447,7 +446,7 @@ if [ $doRPCS3 == true ]; then
|
|||
fi
|
||||
|
||||
rsync -avhp ~/dragoonDoriseTools/EmuDeck/configs/net.rpcs3.RPCS3/ ~/.var/app/net.rpcs3.RPCS3/ &>> ~/emudeck/emudeck.log
|
||||
echo "" > $toolsPath/RPCS3.txt
|
||||
echo "" > "$toolsPath"/RPCS3.txt
|
||||
fi
|
||||
if [ $doCitra == true ]; then
|
||||
FOLDER=~/.var/app/org.citra_emu.citra/config_bak
|
||||
|
@ -487,7 +486,7 @@ if [ $doYuzu == true ]; then
|
|||
fi
|
||||
if [ $doCemu == true ]; then
|
||||
echo "" &>> ~/emudeck/emudeck.log
|
||||
rsync -avhp ~/dragoonDoriseTools/EmuDeck/configs/cemu/ ${romsPath}/wiiu &>> ~/emudeck/emudeck.log
|
||||
rsync -avhp ~/dragoonDoriseTools/EmuDeck/configs/cemu/ "$romsPath"/wiiu &>> ~/emudeck/emudeck.log
|
||||
fi
|
||||
if [ $doRyujinx == true ]; then
|
||||
echo "" &>> ~/emudeck/emudeck.log
|
||||
|
@ -533,7 +532,7 @@ do
|
|||
FILE=${biosPath}${i}.bin
|
||||
|
||||
if [ -f "$FILE" ]; then
|
||||
PSXBIOS=true
|
||||
PSXBIOS=true
|
||||
break
|
||||
else
|
||||
PSXBIOS=false
|
||||
|
@ -544,9 +543,9 @@ if [ $PSXBIOS == false ]; then
|
|||
#text="`printf "<b>PS1 bios not detected</b>\nYou need to copy your BIOS to: ${biosPath}"`"
|
||||
text="`printf "<b>PS1 bios not detected</b>\nYou need to copy your BIOS to: \n${biosPath}\nSCPH7502.bin\nSCPH101.bin\nSCPH1000.bin\nSCPH1001.bin\nSCPH1002.bin\nSCPH3000.bin\nSCPH3500.bin\nSCPH5000.bin\nSCPH5500.bin\nSCPH5502.bin\nSCPH5552.bin\nSCPH7000.bin\nSCPH7001.bin\nSCPH7003.bin"`"
|
||||
zenity --error \
|
||||
--title="EmuDeck" \
|
||||
--width=400 \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=400 \
|
||||
--text="${text}" &>> /dev/null
|
||||
fi
|
||||
|
||||
#PS2 Bios - TBD
|
||||
|
@ -559,9 +558,9 @@ else
|
|||
|
||||
text="`printf "<b>Yuzu is not configured</b>\nYou need to copy your Keys and firmware to: \n${biosPath}yuzu/keys\n${biosPath}yuzu/firmware"`"
|
||||
zenity --error \
|
||||
--title="EmuDeck" \
|
||||
--width=400 \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=400 \
|
||||
--text="${text}" &>> /dev/null
|
||||
fi
|
||||
|
||||
#PS3 permissions?
|
||||
|
@ -573,18 +572,18 @@ else
|
|||
|
||||
text="`printf "<b>RPCS3 is not configured</b>\nYou need to open the app Flatseal.\nLook for RPCS3 and there, scroll down to Fylesystem and make sure 'All system files' is <b>checked</b>.\nYou need to do this in order to fix PS3 Games"`"
|
||||
zenity --question \
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Open Flatseal" \
|
||||
--cancel-label="Ignore" \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Open Flatseal" \
|
||||
--cancel-label="Ignore" \
|
||||
--text="${text}" &>> /dev/null
|
||||
ans=$?
|
||||
if [ $ans -eq 0 ]; then
|
||||
flatpak run com.github.tchx84.Flatseal &>> /dev/null
|
||||
flatpak run com.github.tchx84.Flatseal &>> /dev/null
|
||||
else
|
||||
echo "ESDE: No" &>> ~/emudeck/emudeck.log
|
||||
echo "ESDE: No" &>> ~/emudeck/emudeck.log
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
##Customizations
|
||||
|
@ -593,11 +592,11 @@ if [ -f "$FILE" ]; then
|
|||
|
||||
text="Do you want to use your previous customization?"
|
||||
zenity --question \
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Yes" \
|
||||
--cancel-label="No" \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Yes" \
|
||||
--cancel-label="No" \
|
||||
--text="${text}" &>> /dev/null
|
||||
ans=$?
|
||||
if [ $ans -eq 0 ]; then
|
||||
echo "CustomRemain: Yes" &>> ~/emudeck/emudeck.log
|
||||
|
@ -618,11 +617,11 @@ if [ ! -f "$CUSTOM" ] && [ ! -f "$FILEBEZELS" ]; then
|
|||
|
||||
text="Do you want to use Bezels (Overlays) on RetroArch systems?"
|
||||
zenity --question \
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Yes" \
|
||||
--cancel-label="No" \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Yes" \
|
||||
--cancel-label="No" \
|
||||
--text="${text}" &>> /dev/null
|
||||
ans=$?
|
||||
if [ $ans -eq 0 ]; then
|
||||
echo "Overlays: Yes" &>> ~/emudeck/emudeck.log
|
||||
|
@ -638,11 +637,11 @@ if [ ! -f "$CUSTOM" ] && [ ! -f "$FILESAVE" ]; then
|
|||
|
||||
text="Do you want to use auto save and auto load for RetroArch systems?"
|
||||
zenity --question \
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Yes" \
|
||||
--cancel-label="No" \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=250 \
|
||||
--ok-label="Yes" \
|
||||
--cancel-label="No" \
|
||||
--text="${text}" &>> /dev/null
|
||||
ans=$?
|
||||
if [ $ans -eq 0 ]; then
|
||||
echo "AutoSaveLoad: Yes" &>> ~/emudeck/emudeck.log
|
||||
|
@ -665,11 +664,11 @@ clear
|
|||
text="`printf "<b>Done!</b>\n\nRemember to add your games here:\n<b>${romsPath}</b>\nAnd your Bios (PS1, PS2, Yuzu) here:\n<b>${biosPath}</b>\n\nOpen Steam Rom Manager to add your games to your SteamUI Interface.\n\n<b>Remember that Cemu games needs to be set in compatibility mode in SteamUI: Proton 7 by going into its Properties and then Compatibility</b>\n\nIf you encounter any problem please visit our Discord:\n<b>https://discord.gg/b9F7GpXtFP</b>\n\nTo Update EmuDeck in the future, just run this App again.\n\nEnjoy!"`"
|
||||
|
||||
zenity --question \
|
||||
--title="EmuDeck" \
|
||||
--width=450 \
|
||||
--ok-label="Open Steam Rom Manager" \
|
||||
--cancel-label="Exit" \
|
||||
--text="${text}" &>> /dev/null
|
||||
--title="EmuDeck" \
|
||||
--width=450 \
|
||||
--ok-label="Open Steam Rom Manager" \
|
||||
--cancel-label="Exit" \
|
||||
--text="${text}" &>> /dev/null
|
||||
ans=$?
|
||||
if [ $ans -eq 0 ]; then
|
||||
cd ~/Desktop/
|
||||
|
|
Loading…
Reference in a new issue