EmuDeck/install.sh
marianofalzone 9b967cd3a8
Added json for Petrophobia (#1373)
* fixes dolphin control issues

* Revert "fixes dolphin control issues"

This reverts commit 32945b947a0306418d563386cd6c0e17030cf6c4.

* dolphin for real

* versions

* forced citra

* Fix Cemu - No DSU

* GreemDev

* path fix

* Update emuDeckXenia.sh

* Update install.sh (#1369)

* fixes dolphin control issues

* Revert "fixes dolphin control issues"

This reverts commit 32945b947a0306418d563386cd6c0e17030cf6c4.

* dolphin for real

* versions

* forced citra

* Fix Cemu - No DSU

* GreemDev

* path fix

* Update install.sh

On Ubuntu 24.04.1 LTS is getting this error:

installing EmuDeck
[36436:1215/124135.236209:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_EmuDecSYLXPs/chrome-sandbox is owned by root and has mode 4755.

bash, linha 111: 36436 Trace/breakpoint trap   (imagem do núcleo gravada) ~/Applications/EmuDeck.AppImage $sandbox
Something went wrong!
Error at 111 NULL: ~/Applications/EmuDeck.AppImage $sandbox

I just add an verification for set sandbox to "--no-sandbox" and it works!

* Update install.sh

Update

---------

Co-authored-by: Dragoon Dorise <rodrigosedano@me.com>
# Conflicts:
#	install.sh

* fix prerequisites installation

# Conflicts:
#	install-early.sh
#	install-unstable.sh

* Added json for Petrophobia

---------

Co-authored-by: Dragoon Dorise <rodrigosedano@me.com>
Co-authored-by: Gabriel Cruz <48037228+gabrielpcruz@users.noreply.github.com>
2024-12-30 07:46:36 +01:00

112 lines
4.1 KiB
Bash

#!/bin/bash
linuxID=$(lsb_release -si)
sandbox=""
if [ $linuxID = "Ubuntu" ]; then
sandbox="--no-sandbox"
fi
clear
if [ "$linuxID" == "SteamOS" ]; then
echo "Installing EmuDeck"
else
zenityAvailable=$(command -v zenity &> /dev/null && echo true)
if [[ $zenityAvailable = true ]];then
read -r PASSWD <<< "$(zenity --password --title="Password Entry" --text="Enter you user sudo password to install required depencies" 2>/dev/null)"
echo "$PASSWD" | sudo -v -S
ans=$?
if [[ $ans == 1 ]]; then
#incorrect password
read -r PASSWD <<< "$(zenity --password --title="Password Entry" --text="Password was incorrect. Try again. (Did you remember to set a password for linux before running this?)" 2>/dev/null)"
echo "$PASSWD" | sudo -v -S
ans=$?
if [[ $ans == 1 ]]; then
text="$(printf "<b>Password not accepted.</b>\n Expert mode tools which require a password will not work. Disabling them.")"
zenity --error \
--title="EmuDeck" \
--width=400 \
--text="${text}" 2>/dev/null
setSetting doInstallPowertools false
setSetting doInstallGyro false
fi
fi
fi
SCRIPT_DIR=$( cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
function log_err {
echo "$@" >&2
}
function script_failure {
log_err "An error occurred:$([ -z "$1" ] && " on line $1" || "(unknown)")."
log_err "Installation failed!"
exit
}
#trap 'script_failure $LINENO' ERR
echo "Installing EmuDeck dependencies..."
if command -v apt-get >/dev/null; then
echo "Installing packages with apt..."
DEBIAN_DEPS="jq zenity flatpak unzip bash libfuse2 git rsync whiptail python"
sudo killall apt apt-get
sudo apt-get -y update
sudo apt-get -y install $DEBIAN_DEPS
elif command -v pacman >/dev/null; then
echo "Installing packages with pacman..."
ARCH_DEPS="steam jq zenity flatpak unzip bash fuse2 git rsync whiptail python"
sudo pacman --noconfirm -Syu
sudo pacman --noconfirm -S $ARCH_DEPS
elif command -v dnf >/dev/null; then
echo "Installing packages with dnf..."
FEDORA_DEPS="jq zenity flatpak unzip bash fuse git rsync newt python"
sudo dnf -y upgrade
sudo dnf -y install $FEDORA_DEPS
elif command -v zypper >/dev/null; then
echo "Installing packages with zypper..."
SUSE_DEPS="steam jq zenity flatpak unzip bash libfuse2 git rsync whiptail python"
sudo zypper --non-interactive up
sudo zypper --non-interactive install $SUSE_DEPS
elif command -v xbps-install >/dev/null; then
echo "Installing packages with xbps..."
VOID_DEPS="steam jq zenity flatpak unzip bash fuse git rsync whiptail python"
sudo xbps-install -Syu
sudo xbps-install -Sy $VOID_DEPS
else
log_err "Your Linux distro $linuxID is not supported by this script. We invite to open a PR or help us with adding your OS to this script. https://github.com/dragoonDorise/EmuDeck/issues"
exit 1
fi
# this could be replaced to immediately start the EmuDeck setup script
echo "All prerequisite packages have been installed. EmuDeck will be installed now!"
fi
set -eo pipefail
report_error() {
FAILURE="$(caller): ${BASH_COMMAND}"
echo "Something went wrong!"
echo "Error at ${FAILURE}"
}
trap report_error ERR
EMUDECK_GITHUB_URL="https://api.github.com/repos/EmuDeck/emudeck-electron/releases/latest"
EMUDECK_URL="$(curl -s ${EMUDECK_GITHUB_URL} | grep -E 'browser_download_url.*AppImage' | cut -d '"' -f 4)"
mkdir -p ~/Applications
curl -L "${EMUDECK_URL}" -o ~/Applications/EmuDeck.AppImage 2>&1 | stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zenity --progress --title "Downloading EmuDeck" --width 600 --auto-close --no-cancel 2>/dev/null
chmod +x ~/Applications/EmuDeck.AppImage
~/Applications/EmuDeck.AppImage $sandbox
exit