Closed infirit closed 5 months ago
I'll admit the Linux branch has been a bit neglected, and should already have been updated to download stable versions. I'll work on this throughout the week.
I tested the dev branch today.
cp: kan status van '/meuk/7thHeaven/Resources/FF7_1.02_Eng_Patch/ff7.exe' niet opvragen: Bestand of map bestaat niet
? The folder only contains 7thWorkshop
, dxvk.conf
and 7th Heaven.sh
.7th Heaven.desktop
file is not created on the desktop so the chmod
command fails. The reason is very simple, I'm dutch and it's called Bureaublad
. You can use xdg-user-dir DESKTOP
to find it.The vdf file. libraryfolders.vdf.zip
kdialog was not installed anymore (don't ask me why) so the script failed. On the deck and plasma distributions it'll most likely but there are many distro's that don't. In the future it may be worth checking for kdialog
, zenity
or if all fails use dialog
.
Here are a couple suggestions to handle the xdg directories.
--- install.sh.orig 2025-01-20 16:47:27.351332029 +0100
+++ install.sh 2024-01-20 16:50:16.933699184 +0100
@@ -2,6 +2,9 @@
. deps/functions.sh
PROTON=$(LIBRARY=$(getSteamLibrary 1887720) && [ -n "$LIBRARY" ] && echo "$LIBRARY/steamapps/common/Proton 7.0/proton" || echo "NONE")
RUNTIME=$(LIBRARY=$(getSteamLibrary 1391110) && [ -n "$LIBRARY" ] && echo "$LIBRARY/steamapps/common/SteamLinuxRuntime_soldier/run" || echo "NONE")
+XDG_DESKTOP_DIR=$(xdg-user-dir DESKTOP)
+XDG_DATA_HOME="${XDG_DATA_HOME:=${HOME}/.local/share}"
+
[ ! -d "temp" ] && mkdir temp
echo "" > "7thDeck.log"
@@ -115,9 +118,9 @@
# Add shortcut to Desktop/Launcher
echo "Adding 7th Heaven to Desktop and Launcher"
xdg-icon-resource install deps/7th-heaven.png --size 64 --novendor
-mkdir -p "${HOME}/.local/share/applications" &>> "7thDeck.log"
+mkdir -p "${XDG_DATA_HOME}/applications" &>> "7thDeck.log"
# Launcher
-rm -r "${HOME}/.local/share/applications/7th Heaven.desktop" 2> /dev/null
+rm -r "${XDG_DATA_HOME}/applications/7th Heaven.desktop" 2> /dev/null
echo "#!/usr/bin/env xdg-open
[Desktop Entry]
Name=7th Heaven
@@ -127,10 +130,10 @@
Categories=Game;
Terminal=false
Type=Application
-StartupNotify=false" > "${HOME}/.local/share/applications/7th Heaven.desktop"
-chmod +x "${HOME}/.local/share/applications/7th Heaven.desktop"
+StartupNotify=false" > "${XDG_DATA_HOME}/applications/7th Heaven.desktop"
+chmod +x "${XDG_DATA_HOME}/applications/7th Heaven.desktop"
# Desktop
-rm -r "${HOME}/Desktop/7th Heaven.desktop" 2> /dev/null
+rm -r "${XDG_DESKTOP_DIR}/7th Heaven.desktop" 2> /dev/null
echo "#!/usr/bin/env xdg-open
[Desktop Entry]
Name=7th Heaven
@@ -140,23 +143,23 @@
Categories=Game;
Terminal=false
Type=Application
-StartupNotify=false" > "${HOME}/Desktop/7th Heaven.desktop"
-chmod +x "${HOME}/Desktop/7th Heaven.desktop"
-update-desktop-database ~/.local/share/applications &>> "7thDeck.log"
+StartupNotify=false" > "${XDG_DESKTOP_DIR}/7th Heaven.desktop"
+chmod +x "${XDG_DESKTOP_DIR}/7th Heaven.desktop"
+update-desktop-database ${XDG_DATA_HOME}/applications &>> "7thDeck.log"
echo
# Add launcher to Steam
echo "Adding 7th Heaven to Steam..."
-deps/steamos-add-to-steam "${HOME}/.local/share/applications/7th Heaven.desktop" &>> "7thDeck.log"
+deps/steamos-add-to-steam "${XDG_DATA_HOME}/applications/7th Heaven.desktop" &>> "7thDeck.log"
sleep 5
echo
# Force FF7 under Proton 7
echo "Forcing Final Fantasy VII to run under Proton 7.0"
pkill -9 steam
-cp ${HOME}/.local/share/Steam/config/config.vdf ${HOME}/.local/share/Steam/config/config.vdf.bak
+cp ${XDG_DATA_HOME}/Steam/config/config.vdf ${XDG_DATA_HOME}/Steam/config/config.vdf.bak
perl -0777 -i -pe 's/"CompatToolMapping"\n\s+{/"CompatToolMapping"\n\t\t\t\t{\n\t\t\t\t\t"39140"\n\t\t\t\t\t{\n\t\t\t\t\t\t"name"\t\t"proton_7"\n\t\t\t\t\t\t"config"\t\t""\n\t\t\t\t\t\t"priority"\t\t"250"\n\t\t\t\t\t}/gs' \
-${HOME}/.local/share/Steam/config/config.vdf
+${XDG_DATA_HOME}/Steam/config/config.vdf
# Thanks ChatGPT
nohup steam &> /dev/null &
echo
edit: and one that saves the installed to the user's cache directory.
--- functions.sh.orig 2025-01-20 17:36:50.520927743 +0100
+++ functions.sh 2024-01-20 17:33:42.510034158 +0100
@@ -18,6 +18,7 @@
# Download from GitHub
downloadDependency() {
+ local XDG_CACHE_HOME="${XDG_CACHE_HOME:=${HOME}/.cache}"
local REPO=$1
local FILTER=$2
local RETURN_VARIABLE=$3
@@ -27,7 +28,7 @@
| head -1 \
| cut -d : -f 2,3 \
| tr -d \")
- local FILENAME="temp/$(basename "$RELEASE_URL")"
+ local FILENAME="${XDG_CACHE_HOME}/$(basename "$RELEASE_URL")"
if [ -f "$FILENAME" ]; then
echo "$FILENAME is ready to be installed."
else
I didn't properly test the getSteamLibrary
function so I had to rewrite it. It should be fine now.
Thanks for your suggestions! I have applied them. Can you test the latest commits?
As mentioned on discord. I was able to get it to install by using a bottles to install vcredist and dotnet. Also opened #20 with a couple fixes.
Thanks for helping with making this work. It still has issues but apparently there are some issues with where I put my library. I'll keep playing on windows for now.
I tried the linux branch and these are the issues I ran into so far.