Skip to content
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6774ce0
feat: add steam to rsetup
RadxaPanda Jun 21, 2024
f5dfb9e
fix: add requirested changes
RadxaPanda Jun 21, 2024
728f67f
fix: curl with -Ls to follow 302 redirection
RadxaYuntian Jul 10, 2024
828adcd
fix: overwrite existing keyring
RadxaYuntian Jul 10, 2024
521b7e0
fix: use redirection as -o won't overwrite existing file
RadxaYuntian Jul 10, 2024
ba18f2e
refactor: wrap package list
RadxaYuntian Jul 10, 2024
617307f
refactor: move foreign arch setup to parent function
RadxaYuntian Jul 10, 2024
70c0c5b
fix: avoid GitHub API due to quota limit
RadxaYuntian Jul 10, 2024
64fa98d
fix: use HEAD instead GET to avoid data download
RadxaYuntian Jul 10, 2024
861365d
refactor: create run script directly in the final destination
RadxaYuntian Jul 11, 2024
0836e12
refactor: unpack steam.deb in a temp dir
RadxaYuntian Jul 11, 2024
2377b9a
refactor: use logname to get real user
RadxaYuntian Jul 11, 2024
94d9721
fix: remove duplicated set -e
RadxaYuntian Jul 11, 2024
e754cf0
refactor: replace cd with pushd/popd
RadxaYuntian Jul 11, 2024
a264dfe
fix: ensure wine install with correct file owner
RadxaYuntian Jul 11, 2024
2fc4ce1
fix: wine and steam not being able to launch
RadxaPanda Jul 15, 2024
e9c9610
fix: escape $HOME and $@ when creating executables for wine and steam
RadxaPanda Jul 15, 2024
b95ed9a
fix: add an ignore shellcheck option
RadxaPanda Jul 15, 2024
46f30b5
chore: use cat instead of echo for the steam executable
RadxaPanda Jul 16, 2024
5a4a751
chore: fix typo in the steam executable
RadxaPanda Jul 17, 2024
c17f096
chore: fix binfmtd
RadxaPanda Jul 17, 2024
e9f9456
feat: improve Steam installation prompt for devices without panthor
RadxaPanda Jul 18, 2024
428b93a
chore: fix uninstall so it doesnt remove every single package it finds
RadxaPanda Jul 25, 2024
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
27 changes: 21 additions & 6 deletions src/usr/lib/rsetup/cli/steam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ install_winex86() {
cat <<EOF > /usr/local/bin/wine
#!/bin/bash
#export GALLIUM_HUD=simple,fps
setarch linux32 -L box86 $HOME/wine/bin/wine "$@"
setarch linux32 -L box86 ~/wine/bin/wine "$@"
Comment thread
RadxaPanda marked this conversation as resolved.
Outdated
EOF
Comment thread
RadxaYuntian marked this conversation as resolved.
cat <<EOF > /usr/local/bin/wineserver
#!/bin/bash
box86 $HOME/wine/bin/wineserver "$@"
box86 ~/wine/bin/wineserver "$@"
EOF
cat <<EOF > /usr/local/bin/winetricks
#!/bin/bash
env BOX86_NOBANNER=1 box86 $HOME/wine/winetricks "$@"
env BOX86_NOBANNER=1 box86 ~/wine/winetricks "$@"
EOF
chmod +x /usr/local/bin/winetricks
chmod +x /usr/local/bin/wineserver
Expand All @@ -59,6 +59,12 @@ Icon=wine
box86 Exec=/usr/local/bin/wine explorer /desktop=shell,1280x720 explorer.exe
Categories=Game;
Terminal=false
EOF

cat <<EOF > /etc/binfmt.d/wine.conf
package wine
interpreter /usr/bin/wine
magic MZ
Comment thread
RadxaPanda marked this conversation as resolved.
Outdated
EOF

sudo -u "$(logname)" mkdir -p "${user_home}/wine/lib/"
Expand All @@ -76,7 +82,6 @@ EOF
# ln -s "${user_home}/wine/bin/winecfg" /usr/local/bin/winecfg
# ln -s "${user_home}/wine/bin/wineserver" /usr/local/bin/wineserver
rm -rf "$wine_pkg"
echo "Run wine winecfg to let wine configure itself"
}

# install_wine64() {
Expand Down Expand Up @@ -133,15 +138,22 @@ install_steam() {
export STEAMOS=1
export STEAM_RUNTIME=1
export DBUS_FATAL_WARNINGS=0
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
~/steam/bin/steam $@' > /usr/local/bin/steam

# .desktop file
sudo -u "$(logname)" mkdir -p "${user_home}/.local/share/applications/"
sed -i 's|/usr/bin/steam|/usr/local/bin/steam|' "${steam_dir}/lib/steam/steam.desktop"
cp "${steam_dir}/lib/steam/steam.desktop" "${user_home}/.local/share/applications/"

# make script executable
chmod +x /usr/local/bin/steam
apt-get install -y libc6:armhf libsdl2-2.0-0:armhf libsdl2-image-2.0-0:armhf \
libsdl2-mixer-2.0-0:armhf libsdl2-ttf-2.0-0:armhf libopenal1:armhf \
libpng16-16:armhf libfontconfig1:armhf libxcomposite1:armhf \
libbz2-1.0:armhf libxtst6:armhf libsm6:armhf libice6:armhf \
libxinerama1:armhf libxdamage1:armhf libdrm2:armhf libgbm1:armhf libibus-1.0-5
libxinerama1:armhf libxdamage1:armhf libdrm2:armhf libgbm1:armhf libibus-1.0-5 \
zenity libgl1:armhf libgl1-mesa-dri:armhf binfmt-support

}

Expand All @@ -163,6 +175,8 @@ uninstall_steam() {
rm -f /usr/local/bin/wine /usr/local/bin/wineserver /usr/local/bin/winetricks
rm -f "${user_home}/.local/share/applications/wine-config.desktop"
rm -f "${user_home}/.local/share/applications/wine-desktop.desktop"
rm -f "${user_home}/.local/share/applications/steam.desktop"
rm -f /etc/binfmt.d/wine.conf

# Remove Steam related files and directories
rm -rf "${user_home}/steam"
Expand All @@ -173,7 +187,8 @@ uninstall_steam() {
libsdl2-mixer-2.0-0:armhf libsdl2-ttf-2.0-0:armhf libopenal1:armhf \
libpng16-16:armhf libfontconfig1:armhf libxcomposite1:armhf \
libbz2-1.0:armhf libxtst6:armhf libsm6:armhf libice6:armhf \
libxinerama1:armhf libxdamage1:armhf libgbm1:armhf libdrm2:armhf
libxinerama1:armhf libxdamage1:armhf libdrm2:armhf libgbm1:armhf libibus-1.0-5 \
zenity libgl1:armhf libgl1-mesa-dri:armhf binfmt-support


# Remove armhf architecture
Expand Down