mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2025-05-30 19:52:54 +00:00
* 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
61 lines
2.1 KiB
Bash
61 lines
2.1 KiB
Bash
#!/bin/bash
|
|
installEmuBI(){
|
|
local name="$1"
|
|
local url="$2"
|
|
local fileName="$3"
|
|
local format="$4"
|
|
local showProgress="$5"
|
|
local lastVerFile="$6"
|
|
local latestVer="$7"
|
|
|
|
if [[ -z "$fileName" ]]; then
|
|
fileName="$name"
|
|
fi
|
|
|
|
echo "1, Application Name: $name"
|
|
echo "2, Application URL: $url"
|
|
echo "3, Application Filename: $fileName"
|
|
echo "4, Application File Format: $format"
|
|
echo "5, Progress: $showProgress"
|
|
echo "6, Last Version File: $lastVerFile"
|
|
echo "7, Last Version: $latestVer"
|
|
|
|
#rm -f "$HOME/Applications/$fileName.$format" # mv below will overwrite...
|
|
mkdir -p "$HOME/Applications"
|
|
|
|
#curl -L "$url" -o "$HOME/Applications/$fileName.$format.temp" && mv "$HOME/Applications/$fileName.$format.temp" "$HOME/Applications/$fileName.$format"
|
|
if safeDownload "$name" "$url" "$HOME/Applications/${fileName}.${format}" "$showProgress"; then
|
|
if [[ -n $lastVerFile ]] && [[ -n $latestVer ]]; then
|
|
echo "latest version $latestVer > $lastVerFile"
|
|
echo "$latestVer" > "$lastVerFile"
|
|
fi
|
|
else
|
|
return 1
|
|
fi
|
|
|
|
shName=$(echo "$name" | awk '{print tolower($0)}')
|
|
mkdir -p "${romsPath}/emulators"
|
|
find "${toolsPath}/launchers/" "${romsPath}/emulators" -maxdepth 1 -type f \( -iname "$shName.sh" -o -iname "$shName-emu.sh" \) | \
|
|
while read -r f
|
|
do
|
|
echo "deleting $f"
|
|
rm -f "$f"
|
|
done
|
|
|
|
find "${EMUDECKGIT}/tools/launchers/" -type f -iname "$shName.sh" -o -type f -iname "$shName-emu.sh" | \
|
|
while read -r l
|
|
do
|
|
echo "deploying $l"
|
|
launcherFileName=$(basename "$l")
|
|
chmod +x "$l"
|
|
cp -v "$l" "${toolsPath}/launchers/"
|
|
chmod +x "${toolsPath}/launchers/"*
|
|
cp -v "$l" "${romsPath}/emulators"
|
|
chmod +x "${romsPath}/emulators/"*
|
|
|
|
createDesktopShortcut "$HOME/.local/share/applications/$name.desktop" \
|
|
"$name Binary" \
|
|
"${toolsPath}/launchers/$launcherFileName" \
|
|
"false"
|
|
done
|
|
} |