2022-08-30 16:26:13 -04:00
#!/bin/bash
2022-09-24 18:58:09 -04:00
MSG = $HOME /.config/EmuDeck/msg.log
echo "0" > " $MSG "
2022-08-30 16:26:13 -04:00
#
##
## Pid Lock...
##
#
devMode = $1
#We force the UI mode if we don't get any parameter for legacy installations
if [ -z " $2 " ] ; then
uiMode = 'zenity'
else
uiMode = " $2 "
fi
2022-09-24 18:58:09 -04:00
mkdir -p " $HOME /.config/EmuDeck "
PIDFILE = " $HOME /.config/EmuDeck/install.pid "
2022-08-30 16:26:13 -04:00
if [ -f " $PIDFILE " ] ; then
PID = $( cat " $PIDFILE " )
ps -p " $PID " > /dev/null 2>& 1
if [ $? -eq 0 ] ; then
echo "Process already running"
exit 1
else
## Process not found assume not running
echo $$ > " $PIDFILE "
if [ $? -ne 0 ] ; then
echo "Could not create PID file"
exit 1
fi
fi
else
echo $$ > " $PIDFILE "
if [ $? -ne 0 ] ; then
echo "Could not create PID file"
exit 1
fi
fi
function finish {
echo " Script terminating. Exit code $? "
finished = true
rm " $MSG "
killall zenity
}
trap finish EXIT
#
##
## Init... This code is needed for both Zenity and non Zenity modes
##
#
#Clean up previous installations
rm ~/emudek.log 2>/dev/null # This is emudeck's old log file, it's not a typo!
rm -rf ~/dragoonDoriseTools
2022-09-24 18:58:09 -04:00
rm -rf ~/emudeck/backend
2022-08-30 16:26:13 -04:00
#Creating log file
LOGFILE = " $HOME /emudeck/emudeck.log "
2022-09-26 17:42:31 -04:00
mkdir -p " $HOME /emudeck "
2022-10-14 15:33:19 -04:00
#Custom Scripts
mkdir -p " $HOME /emudeck/custom_scripts "
echo $'#!/bin/bash\nEMUDECKGIT="$HOME/.config/EmuDeck/backend"\nsource "$EMUDECKGIT/functions/all.sh"' > " $HOME /emudeck/custom_scripts/example.sh "
2022-09-25 16:47:56 -04:00
echo "Press the button to start..." > " $LOGFILE "
2022-09-10 12:50:34 -04:00
2022-09-24 19:20:16 -04:00
mv " ${ LOGFILE } " " $HOME /emudeck/emudeck.last.log " #backup last log
2022-08-30 16:26:13 -04:00
2022-09-26 17:42:31 -04:00
if echo " ${ @ } " > " ${ LOGFILE } " ; then
echo "Log created"
else
exit
fi
2023-02-25 16:57:26 -05:00
#exec > >(tee "${LOGFILE}") 2>&1
#Installation log
{
2022-08-30 16:26:13 -04:00
date "+%Y.%m.%d-%H:%M:%S %Z"
#Mark if this not a fresh install
2022-09-24 18:58:09 -04:00
FOLDER = " $HOME /.config/EmuDeck/ "
2022-08-30 16:26:13 -04:00
if [ -d " $FOLDER " ] ; then
2022-09-24 18:58:09 -04:00
echo "" > " $HOME /.config/EmuDeck/.finished "
2022-08-30 16:26:13 -04:00
fi
sleep 1
2022-09-24 18:58:09 -04:00
SECONDTIME = " $HOME /.config/EmuDeck/.finished "
2022-08-30 16:26:13 -04:00
2023-02-01 11:09:34 -05:00
#Lets log github API limits just in case
echo 'Github API limits:'
curl -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/rate_limit"
2022-08-30 16:26:13 -04:00
#
##
## set backend location
##
# I think this should just be in the source, so there's one spot for initialization. hrm, no i'm wrong. Here is best.
2022-09-24 18:58:09 -04:00
EMUDECKGIT = " $HOME /.config/EmuDeck/backend "
2022-08-30 16:26:13 -04:00
#
##
echo 'Downloading files...'
##
#
#
##
## Branch to download
##
#
case $devMode in
"BETA" ) branch = "beta" ; ;
"beta" ) branch = "beta" ; ;
2023-11-02 07:16:20 -04:00
"DEV" ) branch = "dev" ; ;
2022-08-30 16:26:13 -04:00
"dev" ) branch = "dev" ; ;
*) branch = "main" ; ;
2023-11-02 07:16:20 -04:00
esac
2022-08-30 16:26:13 -04:00
2022-09-24 18:58:09 -04:00
echo $branch > " $HOME /.config/EmuDeck/branch.txt "
2022-08-30 16:26:13 -04:00
if [ [ " $uiMode " = = 'zenity' || " $uiMode " = = 'whiptail' ] ] ; then
#We create all the needed folders for installation
if [ [ ! -e $EMUDECKGIT /.git/config ] ] ; then
mkdir -p " $EMUDECKGIT "
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
#Cloning EmuDeck files
2022-10-05 23:00:41 -04:00
git clone --depth 1 --no-single-branch https://github.com/dragoonDorise/EmuDeck.git " $EMUDECKGIT "
2022-08-30 16:26:13 -04:00
fi
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
git status " $EMUDECKGIT " --porcelain
if [ [ ! $noPull = = true ] ] ; then
cd " $EMUDECKGIT "
git fetch origin && git checkout origin/$branch && git reset --hard origin/$branch && git clean -ffdx
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
fi
fi
#
##
## UI Selection
2023-11-02 07:16:20 -04:00
##
2022-08-30 16:26:13 -04:00
#
if [ " $uiMode " = = 'zenity' ] ; then
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
source " $EMUDECKGIT /zenity-setup.sh "
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
elif [ " $uiMode " = = 'whiptail' ] ; then
source " $EMUDECKGIT /whiptail-setup.sh "
2023-11-02 07:16:20 -04:00
else
echo "Electron UI"
2022-08-30 16:26:13 -04:00
#App Image detection & launch so older user can update just using the same old .desktop
# if [[ ! -e "~/Applications/EmuDeck.AppImage" ]]; then
# mkdir -p ~/Applications
# curl -L "$(curl -s https://api.github.com/repos/EmuDeck/emudeck-electron/releases/latest | grep -E 'browser_download_url.*AppImage' | cut -d '"' -f 4)" > ~/Applications/EmuDeck.AppImage && chmod +x ~/Applications/EmuDeck.AppImage && kill -15 $(pidof emudeck) && ~/Applications/EmuDeck.AppImage && exit
# fi
#Nova fix'
fi
#
##
## Start of installation
2023-11-02 07:16:20 -04:00
##
2022-08-30 16:26:13 -04:00
#
source " $EMUDECKGIT /functions/all.sh "
2022-10-05 22:47:01 -04:00
#after sourcing functins, check if path is empty.
2022-10-18 15:09:47 -04:00
[ [ -z " $emulationPath " ] ] && { echo "emulationPath is Empty!" ; setMSG "There's been an issue, please restart the app" ; exit 1; }
2022-10-05 22:47:01 -04:00
2022-08-30 16:26:13 -04:00
2022-10-05 22:47:01 -04:00
echo "Current Settings: "
grep -vi pass " $emuDecksettingsFile "
2022-08-30 16:26:13 -04:00
#
#Environment Check
#
echo ""
echo "Env Details: "
getEnvironmentDetails
testRealDeck
#this sets up the settings file with defaults, in case they don't have a new setting we've added.
#also echos them all out so they are in the log.
echo "Setup Settings File: "
2023-11-02 07:16:20 -04:00
createUpdateSettingsFile
2022-08-30 16:26:13 -04:00
#Support for non-holo based OS's
#Only on Zenity for now
if [ " $uiMode " = = 'zenity' ] ; then
if [ [ $isRealDeck = = false ] ] ; then
echo "OS_setupPrereqsArch"
OS_setupPrereqsArch
fi
fi
2022-10-05 22:47:01 -04:00
#create folders after tests!
createFolders
2022-08-30 16:26:13 -04:00
#setup Proton-Launch.sh
#because this path gets updated by sed, we really should be installing it every time and allowing it to be updated every time. In case the user changes their path.
cp " $EMUDECKGIT /tools/proton-launch.sh " " ${ toolsPath } /proton-launch.sh "
chmod +x " ${ toolsPath } /proton-launch.sh "
2022-09-22 23:53:42 -04:00
cp " $EMUDECKGIT /tools/appID.py " " ${ toolsPath } /appID.py "
2022-08-30 16:26:13 -04:00
2022-12-28 15:45:26 -05:00
# Setup emu-launch.sh
cp " ${ EMUDECKGIT } /tools/emu-launch.sh " " ${ toolsPath } /emu-launch.sh "
chmod +x " ${ toolsPath } /emu-launch.sh "
2022-08-30 16:26:13 -04:00
#ESDE Installation
if [ $doInstallESDE = = "true" ] ; then
echo "install esde"
2023-11-02 07:16:20 -04:00
ESDE_install
2022-08-30 16:26:13 -04:00
fi
#SRM Installation
if [ $doInstallSRM = = "true" ] ; then
echo "install srm"
SRM_install
fi
2023-11-02 07:16:20 -04:00
if [ " $doInstallPCSX2QT " = = "true" ] ; then
2022-08-30 16:26:13 -04:00
echo "install pcsx2Qt"
PCSX2QT_install
fi
2023-04-21 03:34:27 -04:00
if [ $doInstallPrimeHack = = "true" ] ; then
2022-08-30 16:26:13 -04:00
echo "install primehack"
Primehack_install
fi
if [ $doInstallRPCS3 = = "true" ] ; then
echo "install rpcs3"
RPCS3_install
fi
if [ $doInstallCitra = = "true" ] ; then
echo "install Citra"
Citra_install
fi
if [ $doInstallDolphin = = "true" ] ; then
2023-11-02 07:16:20 -04:00
echo "install Dolphin"
2022-08-30 16:26:13 -04:00
Dolphin_install
fi
if [ $doInstallDuck = = "true" ] ; then
echo "DuckStation_install"
DuckStation_install
fi
if [ $doInstallRA = = "true" ] ; then
echo "RetroArch_install"
2023-11-02 07:16:20 -04:00
RetroArch_install
2022-08-30 16:26:13 -04:00
fi
2023-01-03 00:46:29 -05:00
if [ $doInstallRMG = = "true" ] ; then
echo "RMG_install"
2023-11-02 07:16:20 -04:00
RMG_install
2023-01-03 00:46:29 -05:00
fi
2022-08-30 16:26:13 -04:00
if [ $doInstallPPSSPP = = "true" ] ; then
echo "PPSSPP_install"
2023-11-02 07:16:20 -04:00
PPSSPP_install
2022-08-30 16:26:13 -04:00
fi
2023-11-02 07:16:20 -04:00
if [ $doInstallYuzu = = "true" ] ; then
2022-08-30 16:26:13 -04:00
echo "Yuzu_install"
Yuzu_install
fi
2023-11-02 07:16:20 -04:00
if [ $doInstallRyujinx = = "true" ] ; then
2022-08-30 16:26:13 -04:00
echo "Ryujinx_install"
Ryujinx_install
fi
2023-11-02 07:16:20 -04:00
if [ $doInstallMAME = = "true" ] ; then
2022-08-30 16:26:13 -04:00
echo "MAME_install"
MAME_install
fi
if [ $doInstallXemu = = "true" ] ; then
echo "Xemu_install"
Xemu_install
fi
if [ $doInstallCemu = = "true" ] ; then
echo "Cemu_install"
Cemu_install
fi
2023-01-23 23:03:12 -05:00
if [ " ${ doInstallCemuNative } " = = "true" ] ; then
echo "CemuNative_install"
CemuNative_install
fi
2022-09-24 04:29:49 -04:00
if [ $doInstallScummVM = = "true" ] ; then
echo "ScummVM_install"
ScummVM_install
fi
if [ $doInstallVita3K = = "true" ] ; then
echo "Vita3K_install"
Vita3K_install
fi
2023-02-02 16:18:11 -05:00
if [ $doInstallMGBA = = "true" ] ; then
echo "mGBA_install"
mGBA_install
fi
2023-02-05 14:56:15 -05:00
if [ $doInstallRMG = = "true" ] ; then
echo "RMG_install"
RMG_install
fi
2023-02-05 16:29:45 -05:00
if [ $doInstallmelonDS = = "true" ] ; then
2023-02-07 11:12:49 -05:00
echo "melonDS_install"
melonDS_install
2023-02-05 14:56:15 -05:00
fi
2022-08-30 16:26:13 -04:00
#Xenia - We need to install Xenia after creating the Roms folders!
if [ " $doInstallXenia " = = "true" ] ; then
echo "Xenia_install"
Xenia_install
fi
#Steam RomManager Config
if [ " $doSetupSRM " = = "true" ] ; then
echo "SRM_init"
SRM_init
fi
#ESDE Config
if [ " $doSetupESDE " = = "true" ] ; then
echo "ESDE_init"
ESDE_update
2023-11-02 07:16:20 -04:00
fi
2022-08-30 16:26:13 -04:00
#Emus config
#setMSG "Configuring Steam Input for emulators.." moved to emu install
setMSG "Configuring emulators.."
if [ " $doSetupRA " = = "true" ] ; then
echo "RetroArch_init"
RetroArch_init
fi
2023-04-21 03:34:27 -04:00
if [ " $doSetupPrimehack " = = "true" ] ; then
2022-08-30 16:26:13 -04:00
echo "Primehack_init"
Primehack_init
fi
if [ " $doSetupDolphin " = = "true" ] ; then
echo "Dolphin_init"
Dolphin_init
fi
if [ " $doSetupPCSX2QT " = = "true" ] ; then
echo "PCSX2QT_init"
PCSX2QT_init
fi
if [ " $doSetupRPCS3 " = = "true" ] ; then
echo "RPCS3_init"
RPCS3_init
fi
if [ " $doSetupCitra " = = "true" ] ; then
echo "Citra_init"
Citra_init
fi
if [ " $doSetupDuck " = = "true" ] ; then
echo "DuckStation_init"
DuckStation_init
fi
if [ " $doSetupYuzu " = = "true" ] ; then
echo "Yuzu_init"
Yuzu_init
fi
if [ " $doSetupRyujinx " = = "true" ] ; then
echo "Ryujinx_init"
Ryujinx_init
fi
if [ " $doSetupPPSSPP " = = "true" ] ; then
echo "PPSSPP_init"
PPSSPP_init
fi
if [ " $doSetupXemu " = = "true" ] ; then
echo "Xemu_init"
Xemu_init
fi
if [ " $doSetupMAME " = = "true" ] ; then
echo "MAME_init"
MAME_init
fi
2022-09-24 04:29:49 -04:00
if [ " $doSetupScummVM " = = "true" ] ; then
echo "ScummVM_init"
ScummVM_init
fi
if [ " $doSetupVita3K " = = "true" ] ; then
echo "Vita3K_init"
Vita3K_init
fi
2023-02-05 14:56:15 -05:00
if [ " $doSetupRMG " = = "true" ] ; then
echo "RMG_init"
RMG_init
fi
2023-02-05 16:29:45 -05:00
if [ " $doSetupmelonDS " = = "true" ] ; then
2023-02-07 11:12:49 -05:00
echo "melonDS_init"
melonDS_init
2023-02-05 14:56:15 -05:00
fi
2023-02-02 16:18:11 -05:00
if [ " $doSetupMGBA " = = "true" ] ; then
echo "mGBA_init"
mGBA_init
fi
2023-01-23 23:03:12 -05:00
if [ " ${ doSetupCemuNative } " = = "true" ] ; then
echo "CemuNative_init"
CemuNative_init
fi
2022-08-30 16:26:13 -04:00
#Proton Emus
if [ " $doSetupCemu " = = "true" ] ; then
echo "Cemu_init"
Cemu_init
fi
if [ " $doSetupXenia " = = "true" ] ; then
echo "Xenia_init"
Xenia_init
fi
#Fixes repeated Symlink for older installations
# Yuzu_finalize move into update / init to clean up install script
#
##
##End of installation
##
#
##
##
## Customizations.
##
##
2023-11-02 07:16:20 -04:00
#RA Bezels
2022-10-31 19:39:16 -04:00
if [ " $doSetupRA " = = "true" ] ; then
RetroArch_setBezels #needs to change
2023-11-02 07:16:20 -04:00
#RA AutoSave
2022-10-31 19:39:16 -04:00
if [ " $RAautoSave " = = true ] ; then
RetroArch_autoSaveOn
else
RetroArch_autoSaveOff
2023-11-02 07:16:20 -04:00
fi
2022-10-31 19:39:16 -04:00
fi
2022-10-21 15:46:14 -04:00
2022-10-26 00:50:11 -04:00
#
#New Shaders
#Moved before widescreen, so widescreen disabled if needed.
2023-11-02 07:16:20 -04:00
#
2022-10-26 00:50:11 -04:00
if [ " $doSetupRA " = = "true" ] ; then
RetroArch_setShadersCRT
RetroArch_setShaders3DCRT
RetroArch_setShadersMAT
fi
2022-08-30 16:26:13 -04:00
# Old bezels and widescreen modes
if [ " $uiMode " = = 'zenity' ] ; then
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
#Old Widescreen hacks
2023-11-02 07:16:20 -04:00
if [ " $duckWide " = = true ] ; then
2022-08-30 16:26:13 -04:00
DuckStation_wideScreenOn
else
DuckStation_wideScreenOff
fi
2023-11-02 07:16:20 -04:00
if [ " $PCSX2QTWide " = = true ] ; then
2022-08-30 16:26:13 -04:00
PCSX2QT_wideScreenOn
else
PCSX2QT_wideScreenOff
fi
if [ " $DolphinWide " = = true ] ; then
Dolphin_wideScreenOn
else
Dolphin_wideScreenOff
fi
if [ " $XemuWide " = = true ] ; then
Xemu_wideScreenOn
else
Xemu_wideScreenOff
fi
if [ " $DreamcastWide " = = true ] ; then
RetroArch_Flycast_wideScreenOn
else
RetroArch_Flycast_wideScreenOff
fi
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
#RA SNES Aspect Ratio
RetroArch_setSNESAR #needs to change
else
#
#New Aspect Ratios
#
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
#Sega Games
#Master System
#Genesis
#Sega CD
#Sega 32X
2022-10-31 19:39:16 -04:00
if [ " $doSetupRA " = = "true" ] ; then
case $arSega in
2023-11-02 07:16:20 -04:00
"32" )
2022-10-31 19:39:16 -04:00
RetroArch_mastersystem_ar32
RetroArch_genesis_ar32
RetroArch_segacd_ar32
2023-11-02 07:16:20 -04:00
RetroArch_sega32x_ar32
; ;
2022-10-31 19:39:16 -04:00
*)
RetroArch_mastersystem_ar43
RetroArch_genesis_ar43
RetroArch_segacd_ar43
RetroArch_sega32x_ar43
if [ " $RABezels " = = true ] && [ " $doSetupRA " = = "true" ] ; then
RetroArch_mastersystem_bezelOn
RetroArch_genesis_bezelOn
RetroArch_segacd_bezelOn
RetroArch_sega32x_bezelOn
fi
; ;
2023-11-02 07:16:20 -04:00
esac
2022-10-31 19:39:16 -04:00
#Snes and NES
case $arSnes in
"87" )
RetroArch_snes_ar87
RetroArch_nes_ar87
; ;
"32" )
RetroArch_snes_ar32
RetroArch_nes_ar32
2023-11-02 07:16:20 -04:00
; ;
2022-10-31 19:39:16 -04:00
*)
RetroArch_snes_ar43
RetroArch_nes_ar43
2023-11-02 07:16:20 -04:00
if [ " $RABezels " = = true ] && [ " $doSetupRA " = = "true" ] ; then
2022-10-31 19:39:16 -04:00
RetroArch_snes_bezelOn
fi
; ;
esac
fi
2022-08-30 16:26:13 -04:00
# Classic 3D Games
#Dreamcast
#PSX
#Nintendo 64
#Saturn
#Xbox
2023-11-02 07:16:20 -04:00
if [ " $arClassic3D " = = 169 ] ; then
if [ " $doSetupRA " = = "true" ] ; then
2022-10-31 19:39:16 -04:00
RetroArch_Beetle_PSX_HW_wideScreenOn
RetroArch_Flycast_wideScreenOn
#"Bezels off"
RetroArch_dreamcast_bezelOff
RetroArch_psx_bezelOff
RetroArch_n64_wideScreenOn
RetroArch_SwanStation_wideScreenOn
fi
if [ " $doSetupDuck " = = "true" ] ; then
DuckStation_wideScreenOn
fi
if [ " $doSetupXemu " = = "true" ] ; then
Xemu_wideScreenOn
fi
2022-08-30 16:26:13 -04:00
else
2022-10-31 19:39:16 -04:00
if [ " $doSetupRA " = = "true" ] ; then
#"SET 4:3"
RetroArch_Flycast_wideScreenOff
RetroArch_n64_wideScreenOff
RetroArch_Beetle_PSX_HW_wideScreenOff
RetroArch_SwanStation_wideScreenOff
fi
if [ " $doSetupDuck " = = "true" ] ; then
DuckStation_wideScreenOff
fi
if [ " $doSetupXemu " = = "true" ] ; then
Xemu_wideScreenOff
fi
2022-08-30 16:26:13 -04:00
#"Bezels on"
2022-10-11 18:15:03 -04:00
if [ " $RABezels " = = true ] && [ " $doSetupRA " = = "true" ] ; then
2023-11-02 07:16:20 -04:00
RetroArch_dreamcast_bezelOn
2022-09-16 21:56:56 -04:00
RetroArch_n64_bezelOn
RetroArch_psx_bezelOn
2023-11-02 07:16:20 -04:00
fi
2022-08-30 16:26:13 -04:00
fi
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
# GameCube
2022-10-31 19:39:16 -04:00
if [ " $doSetupDolphin " = = "true" ] ; then
2023-11-02 07:16:20 -04:00
if [ " $arDolphin " = = 169 ] ; then
2022-10-31 19:39:16 -04:00
Dolphin_wideScreenOn
else
Dolphin_wideScreenOff
fi
2022-08-30 16:26:13 -04:00
fi
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
fi
#RetroAchievments
2022-10-31 19:39:16 -04:00
if [ " $doSetupRA " = = "true" ] ; then
RetroArch_retroAchievementsSetLogin
if [ " $achievementsHardcore " = = "true" ] ; then
RetroArch_retroAchievementsHardCoreOn
else
RetroArch_retroAchievementsHardCoreOff
fi
2022-10-21 15:46:14 -04:00
fi
2023-02-01 05:08:26 -05:00
if [ " $doSetupDuck " = = "true" ] ; then
DuckStation_retroAchievementsSetLogin
if [ " $achievementsHardcore " = = "true" ] ; then
DuckStation_retroAchievementsHardCoreOn
else
DuckStation_retroAchievementsHardCoreOff
fi
fi
if [ " $doSetupPCSX2QT " = = "true" ] ; then
2023-04-24 03:39:29 -04:00
PCSX2QT_retroAchievementsSetLogin
2023-02-01 05:08:26 -05:00
if [ " $achievementsHardcore " = = "true" ] ; then
2023-04-24 03:39:29 -04:00
PCSX2QT_retroAchievementsHardCoreOn
2023-02-01 05:08:26 -05:00
else
2023-04-24 03:39:29 -04:00
PCSX2QT_retroAchievementsHardCoreOff
2023-02-01 05:08:26 -05:00
fi
fi
2022-10-21 15:46:14 -04:00
2022-08-30 16:26:13 -04:00
#Sudo Required!
2022-10-06 01:43:50 -04:00
if [ -n " $PASSWD " ] ; then
pwstatus = 0
echo " $PASSWD " | sudo -v -S & >/dev/null && pwstatus = 1 || echo "sudo password was incorrect" #refresh sudo cache
if [ $pwstatus = = 1 ] ; then
2023-11-02 07:16:20 -04:00
if [ " $doInstallGyro " = = "true" ] ; then
2022-10-06 01:43:50 -04:00
Plugins_installSteamDeckGyroDSU
fi
2022-08-30 16:26:13 -04:00
2022-10-06 01:43:50 -04:00
if [ " $doInstallPowertools " = = "true" ] ; then
Plugins_installPluginLoader
Plugins_installPowerTools
fi
2022-08-30 16:26:13 -04:00
fi
2022-10-06 01:43:50 -04:00
else
echo "no password supplied. Skipping gyro / powertools."
2022-08-30 16:26:13 -04:00
fi
#Always install
BINUP_install
CHD_install
#
##
## Overrides for non Steam hardware...
##
#
#
#Fixes for 16:9 Screens
#
2022-10-31 19:39:16 -04:00
if [ " $doSetupRA " = = "true" ] ; then
if [ " $( getScreenAR) " = = 169 ] ; then
2023-11-02 07:16:20 -04:00
nonDeck_169Screen
2022-10-31 19:39:16 -04:00
fi
2023-11-02 07:16:20 -04:00
2022-10-31 19:39:16 -04:00
#Anbernic Win600 Special configuration
if [ " $( getProductName) " = = "Win600" ] ; then
2023-11-02 07:16:20 -04:00
nonDeck_win600
2022-10-31 19:39:16 -04:00
fi
2022-10-21 15:46:14 -04:00
fi
2023-11-02 07:16:20 -04:00
if [ " $system " = = "chimeraos" ] ; then
mkdir -p $HOME /Applications
downloads_dir = " $HOME /Downloads "
destination_dir = " $HOME /Applications "
file_name = "EmuDeck"
find " $downloads_dir " -type f -name " * $file_name *.AppImage " -exec mv { } " $destination_dir / $file_name .AppImage " \;
fi
2022-10-21 15:46:14 -04:00
2022-08-30 16:26:13 -04:00
createDesktopIcons
2023-11-02 07:16:20 -04:00
if [ " $doInstallHomeBrewGames " = = "true" ] ; then
2022-12-12 06:30:29 -05:00
emuDeckInstallHomebrewGames
fi
2022-09-10 20:27:29 -04:00
2022-08-30 16:26:13 -04:00
#
##
##Validations
##
#
# FILE="$HOME/.config/Ryujinx/system/prod.keys"
# if [ -f "$FILE" ]; then
# echo -e "" 2>/dev/null
# else
# if [ "$zenity" == true ]; then
# text="$(printf "<b>Ryujinx is not configured</b>\nYou need to copy your Keys to: \n${biosPath}/ryujinx/keys\n\nMake sure to copy your files inside the folders. <b>Do not overwrite them. You might need to install your firmware using the Ryujinx Install Firmware option inside the emulator</b>")"
# zenity --error \
# --title="EmuDeck" \
# --width=400 \
# --text="${text}" 2>/dev/null
# else
# echo "$text"
# fi
# fi
2022-09-10 20:43:57 -04:00
#SaveSync
2023-11-02 07:16:20 -04:00
# if [[ ! $branch == "main" ]]; then
2022-09-10 20:43:57 -04:00
# if [[ $doSetupSaveSync == "true" ]]; then
2023-11-02 07:16:20 -04:00
#
2022-09-10 20:43:57 -04:00
# $HOME/Desktop/EmuDeckSaveSync.desktop
2023-11-02 07:16:20 -04:00
#
2022-09-10 20:43:57 -04:00
# fi
2023-11-02 07:16:20 -04:00
# fi
2022-09-10 20:43:57 -04:00
2022-08-30 16:26:13 -04:00
#EmuDeck updater on gaming Mode
2022-08-31 11:50:28 -04:00
mkdir -p " ${ toolsPath } /updater "
cp -v " $EMUDECKGIT /tools/updater/emudeck-updater.sh " " ${ toolsPath } /updater/ "
chmod +x " ${ toolsPath } /updater/emudeck-updater.sh "
2022-08-31 11:44:41 -04:00
#RemotePlayWhatever
2023-11-02 07:16:20 -04:00
# if [[ ! $branch == "main" ]]; then
2022-09-19 14:30:48 -04:00
# RemotePlayWhatever_install
# fi
2022-08-30 16:26:13 -04:00
#
2023-11-02 07:16:20 -04:00
# We mark the script as finished
2022-08-30 16:26:13 -04:00
#
2022-09-24 18:58:09 -04:00
echo "" > " $HOME /.config/EmuDeck/.finished "
echo "" > " $HOME /.config/EmuDeck/.ui-finished "
echo "100" > " $HOME /.config/EmuDeck/msg.log "
echo "# Installation Complete" >> " $HOME /.config/EmuDeck/msg.log "
2022-08-30 16:26:13 -04:00
finished = true
rm " $PIDFILE "
2022-10-14 15:21:11 -04:00
#
## We check all the selected emulators are installed
#
checkInstalledEmus
2022-10-14 15:33:19 -04:00
#
# Run custom scripts... shhh for now ;)
#
2022-10-14 18:29:42 -04:00
for entry in " $HOME " /emudeck/custom_scripts/*.sh
2022-10-14 15:33:19 -04:00
do
bash $entry
done
2022-08-30 16:26:13 -04:00
if [ " $uiMode " = = 'zenity' ] ; then
text = " $( printf " <b>Done!</b>\n\nRemember to add your games here:\n<b> ${ romsPath } </b>\nAnd your Bios (PS1, PS2, Yuzu, Ryujinx) here:\n<b> ${ biosPath } </b>\n\nOpen Steam Rom Manager on your Desktop to add your games to your SteamUI Interface.\n\nThere is a bug in RetroArch that if you are using Bezels you can not set save configuration files unless you close your current game. Use overrides for your custom configurations or use expert mode to disabled them\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! " ) "
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
zenity --question \
--title= "EmuDeck" \
--width= 450 \
--ok-label= "Open Steam Rom Manager" \
--cancel-label= "Exit" \
--text= " ${ text } " 2>/dev/null
ans = $?
if [ $ans -eq 0 ] ; then
kill -15 " $( pidof steam) "
" ${ toolsPath } /srm/Steam-ROM-Manager.AppImage "
zenity --question \
--title= "EmuDeck" \
--width= 350 \
--text= "Return to Game Mode?" \
--ok-label= "Yes" \
--cancel-label= "No" 2>/dev/null
ans2 = $?
if [ $ans2 -eq 0 ] ; then
qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logout
fi
exit
else
exit
echo -e "Exit" 2>/dev/null
fi
2023-11-02 07:16:20 -04:00
2022-08-30 16:26:13 -04:00
elif [ " $uiMode " = = 'whiptail' ] ; then
echo "Finished on Whiptail"
sleep 9999
2022-09-22 23:53:42 -04:00
fi
2023-02-25 16:57:26 -05:00
} | tee " ${ LOGFILE } " 2>& 1