EmuDeck/functions/EmuScripts/emuDeckVita3K.sh
rawdatafeel 5dbee04a3d Cloud Services Manager/Emulators: Clean up (#1270)
* Updated installEmuAI and installEmuFP to be more dynamic
    * Allows for selecting if the application is an "emulator", "remoteplay", or "genericapplication"
        * Based off the choice, copies the respective bash file to the correct location
    * Allows for selecting file format of the downloaded AppImage (in case it's compressed and needs to be extracted)
    * Updated relevant scripts to match new changes
    * Cleaned up formatting of these two scripts
    * Cleaned up remoteplay Flatpak scripts to match new changes (allows for easier maintenance)
    * With these changes, remoteplay and generic application AppImages will now have a desktop file created
        * Added relevant desktop icons
* Added generic applications to cloud services manager
    * Added Cider, Heroic Games Launcher, Plexamp, Spotify, and Tidal
    * Moved Spotify here from remoteplay scripts
* Added chiaki4deck to remote play scripts
    * Added copying configs from Chiaki to chiaki4deck (if one does not exist already)
* Added uninstall option if bash scripts are detected in the remoteplay or generic-applications folder
    * If user installed these applications independent of EmuDeck, these folders would be empty and therefore can be skipped in the uninstallation
* Updated emulator, remoteplay, and generic-application scripts to rely more heavily on installEmuAI, installEmuFP, uninstallEmuFP, uninstallEmuAI, and uninstallGeneric
    * This should ideally improve maintenance in the future and allow for easier contribution
* Updated emulator scripts to remove redunant/outdated code
* Added emulator folder for ES-DE and Pegasus (official support was added to ES-DE)
    * Added copying emulator scripts to the emulator folder and removing when uninstalled
* Updated binupdate and flatpakupdate to be in alphabetical order/tidied these scripts
2024-09-26 12:26:39 +02:00

158 lines
No EOL
3 KiB
Bash

#!/bin/bash
#variables
Vita3K_emuName="Vita3K"
Vita3K_emuType="$emuDeckEmuTypeBinary"
Vita3K_emuPath="$HOME/Applications/Vita3K"
Vita3K_configFile="$HOME/.config/Vita3K/config.yml"
#cleanupOlderThings
Vita3K_cleanup(){
echo "Begin Vita3K Cleanup"
}
#Install
Vita3K_install(){
echo "Begin Vita3K Install"
local showProgress="$1"
#if installEmuBI "Vita3K" "https://github.com/Vita3K/Vita3K/releases/download/continuous/ubuntu-latest.zip" "Vita3K" "zip" "$showProgress"; then
if installEmuBI "$Vita3K_emuName" "$(getReleaseURLGH "Vita3K/Vita3K" "ubuntu-latest.zip")" "" "zip" "$showProgress"; then
unzip -o "$HOME/Applications/Vita3K.zip" -d "$Vita3K_emuPath" && rm -rf "$HOME/Applications/Vita3K.zip"
chmod +x "$Vita3K_emuPath/Vita3K"
else
return 1
fi
}
#Fix for autoupdate
Vita3k_install(){
Vita3K_install
}
#ApplyInitialSettings
Vita3K_init(){
echo "Begin Vita3K Init"
configEmuAI "Vita3K" "config" "$HOME/.config/Vita3K" "$EMUDECKGIT/configs/Vita3K" "true"
Vita3K_setEmulationFolder
Vita3K_setupStorage
Vita3K_setupSaves #?
Vita3K_finalize
#SRM_createParsers
Vita3K_flushEmulatorLauncher
}
#update
Vita3K_update(){
echo "Begin Vita3K update"
configEmuAI "Vita3K" "config" "$HOME/.config/Vita3K" "$EMUDECKGIT/configs/Vita3K"
Vita3K_setEmulationFolder
Vita3K_setupStorage
Vita3K_setupSaves #?
Vita3K_finalize
Vita3K_flushEmulatorLauncher
}
#ConfigurePaths
Vita3K_setEmulationFolder(){
echo "Begin Vita3K Path Config"
local prefpath_directoryOpt='pref-path: '
local newprefpath_directoryOpt="$prefpath_directoryOpt""$storagePath/Vita3K/"
changeLine "$prefpath_directoryOpt" "$newprefpath_directoryOpt" "$Vita3K_configFile"
}
#SetupSaves
Vita3K_setupSaves(){
echo "Begin Vita3K save link"
linkToSaveFolder Vita3K saves "$storagePath/Vita3K/ux0/user/00/savedata"
}
#SetupStorage
Vita3K_setupStorage(){
echo "Begin Vita3K storage config"
mkdir -p "$storagePath/Vita3K/ux0/app"
unlink "$romsPath/psvita/InstalledGames"
ln -s "$storagePath/Vita3K/ux0/app" "$romsPath/psvita/InstalledGames"
}
#WipeSettings
Vita3K_wipe(){
echo "Begin Vita3K delete config directories"
rm -rf "$HOME/.config/Vita3K"
}
#Uninstall
Vita3K_uninstall(){
echo "Begin Vita3K uninstall"
uninstallGeneric $Vita3K_emuName $Vita3K_emuPath "" "emulator"
}
#Migrate
Vita3K_migrate(){
echo "NYI"
}
#setABXYstyle
Vita3K_setABXYstyle(){
echo "NYI"
}
#WideScreenOn
Vita3K_wideScreenOn(){
echo "NYI"
}
#WideScreenOff
Vita3K_wideScreenOff(){
echo "NYI"
}
#BezelOn
Vita3K_bezelOn(){
echo "NYI"
}
#BezelOff
Vita3K_bezelOff(){
echo "NYI"
}
#finalExec - Extra stuff
Vita3K_finalize(){
echo "Begin Vita3K finalize"
}
Vita3K_IsInstalled(){
if [ -e "$Vita3K_emuPath/Vita3K" ]; then
echo "true"
else
echo "false"
fi
}
Vita3K_resetConfig(){
Vita3K_init &>/dev/null && echo "true" || echo "false"
}
Vita3K_setResolution(){
echo "NYI"
}
Vita3K_flushEmulatorLauncher(){
flushEmulatorLaunchers "vita3k"
}