Merge pull request #47 from Zoullx/fix-humble-login

Fix Humble App login
This commit is contained in:
Roy 2023-06-03 18:17:52 -07:00 committed by GitHub
commit 4e4eea01f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 4 deletions

View File

@ -1843,7 +1843,22 @@ if [[ $options == *"Humble Games Collection"* ]]; then
# User selected Humble Games Launcher # User selected Humble Games Launcher
echo "User selected Humble Games Collection" echo "User selected Humble Games Collection"
if [[ ! -f "$HOME/.local/share/applications/Humble-scheme-handler.desktop" ]]; then
wget https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/humble-app/Humble-scheme-handler.desktop -O /tmp/Humble-scheme-handler.desktop
sed -i "s/APPID/$appid/" /tmp/Humble-scheme-handler.desktop
desktop-file-install --rebuild-mime-info-cache --dir=$HOME/.local/share/applications /tmp/Humble-scheme-handler.desktop
rm -rf /tmp/Humble-scheme-handler.desktop
fi
if [[ ! -f "$HOME/.local/share/Steam/steamapps/compatdata/$appid/pfx/handle-humble-scheme" ]]; then
wget https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/humble-app/handle-humble-scheme -O "$HOME/.local/share/Steam/steamapps/compatdata/$appid/pfx/handle-humble-scheme"
sed -i "s/APPID/$appid/" "$HOME/.local/share/Steam/steamapps/compatdata/$appid/pfx/handle-humble-scheme"
chmod +x "$HOME/.local/share/Steam/steamapps/compatdata/$appid/pfx/handle-humble-scheme"
fi
if [[ ! -f "$HOME/.local/share/Steam/steamapps/compatdata/$appid/pfx/start-humble.cmd" ]]; then
wget https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/humble-app/start-humble.cmd -O "$HOME/.local/share/Steam/steamapps/compatdata/$appid/pfx/start-humble.cmd"
fi
if [[ ! -f "$humblegames_path1" ]] && [[ ! -f "$humblegames_path2" ]]; then if [[ ! -f "$humblegames_path1" ]] && [[ ! -f "$humblegames_path2" ]]; then
# Humble Games Launcher is not installed # Humble Games Launcher is not installed
@ -2150,11 +2165,11 @@ elif [[ -f "$legacygames_path2" ]]; then
fi fi
if [[ -f "$humblegames_path1" ]]; then if [[ -f "$humblegames_path1" ]]; then
# Humble Games Launcher is installed at path 1 # Humble Games Launcher is installed at path 1
humbleshortcutdirectory="\"$humblegames_path1\"" humbleshortcutdirectory="\"$HOME/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/start-humble.cmd\""
humblelaunchoptions="STEAM_COMPAT_DATA_PATH=\"$HOME/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" humblelaunchoptions="STEAM_COMPAT_DATA_PATH=\"$HOME/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$humblegames_path2" ]]; then elif [[ -f "$humblegames_path2" ]]; then
# Humble Games Launcher is installed at path 2 # Humble Games Launcher is installed at path 2
humbleshortcutdirectory="\"$humblegames_path2\"" humbleshortcutdirectory="\"$HOME/.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher/pfx/start-humble.cmd\""
humblelaunchoptions="STEAM_COMPAT_DATA_PATH=\"$HOME/.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher/\" %command%" humblelaunchoptions="STEAM_COMPAT_DATA_PATH=\"$HOME/.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher/\" %command%"
fi fi
if [[ -f "$indiegala_path1" ]]; then if [[ -f "$indiegala_path1" ]]; then

View File

@ -0,0 +1,6 @@
[Desktop Entry]
Name=Humble App (Login)
Comment=Target for handling Humble App logins. You should not run this manually.
Exec=/home/deck/.local/share/Steam/steamapps/compatdata/APPID/pfx/handle-humble-scheme %u
Type=Application
MimeType=x-scheme-handler/humble;

View File

@ -0,0 +1,11 @@
#!/usr/bin/env sh
set -e
export STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.local/share/Steam
export STEAM_COMPAT_DATA_PATH=~/.steam/steam/Steam/steamapps/compatdata/APPID
FIXED_SCHEME="$(echo "$1" | sed "s/?/\//")"
echo $FIXED_SCHEME > /home/deck/.local/share/Steam/steamapps/compatdata/APPID/pfx/drive_c/.auth
~/.steam/steam/steamapps/common/Proton\ -\ Experimental/proton run ~/.local/share/Steam/steamapps/compatdata/APPID/pfx/start-humble.cmd

View File

@ -0,0 +1,12 @@
@echo off
cd /d "C:\Program Files\Humble App\"
set /p Url=<"C:\.auth"
if defined Url (
start "" "Humble App.exe" "%Url%"
) else (
start "" "Humble App.exe" "%*"
)
exit