Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Flash suport with Ruffle #966

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
817 changes: 817 additions & 0 deletions configs/steam-input/ruffle_controller_config.vdf

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions functions/EmuScripts/emuDeckRuffle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

#variables
Ruffle_emuName="Ruffle"
Ruffle_emuType="Binary"
Ruffle_emuPath="$HOME/Applications/ruffle"
Ruffle_file_name="ruffle-nightly-$(date +'%Y-%m-%d')-linux-x86_64.tar.gz"

#Install
Ruffle_install(){
echo "Begin Ruffle Install"
local showProgress="$1"

if installEmuBI "Ruffle" "https://github.com/ruffle-rs/ruffle/releases/download/nightly-$(date +'%Y-%m-%d')/$Ruffle_file_name" "Ruffle" "tar.gz" "$showProgress"; then
mkdir "$HOME/$Ruffle_emuPath"
tar -zxvf "$HOME/Applications/$Ruffle_file_name" -C "$HOME/Applications/ruffle" ruffle && rm -rf "$HOME/Applications/$Ruffle_file_name"
chmod +x "$Ruffle_emuPath/ruffle"
Ruffle_addSteamInputProfile
else
return 1
fi
}

Ruffle_addSteamInputProfile(){
rsync -r "$EMUDECKGIT/configs/steam-input/ruffle_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/"
}

#Uninstall
Ruffle_uninstall(){
echo "Begin Ruffle uninstall"
rm -rf "$HOME/Applications/ruffle" #Full path. Let's avoid a empty location while rm -rf
}

Ruffle_IsInstalled(){
if [ -e "$Ruffle_emuPath/ruffle" ]; then
echo "true"
else
echo "false"
fi
}
1 change: 1 addition & 0 deletions functions/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ source "$EMUDECKGIT"/functions/EmuScripts/emuDeckRMG.sh
source "$EMUDECKGIT"/functions/EmuScripts/emuDeckMelonDS.sh
source "$EMUDECKGIT"/functions/EmuScripts/emuDeckares.sh
source "$EMUDECKGIT"/functions/EmuScripts/emuDeckFlycast.sh
source "$EMUDECKGIT"/functions/EmuScripts/emuDeckRuffle.sh

#remoteplayclientscripts
source "$EMUDECKGIT"/functions/RemotePlayClientScripts/remotePlayChiaki.sh
Expand Down
2 changes: 2 additions & 0 deletions functions/helperFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ function createUpdateSettingsFile(){
#defaultSettingsList+=("doSetupMelon=true")
defaultSettingsList+=("doSetupMGBA=true")
defaultSettingsList+=("doSetupFlycast=true")
defaultSettingsList+=("doSetupRuffle=true")
defaultSettingsList+=("doInstallSRM=true")
defaultSettingsList+=("doInstallESDE=true")
defaultSettingsList+=("doInstallPegasus=false")
Expand All @@ -319,6 +320,7 @@ function createUpdateSettingsFile(){
#defaultSettingsList+=("doInstallMelon=false")
defaultSettingsList+=("doInstallMGBA=false")
defaultSettingsList+=("doInstallFlycast=true")
defaultSettingsList+=("doInstallRuffle=false")
defaultSettingsList+=("doInstallCHD=true")
defaultSettingsList+=("doInstallPowertools=false")
defaultSettingsList+=("doInstallGyro=false")
Expand Down
Binary file added icons/ruffle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ doSetupPCSX2QT=true
#doSetupMelon=true
doSetupMGBA=true
doSetupFlycast=true
doSetupRuffle=true

#Install all systems by default
doInstallSRM=true
Expand All @@ -50,6 +51,7 @@ doInstallMAME=true
#doInstallMelon=false
doInstallMGBA=false
doInstallFlycast=true
doInstallRuffle=false
doInstallCHD=false
doInstallPowertools=false
doInstallGyro=false
Expand Down
10 changes: 8 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ if [ "$doInstallXenia" == "true" ]; then
echo "Xenia_install"
Xenia_install
fi

if [ $doInstallRuffle == "true" ]; then
echo "Ruffle_install"
Ruffle_install
fi
#Steam RomManager Config

if [ "$doSetupSRM" == "true" ]; then
Expand Down Expand Up @@ -373,7 +376,10 @@ if [ "$doSetupXenia" == "true" ]; then
echo "Xenia_init"
Xenia_init
fi

if [ "$doSetupRuffle" == "true" ]; then
echo "Ruffle_init"
Ruffle_init
fi


#Fixes repeated Symlink for older installations
Expand Down
13 changes: 13 additions & 0 deletions tools/binupdate/binupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ function runBinDownloads {
messages+=("There was a problem updating RPCS3")
fi
fi
if [[ "$binsToDL" == *"ruffle"* ]]; then
((progresspct += pct)) || true
echo "$progresspct"
echo "# Updating Ruffle"
if Ruffle_install "true" 2>&1; then
messages+=("Ruffle Updated Successfully")
else
messages+=("There was a problem updating Ruffle")
fi
fi
echo "100"
echo "# Complete!"
}
Expand Down Expand Up @@ -248,6 +258,9 @@ fi
if [ "$(RPCS3_IsInstalled ""$emuDeckEmuTypeAppImage"")" == "true" ]; then
binTable+=(TRUE "PlayStation 3 Emu" "rpcs3")
fi
if [ "$(Ruffle_IsInstalled)" == "true" ]; then
binTable+=(TRUE "Flash Emu" "ruffle")
fi

if [ "${#binTable[@]}" -gt 0 ]; then
#Binary selector
Expand Down
12 changes: 12 additions & 0 deletions tools/launchers/ruffle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
source $HOME/.config/EmuDeck/backend/functions/all.sh
rclone_downloadEmu ruffle

emuName="ruffle" #parameterize me
emufolder="$HOME/Applications" # has to be applications for ES-DE to find it

#find full path to emu executable
exe=$(find $emufolder -iname "${emuName}" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null)

eval "${exe} $1"
rclone_uploadEmu ruffle
22 changes: 15 additions & 7 deletions uninstall.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ doUninstallVita3K=true
doUninstallXemu=true
doUninstallXenia=true
doUninstallYuzu=true
doUninstallRuffle=true



Expand Down Expand Up @@ -101,12 +102,13 @@ if [ "$doUninstall" == true ]; then
14 "RetroArch"\
15 "RMG" \
16 "RPCS3" \
17 "Ryujinx" \
18 "ScummVM" \
19 "Vita3K" \
20 "Xemu" \
21 "Xenia" \
22 "Yuzu" )
17 "Ruffle" \
18 "Ryujinx" \
19 "ScummVM" \
20 "Vita3K" \
21 "Xemu" \
22 "Xenia" \
23 "Yuzu" )

ans=$?
if [ $ans -eq 0 ]; then
Expand Down Expand Up @@ -153,6 +155,9 @@ if [ "$doUninstall" == true ]; then
if [[ "$emusToUninstall" == *"RetroArch"* ]]; then
doUninstallRA=false
fi
if [[ "$emusToUninstall" == *"Ruffle"* ]]; then
doUninstallRuffle=false
fi
if [[ "$emusToUninstall" == *"RPCS3"* ]]; then
doUninstallRPCS3=false
fi
Expand Down Expand Up @@ -264,6 +269,9 @@ if [ "$doUninstall" == true ]; then
rm -rf "$HOME/.cache/rpcs3" &>> /dev/null
rm -rf $HOME/.local/share/applications/RPCS3.desktop &>> /dev/null
fi
if [[ "$doUninstallRuffle" == true ]]; then
rm -rf $HOME/Applications/ruffle &>> /dev/null
fi
if [[ "$doUninstallRyujinx" == true ]]; then
rm -rf $HOME/.config/Ryujinx &>> /dev/null
rm -rf $HOME/Applications/publish &>> /dev/null
Expand Down Expand Up @@ -399,4 +407,4 @@ if [ "$doUninstall" == true ]; then

exit

fi
fi