From 95ad2069083a15e7f5f48b8d0c012bb2a5d880d4 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 9 Nov 2022 17:40:47 +0000 Subject: [PATCH 01/10] Fix local install check on Steam Deck --- steamtinkerlaunch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 430993a7..0d1fea1f 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221108-1" +PROGVERS="v11.12.20221109-1" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -20953,7 +20953,6 @@ function main { touch "$PRELOG" mkProjDir "$LOGDIRID" setflatpak - setLocalInstall if [ "$INFLATPAK" -eq 1 ]; then USS="/app/share/steam" @@ -20987,6 +20986,8 @@ function main { saveOrgVars emptyVars "O" + setLocalInstall + # Notify success on Steam Deck # TODO check that this doesn't show success on regular run and close if [ "$ONSTEAMDECK" -eq 1 ] && [ "$STEAMDECKSTEAMRUN" -eq 0 ]; then From 891315b7db8b6890581811e50679ab28a6fe8320 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 9 Nov 2022 18:31:48 +0000 Subject: [PATCH 02/10] More work for #651 --- steamtinkerlaunch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 0d1fea1f..0b6befd0 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221109-1" +PROGVERS="v11.12.20221109-2" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -154,6 +154,7 @@ WDIB="wine-discord-ipc-bridge" FIXGAMESCOPE=0 SMALLDESK=0 VTX_DOTNET_ROOT="c:\\Program Files\\dotnet\\\\" +STLQUIET=0 ### default vars ### @@ -20982,12 +20983,11 @@ function main { fi steamdedeckt + setLocalInstall getCurrentCommandline "$@" saveOrgVars emptyVars "O" - setLocalInstall - # Notify success on Steam Deck # TODO check that this doesn't show success on regular run and close if [ "$ONSTEAMDECK" -eq 1 ] && [ "$STEAMDECKSTEAMRUN" -eq 0 ]; then From 555cdeb226af70927db128fb78a6c7bd94177875 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 9 Nov 2022 22:01:49 +0000 Subject: [PATCH 03/10] Always update Yad config entry on Steam Deck If SteamTinkerLaunch is installed, but the config folder goes missing, the Yad binary may not get set again since we don't call setYadBin again on Steam Deck. Force add the path to the Yad bin to the global config if Yad is found on Steam Deck. Should address #646 --- steamtinkerlaunch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 0b6befd0..8963676e 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221109-2" +PROGVERS="v11.12.20221110-1" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -20513,6 +20513,9 @@ function checkSteamDeckDependencies { if [ -f "$(command -v "yad")" ]; then writelog "INFO" "${FUNCNAME[0]} - Using yad binary found in path: '$(command -v "yad")'" echo "Dependency 'yad' already installed, nothing to do." + # Force update of global config file to add Yad path if it exists in $HOME/stl/deps/yad/bin + touch "$FUPDATE" + updateConfigEntry "YAD" "$( command -v "yad" )" "$STLDEFGLOBALCFG" else printf '\n' writelog "INFO" "${FUNCNAME[0]} - Using yad app image" From ce9b19611e6f930adb33a5c76ec7dc59999350cc Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Fri, 11 Nov 2022 21:52:22 +0000 Subject: [PATCH 04/10] Add HedgeModManager support --- collections/CheatEngine.conf | 1 - collections/GameConqueror.conf | 1 - .../template/SteamTinkerLaunch-HMM.conf | 3 + .../template/SteamTinkerLaunch-HMM.conf | 3 + lang/chinese.txt | 19 +- lang/dutch.txt | 19 +- lang/english.txt | 19 +- lang/englishUK.txt | 19 +- lang/french.txt | 19 +- lang/german.txt | 19 +- lang/italian.txt | 19 +- lang/polish.txt | 19 +- lang/russian.txt | 19 +- misc/hmmgames.txt | 7 + steamtinkerlaunch | 495 +++++++++++++++++- 15 files changed, 667 insertions(+), 14 deletions(-) delete mode 100644 collections/CheatEngine.conf delete mode 100644 collections/GameConqueror.conf create mode 100644 guicfgs/1920x1080/template/SteamTinkerLaunch-HMM.conf create mode 100644 guicfgs/3840x2160/template/SteamTinkerLaunch-HMM.conf create mode 100644 misc/hmmgames.txt diff --git a/collections/CheatEngine.conf b/collections/CheatEngine.conf deleted file mode 100644 index c7ade0bd..00000000 --- a/collections/CheatEngine.conf +++ /dev/null @@ -1 +0,0 @@ -RUN_CHEATENGINE="1" diff --git a/collections/GameConqueror.conf b/collections/GameConqueror.conf deleted file mode 100644 index b54d4076..00000000 --- a/collections/GameConqueror.conf +++ /dev/null @@ -1 +0,0 @@ -RUN_GAMCON="1" diff --git a/guicfgs/1920x1080/template/SteamTinkerLaunch-HMM.conf b/guicfgs/1920x1080/template/SteamTinkerLaunch-HMM.conf new file mode 100644 index 00000000..45a2a649 --- /dev/null +++ b/guicfgs/1920x1080/template/SteamTinkerLaunch-HMM.conf @@ -0,0 +1,3 @@ +WINX="1488" +WINY="830" +COLCOUNT="1" diff --git a/guicfgs/3840x2160/template/SteamTinkerLaunch-HMM.conf b/guicfgs/3840x2160/template/SteamTinkerLaunch-HMM.conf new file mode 100644 index 00000000..45a2a649 --- /dev/null +++ b/guicfgs/3840x2160/template/SteamTinkerLaunch-HMM.conf @@ -0,0 +1,3 @@ +WINX="1488" +WINY="830" +COLCOUNT="1" diff --git a/lang/chinese.txt b/lang/chinese.txt index f221fe02..08f4e802 100644 --- a/lang/chinese.txt +++ b/lang/chinese.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="工具选项" GUI_OPTSVR="VR选项" GUI_OPTSVORTEX="Vortex选项" GUI_OPTSWINE="Wine选项" +GUI_OPTSHMM="HedgeModManager 选项" GUI_HEADLINEFONT="标题大小" DESC_HEADLINEFONT="标题中使用的字体大小" NOTY_MISSDIR="目录'XXX'不存在,不能被创建" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="游戏屏幕分辨率" DESC_GAMESCREENRES="在游戏开始前将屏幕分辨率改为此值" GUI_MO2DLURL="Mod Organizer 2 网址" DESC_MO2DLURL="Mod Organizer 2的项目页面" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="没有找到当前或之前的游戏目录" GUI_GLOBALSTLGUIDIR="全局分辨率模板目录" DESC_GLOBALSTLGUIDIR="存放全局分辨率模板的路径" @@ -769,8 +772,14 @@ NOTY_INSTSTOP="'XXX'完成安装" GUI_OPTSMO2="Mod Organizer 2选项" GUI_MO2COMPDATA="Mod Organizer 2 compatdata" DESC_MO2COMPDATA="Mod Organizer 2安装的compatdata目录" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" GUI_USEMO2PROTON="Mod Organizer 2 Proton" DESC_USEMO2PROTON="用于Mod Organizer 2的Proton版本" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_MO2MODE="Mod Organizer 2模式" DESC_MO2MODE="Mod Organizer 2模式" BUT_MO2_GUI="Mo2 界面" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" diff --git a/lang/dutch.txt b/lang/dutch.txt index 590533db..53de6ed6 100644 --- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="Tools opties" GUI_OPTSVR="VR opties" GUI_OPTSVORTEX="Vortex opties" GUI_OPTSWINE="Wine opties" +GUI_OPTSHMM="HedgeModManager opties" GUI_HEADLINEFONT="Kopgrootte" DESC_HEADLINEFONT="De lettergrootte gebruikt in de koppen" NOTY_MISSDIR="Folder 'XXX' bestaat niet en kon niet worden aangemaakt" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="Game screen resolution" DESC_GAMESCREENRES="Change the screen resolution to this value before the game starts" GUI_MO2DLURL="Mod Organizer 2 URL" DESC_MO2DLURL="The project page of Mod Organizer 2" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="No current or previous game directory found" GUI_GLOBALSTLGUIDIR="Global resolution template directory" DESC_GLOBALSTLGUIDIR="Path where global resolution templates are stored" @@ -769,8 +772,14 @@ NOTY_INSTSTOP="Finished installation of 'XXX'" GUI_OPTSMO2="Mod Organizer 2 options" GUI_MO2COMPDATA="Mod Organizer 2 compatdata" DESC_MO2COMPDATA="The compatdata directory for the Mod Organizer 2 installation" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" GUI_USEMO2PROTON="Mod Organizer 2 Proton" DESC_USEMO2PROTON="The Proton version used for Mod Organizer 2" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_MO2MODE="Mod Organizer 2 mode" DESC_MO2MODE="Mod Organizer 2 mode" BUT_MO2_GUI="MO2 GUI" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" diff --git a/lang/english.txt b/lang/english.txt index 73f4f13f..37adbdfd 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="Tools options" GUI_OPTSVR="VR options" GUI_OPTSVORTEX="Vortex options" GUI_OPTSWINE="Wine options" +GUI_OPTSHMM="HedgeModManager options" GUI_HEADLINEFONT="Headline size" DESC_HEADLINEFONT="The font size used in the headlines" NOTY_MISSDIR="Directory 'XXX' does not exist and could not be created" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="Game screen resolution" DESC_GAMESCREENRES="Change the screen resolution to this value before the game starts" GUI_MO2DLURL="Mod Organizer 2 URL" DESC_MO2DLURL="The project page of Mod Organizer 2" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="No current or previous game directory found" GUI_GLOBALSTLGUIDIR="Global resolution template directory" DESC_GLOBALSTLGUIDIR="Path where global resolution templates are stored" @@ -769,6 +772,12 @@ NOTY_INSTSTOP="Finished installation of 'XXX'" GUI_OPTSMO2="Mod Organizer 2 options" GUI_MO2COMPDATA="Mod Organizer 2 compatdata" DESC_MO2COMPDATA="The compatdata directory for the Mod Organizer 2 installation" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_USEMO2PROTON="Mod Organizer 2 Proton" DESC_USEMO2PROTON="The Proton version used for Mod Organizer 2" GUI_MO2MODE="Mod Organizer 2 mode" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" diff --git a/lang/englishUK.txt b/lang/englishUK.txt index 059c32d4..dc2fe60a 100644 --- a/lang/englishUK.txt +++ b/lang/englishUK.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="Tools options" GUI_OPTSVR="VR options" GUI_OPTSVORTEX="Vortex options" GUI_OPTSWINE="Wine options" +GUI_OPTSHMM="HedgeModManager Options" GUI_HEADLINEFONT="Headline size" DESC_HEADLINEFONT="The font size used in the headlines" NOTY_MISSDIR="Directory 'XXX' does not exist and could not be created" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="Game screen resolution" DESC_GAMESCREENRES="Change the screen resolution to this value before the game starts" GUI_MO2DLURL="Mod Organizer 2 URL" DESC_MO2DLURL="The project page of Mod Organizer 2" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="No current or previous game directory found" GUI_GLOBALSTLGUIDIR="Global resolution template directory" DESC_GLOBALSTLGUIDIR="Path where global resolution templates are stored" @@ -769,8 +772,14 @@ NOTY_INSTSTOP="Finished installation of 'XXX'" GUI_OPTSMO2="Mod Organizer 2 options" GUI_MO2COMPDATA="Mod Organizer 2 compatdata" DESC_MO2COMPDATA="The compatdata directory for the Mod Organizer 2 installation" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" GUI_USEMO2PROTON="Mod Organizer 2 Proton" DESC_USEMO2PROTON="The Proton version used for Mod Organizer 2" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_MO2MODE="Mod Organizer 2 mode" DESC_MO2MODE="Mod Organizer 2 mode" BUT_MO2_GUI="MO2 GUI" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" diff --git a/lang/french.txt b/lang/french.txt index e8778903..eb07d9f6 100644 --- a/lang/french.txt +++ b/lang/french.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="Options des outils" GUI_OPTSVR="Options VR" GUI_OPTSVORTEX="Options de Vortex" GUI_OPTSWINE="Options de Wine" +GUI_OPTSHMM="Options de HedgeModManager" GUI_HEADLINEFONT="Taille des titres" DESC_HEADLINEFONT="La taille de la police utilisée dans les titres" NOTY_MISSDIR="Le répertoire 'XXX' n'existe pas et n'a pas pu être créé" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="Résolution d'écran du jeu" DESC_GAMESCREENRES="Modifier la résolution de l'écran pour cette valeur avant le début du jeu" GUI_MO2DLURL="URL de Mod Organizer 2" DESC_MO2DLURL="La page du projet Mod Organizer 2" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="Aucun répertoire de jeu actuel ou précédent n'a été trouvé" GUI_GLOBALSTLGUIDIR="Répertoire du template de résolution global" DESC_GLOBALSTLGUIDIR="Chemin où sont stockés les teplates de résolution globaux" @@ -769,8 +772,14 @@ NOTY_INSTSTOP="Installation de 'XXX' terminée" GUI_OPTSMO2="Options de Mod Organizer 2" GUI_MO2COMPDATA="Compatdata de Mod Organizer 2" DESC_MO2COMPDATA="Le répertoire compatdata pour l'installation de Mod Organizer 2" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" GUI_USEMO2PROTON="Mod Organizer 2 Proton" DESC_USEMO2PROTON="La version de Proton utilisée pour Mod Organizer 2" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_MO2MODE="Mode de Mod Organizer 2" DESC_MO2MODE="Mode de Mod Organizer 2" BUT_MO2_GUI="MO2 GUI" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" \ No newline at end of file diff --git a/lang/german.txt b/lang/german.txt index ee298117..c71fae9c 100644 --- a/lang/german.txt +++ b/lang/german.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="Tools Optionen" GUI_OPTSVR="VR Optionen" GUI_OPTSVORTEX="Vortex Optionen" GUI_OPTSWINE="Wine Optionen" +GUI_OPTSHMM="HedgeModManager Optionen" GUI_HEADLINEFONT="Überschriften Größe" DESC_HEADLINEFONT="Die für Überschriften verwendete Fontgröße" NOTY_MISSDIR="Das Verzeichnis 'XXX' existiert nicht und konnte auch nicht erstellt werden" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="Spiele Bildschirmauflösung" DESC_GAMESCREENRES="Ändere die Bildschirmauflösung auf diesen Wert bevor das Spiel startet" GUI_MO2DLURL="Mod Organizer 2 Url" DESC_MO2DLURL="The Projectpage of Mod Organizer 2" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="Kein aktuelles oder vorheriges Spieleverzeichnis gefunden" GUI_GLOBALSTLGUIDIR="Globaler Auflösungs Pfad" DESC_GLOBALSTLGUIDIR="Systemweiter Pfad zu den Auflösungs Vorlagen" @@ -770,7 +773,13 @@ GUI_OPTSMO2="Mod Organizer 2 Optionen" GUI_MO2COMPDATA="Mod Organizer 2 compatdata" DESC_MO2COMPDATA="Der compatdata Ordner für die Mod Organizer 2 installation" GUI_USEMO2PROTON="Mod Organizer 2 Proton" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" DESC_USEMO2PROTON="Proton Version für Mod Organizer 2" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_MO2MODE="Mod Organizer 2 Modus" DESC_MO2MODE="Mod Organizer 2 Modus" BUT_MO2_GUI="MO2 GUI" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" \ No newline at end of file diff --git a/lang/italian.txt b/lang/italian.txt index 055675c0..09fb3f7c 100644 --- a/lang/italian.txt +++ b/lang/italian.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="Strumenti per le opzioni" GUI_OPTSVR="VR Options" GUI_OPTSVORTEX="Opzioni di Vortex" GUI_OPTSWINE="Opzioni di Wine" +GUI_OPTSHMM="Opzioni di HedgeModManager" GUI_HEADLINEFONT="Grandezza titoli" DESC_HEADLINEFONT="La grandezza del testo usata nei titoli" NOTY_MISSDIR="La cartella 'XXX'non esiste e potrebbe non essere stata creata" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="Risoluzione dello schermo per il gioco" DESC_GAMESCREENRES="Imposta la risoluzione dello schermo a questo valore prima che il gioco parta" GUI_MO2DLURL="Mod Organizer 2 Url" DESC_MO2DLURL="The Projectpage of Mod Organizer 2" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="Nessuna corrente o precedente directory di gioco trovata" GUI_GLOBALSTLGUIDIR="dir con modelli globali di risoluzione" DESC_GLOBALSTLGUIDIR="Path dove sono salvati i modelli globali di risoluzione" @@ -769,6 +772,12 @@ NOTY_INSTSTART="Installing 'XXX'" NOTY_INSTSTOP="Installazione di 'XXX' completata" GUI_MO2COMPDATA="Mod Organizer 2 compatdata" DESC_MO2COMPDATA="Il compatdata per l'installazione Mod Organizer 2" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_USEMO2PROTON="Mod Organizer 2 Proton" DESC_USEMO2PROTON="Il binario di proton da usare per Mod Organizer 2" GUI_MO2MODE="Mod Organizer 2 mode" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" diff --git a/lang/polish.txt b/lang/polish.txt index c02838cd..aeb69d5e 100644 --- a/lang/polish.txt +++ b/lang/polish.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="Opcje narzędzi" GUI_OPTSVR="Opcje VR" GUI_OPTSVORTEX="Opcje Vortex" GUI_OPTSWINE="Opcje Wine" +GUI_OPTSHMM="Opcje HedgeModManager" GUI_HEADLINEFONT="Rozmiar nagłówka" DESC_HEADLINEFONT="Rozmiar czcionki używanty w nagłówkach" NOTY_MISSDIR="Katalog 'XXX' nie istnieje i nie może zostać utworzony" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="Rozdzielczość ekranu gry" DESC_GAMESCREENRES="Zmień rozdzielczość ekranu na tę wartość zanim gra się uruchomi" GUI_MO2DLURL="URL Mod Organizer 2" DESC_MO2DLURL="Strona projektu Mod Organizer 2" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="Nie znaleziono obecnego lub poprzedniego katalogu gry" GUI_GLOBALSTLGUIDIR="Katalog szablonu globalnej rozdzielczośći" DESC_GLOBALSTLGUIDIR="Ścieżka, gdzie szablony globalnej rozdzielczości są przechowywane" @@ -769,8 +772,14 @@ NOTY_INSTSTART="Instalacja 'XXX'" NOTY_INSTSTOP="Zakończono instalację 'XXX'" GUI_MO2COMPDATA="compatdata Mod Organizer 2" DESC_MO2COMPDATA="Katalog compatdata dla insalacji Mod Organizer 2" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" GUI_USEMO2PROTON="Mod Organizer 2 Proton" DESC_USEMO2PROTON="Wersja Protona używana dla Mod Organizer 2" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_MO2MODE="Tryb Mod Organizer 2" DESC_MO2MODE="Tryb Mod Organizer 2" BUT_MO2_GUI="MO2 GUI" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" \ No newline at end of file diff --git a/lang/russian.txt b/lang/russian.txt index 62ef194d..bcad866f 100644 --- a/lang/russian.txt +++ b/lang/russian.txt @@ -320,6 +320,7 @@ GUI_OPTSTOOLS="Tools Options" GUI_OPTSVR="VR Options" GUI_OPTSVORTEX="Vortex Options" GUI_OPTSWINE="Wine Options" +GUI_OPTSHMM="HedgeModManager Options" GUI_HEADLINEFONT="Headline Size" DESC_HEADLINEFONT="The Font Size used in the Headlines" NOTY_MISSDIR="Directory 'XXX' does not exist and could not be created" @@ -525,6 +526,8 @@ GUI_GAMESCREENRES="Game Screen Resolution" DESC_GAMESCREENRES="Change the Screen Resolution to this value before the game starts" GUI_MO2DLURL="Mod Organizer 2 Url" DESC_MO2DLURL="The Projectpage of Mod Organizer 2" +GUI_HMMDLURL="HedgeModManager URL" +DESC_HMMDLURL="The project page of HedgeModManager" NOTY_NOAIDNOPREV="No current or previous Game directory found" GUI_GLOBALSTLGUIDIR="Global resolution template dir" DESC_GLOBALSTLGUIDIR="Path where global resolution templates are stored" @@ -770,7 +773,13 @@ NOTY_INSTSTOP="Finished installation of 'XXX'" GUI_MO2COMPDATA="Mod Organizer 2 compatdata" DESC_MO2COMPDATA="compatdata для установки Mod Organizer 2" GUI_USEMO2PROTON="Mod Organizer 2 Proton" +GUI_HMMCOMPDATA="HedgeModManager compatdata" +DESC_HMMCOMPDATA="The compatdata directory for HedgeModManager to run inside of" DESC_USEMO2PROTON="Proton используемый для Mod Organizer 2" +GUI_USEHMMPROTON="HedgeModManager Proton" +DESC_USEHMMPROTON="The Proton version used to run HedgeModManager" +GUI_HMMDLVER="HedgeModManager Release Channel" +DESC_HMMDLVER="The HedgeModManager version to download" GUI_MO2MODE="Mod Organizer 2 mode" DESC_MO2MODE="Mod Organizer 2 mode" BUT_MO2_GUI="MO2 GUI" @@ -995,4 +1004,12 @@ BUT_RUNWINECFG="Run Winecfg" DESC_RUNWINECFG="Open Winecfg GUI for one time run (opens on top of this window)" BUT_RUNWINETRICKS="Run Winetricks" DESC_RUNWINETRICKS="Open Winetricks GUI for one time run (opens on top of this window)" -BUT_RUNONETIMECMD="RUN COMMAND" \ No newline at end of file +BUT_RUNONETIMECMD="RUN COMMAND" +NOTY_HMMDL="Downloading HedgeModManager 'XXX'" +NOTY_HMMUPDT="Updating HedgeModManager to 'XXX'" +NOTY_HMMINST="Installing HedgeModManager 'XXX'" +NOTY_HMMCONFIG="Configuring installed HedgeModManager games" +NOTY_HMMGAMCONFIG="Configuring HedgeModManager game 'XXX'" +NOTY_HMMGAMWINETRICKS="Applying extra tweaks for HedgeModManager game 'XXX' ('YYY')" +NOTY_HMMINSTFIN="Finished installing HedgeModManager" +NOTY_HMMSTART="Starting HedgeModManager XXX" diff --git a/misc/hmmgames.txt b/misc/hmmgames.txt new file mode 100644 index 00000000..93226f8b --- /dev/null +++ b/misc/hmmgames.txt @@ -0,0 +1,7 @@ +"Olympic Games Tokyo 2020 – The Official Video Game™";"981890";"64" +"Puyo Puyo™ Tetris® 2";"1259790";"64" +"Sonic Forces";"637100";"64" +"Sonic Frontiers";"1237320";"64" +"Sonic Generations";"71340";"32" +"Sonic Lost World";"329440";"32" +"Sonic Origins";"1794960";"64" diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 8963676e..cdf421e3 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221110-1" +PROGVERS="v11.12.20221112-1" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -251,6 +251,8 @@ USERTWEAKDIR="$TWEAKDIR/user" # the place for the users own main TWEAKCMDDIR="$TWEAKDIR/cmd" # dir for scriptfiles used by tweakfiles SBSTWEAKDIR="$TWEAKDIR/sbs" # directory for optional config overrides for easier side-by-side VR gaming MO2DLDIR="$STLDLDIR/mo2" +HMMDLDIR="$STLDLDIR/hedgemodmanager" +HMMVERFILE="$HMMDLDIR/hmmver.txt" CONTYDLDIR="$STLDLDIR/conty" X64DBGDLDIR="$STLDLDIR/$X64D" GEOELFDLDIR="$STLDLDIR/geo11" @@ -274,8 +276,12 @@ DOTN="dotnet" MO2="mo2" STLMO2DIR="$STLCFGDIR/$MO2" MO="ModOrganizer" +HMM="HedgeModManager" +HMMSTABLE="stable" +HMMDEV="nightly" MORDIR="$DRC/Modding" MOERPATH="$MORDIR/MO2/${MO}.exe" +STLHMMDIR="$STLCFGDIR/${HMM,,}" DOCS="Documents" MYDOCS="My $DOCS" MYGAMES="My Games" @@ -2546,6 +2552,7 @@ function setDefaultCfgValues { if [ -z "$STEAMGRIDDBAPI" ] ; then STEAMGRIDDBAPI="https://www.steamgriddb.com/api/v2/grids/steam";fi if [ -z "$CONTYRELURL" ] ; then CONTYRELURL="$GHURL/Kron4ek/Conty/releases"; fi if [ -z "$MO2PROJURL" ] ; then MO2PROJURL="$GHURL/ModOrganizer2/modorganizer"; fi + if [ -z "$HMMPROJURL" ] ; then HMMPROJURL="$GHURL/thesupersonic16/HedgeModManager"; fi if [ -z "$CW_KRON4EK" ] ; then CW_KRON4EK="$GHURL/Kron4ek/Wine-Builds/releases"; fi if [ -z "$IGCSZIP" ] ; then IGCSZIP="$GHURL/FransBouma/InjectableGenericCameraSystem/releases/download/IGCSInjector_102/IGCSInjector_v102.zip"; fi if [ -z "$UUUURL" ] ; then UUUURL="https://framedsc.github.io/GeneralGuides/universal_ue4_consoleunlocker.htm#downloading-the-uuu"; fi @@ -2616,7 +2623,6 @@ function setDefaultCfgValues { if [ -z "$AUTOPULLPROTON" ] ; then AUTOPULLPROTON="1"; fi if [ -z "$CUSTPROTDLDIR" ] ; then CUSTPROTDLDIR="$STLDLDIR/$PROCU"; fi if [ -z "$CUSTPROTEXTDIR" ] ; then CUSTPROTEXTDIR="$STLCFGDIR/$PROCU"; fi - if [ -z "$CUPROTOCOMPAT" ] ; then CUPROTOCOMPAT="0"; fi if [ -z "$WINEDLDIR" ] ; then WINEDLDIR="$STLDLDIR/wine"; fi if [ -z "$WINEEXTDIR" ] ; then WINEEXTDIR="$STLCFGDIR/wine"; fi if [ -z "$USEVORTEXPROTON" ] ; then USEVORTEXPROTON="$NON"; fi @@ -2645,7 +2651,10 @@ function setDefaultCfgValues { if [ -z "$DPRSPAUTOUP" ] ; then DPRSPAUTOUP="0"; fi if [ -z "$DEPSAUTOUP" ] ; then DEPSAUTOUP="0"; fi if [ -z "$MO2COMPDATA" ] ; then MO2COMPDATA="$STLMO2DIR/$CODA"; fi + if [ -z "$HMMCOMPDATA" ] ; then HMMCOMPDATA="$STLHMMDIR/$CODA"; fi + if [ -z "$HMMDLVER" ] ; then HMMDLVER="$HMMSTABLE"; fi if [ -z "$USEMO2PROTON" ] ; then USEMO2PROTON="$NON"; fi + if [ -z "$USEHMMPROTON" ] ; then USEHMMPROTON="$NON"; fi if [ -z "$USETERM" ] ; then USETERM="$(command -v "xterm")"; fi if [ -z "$TERMARGS" ] ; then TERMARGS="-e"; fi } @@ -2872,6 +2881,8 @@ function saveCfg { echo "CONTYRELURL=\"$CONTYRELURL\"" echo "## Mod Organizer 2 Project URL" echo "MO2PROJURL=\"$MO2PROJURL\"" + echo "## HedgeModManager Project URL" + echo "HMMPROJURL=\"$HMMPROJURL\"" echo "## $DPRS DL URL" echo "DPRSRELURL=\"$DPRSRELURL\"" echo "## $DEPS URL" @@ -3093,6 +3104,12 @@ function saveCfg { echo "MO2COMPDATA=\"$MO2COMPDATA\"" echo "## $DESC_USEMO2PROTON" echo "USEMO2PROTON=\"$USEMO2PROTON\"" + echo "## $DESC_HMMCOMPDATA" + echo "HMMCOMPDATA=\"$HMMCOMPDATA\"" + echo "## $DESC_USEHMMPROTON" + echo "USEHMMPROTON=\"$USEHMMPROTON\"" + echo "## $DESC_HMMDLVER" + echo "HMMDLVER=\"$HMMDLVER\"" echo "## $DESC_USETERM" echo "USETERM=\"$USETERM\"" echo "## $DESC_TERMARGS" @@ -4835,6 +4852,10 @@ function AllSettingsEntriesDummyFunction { --field=" $GUI_SGDBTYPES!$DESC_SGDBTYPES ('SGDBTYPES')":CBE "$(cleanDropDown "${SGDBTYPES/#-/ -}" "animated!static!animated,static!static,animated")" `#CAT_SteamGridDB` `#MENU_GLOBAL` \ --field=" $GUI_SGDBNSFW!$DESC_SGDBNSFW ('SGDBNSFW')":CBE "$(cleanDropDown "${SGDBNSFW/#-/ -}" "any!false!true")" `#CAT_SteamGridDB` `#MENU_GLOBAL` \ --field=" $GUI_SGDBHUMOR!$DESC_SGDBHUMOR ('SGDBHUMOR')":CBE "$(cleanDropDown "${SGDBHUMOR/#-/ -}" "any!false!true")" `#CAT_SteamGridDB` `#MENU_GLOBAL` \ +--field="$(spanFont "$GUI_OPTSHMM" "H")":LBL "SKIP" `#CAT_HMM` `#HEAD_HMM` `#MENU_GLOBAL` \ +--field=" $GUI_HMMDLVER!$DESC_HMMDLVER ('HMMDLVER')":CB "$(cleanDropDown "${HMMDLVER/#-/ -}" "$HMMSTABLE!$HMMDEV")" `#CAT_HMM` `#MENU_GLOBAL` \ +--field=" $GUI_HMMCOMPDATA!$DESC_HMMCOMPDATA ('HMMCOMPDATA')":DIR "${HMMCOMPDATA/#-/ -}" `#CAT_HMM` `#SUB_Directories` `#MENU_GLOBAL` \ +--field=" $GUI_USEHMMPROTON!$DESC_USEHMMPROTON ('USEHMMPROTON')":CB "$(cleanDropDown "${USEHMMPROTON/#-/ -}" "$PROTYADLIST")" `#CAT_HMM` `#MENU_GLOBAL` \ --field="$(spanFont "$GUI_OPTSMISC" "H")":LBL "SKIP" `#CAT_Misc` `#HEAD_Misc` `#MENU_GAME` `#MENU_GLOBAL` \ --field=" $GUI_USECUSTOMCMD!$DESC_USECUSTOMCMD ('USECUSTOMCMD')":CHK "${USECUSTOMCMD/#-/ -}" `#CAT_Misc` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_CUSTOMCMD!$DESC_CUSTOMCMD $GUI_ECHOPLAC ('CUSTOMCMD')":FL "${OPCUSTPATH/#-/ -}" `#CAT_Misc` `#MENU_GAME` \ @@ -5041,6 +5062,7 @@ function AllSettingsEntriesDummyFunction { --field=" $GUI_STEAMGRIDDBAPI!$DESC_STEAMGRIDDBAPI ('STEAMGRIDDBAPI')" "${STEAMGRIDDBAPI/#-/ -}" `#CAT_Urls` `#MENU_URL` \ --field=" $GUI_CONTYRELURL!$DESC_CONTYRELURL ('CONTYRELURL')" "${CONTYRELURL/#-/ -}" `#CAT_Urls` `#MENU_URL` \ --field=" $GUI_MO2DLURL!$DESC_MO2DLURL ('MO2PROJURL')" "${MO2PROJURL/#-/ -}" `#CAT_Urls` `#MENU_URL` \ +--field=" $GUI_HMMDLURL!$DESC_HMMDLURL ('HMMPROJURL')" "${HMMPROJURL/#-/ -}" `#CAT_Urls` `#MENU_URL` \ --field=" $GUI_DPRSRELURL!$DESC_DPRSRELURL ('DPRSRELURL')" "${DPRSRELURL/#-/ -}" `#CAT_Urls` `#MENU_URL` \ --field=" $GUI_DEPURL!$DESC_DEPURL ('DEPURL')" "${DEPURL/#-/ -}" `#CAT_Urls` `#MENU_URL` \ --field="$(spanFont "$GUI_OPTSVR" "H")":LBL "SKIP" `#CAT_VR` `#HEAD_VR` `#MENU_GAME` `#MENU_GLOBAL` \ @@ -12008,8 +12030,452 @@ function installDotNet { writelog "INFO" "${FUNCNAME[0]} - Stopped $DOTN$DNVER install - check $ILOG" } +function updateWineRegistryKey { + REGOP="$1" # i.e. "add", "delete" + REGPATH="$2" + REGVAL="$3" + WINEPFX="$4" + WINERUNCMD="$5" + + writelog "INFO" "${FUNCNAME[0]} - Removing key '$REGVAL' from '$REGPATH' using '$WINERUNCMD'" + WINEPREFIX="$WINEPFX" "$WINERUNCMD" reg "${REGOP}" "${REGPATH}" "/v" "${REGVAL}" "/f" +} + +### HMM BEGIN + +# NOTE: This was written with HMM in mind, but it may work generally too +# Returns the download URL to the latest GitHub actions build of a repository and the commit SHA it was built from separated by a comma +# +# EX: DefinitelyNotValve/HalfLife2EpisodeThree/suites/12345678/artifacts/87654321;0df23c5 +function fetchLatestGitHubActionsBuild { + PROJAPIURL="$1" + ARTIFACTNUM=$2 + + # /actions/runs + ARTIFACTRUNSRESP="$( curl -s "${PROJAPIURL}/actions/runs" | jq '.workflow_runs[0]' )" + ARTIFACTRUNSUITEID="$( echo "$ARTIFACTRUNSRESP" | jq '.check_suite_id' )" + LATESTARTIFACTURL="$( echo "$ARTIFACTRUNSRESP" | jq '.artifacts_url' | cut -d '"' -f 2 )" + + # /actions/runs//artifacts + LATESTARTIFACTRESP="$( curl -s "${LATESTARTIFACTURL}" | jq ".artifacts[${ARTIFACTNUM}]" )" + LATESTARTIFACTID="$( echo "$LATESTARTIFACTRESP" | jq ".id" )" + LATESTARTIFACTSHA="$( echo "$LATESTARTIFACTRESP" | jq ".workflow_run.head_sha" | cut -d '"' -f 2 )" + + ARTIFACTDLURL="suites/${ARTIFACTRUNSUITEID}/artifacts/${LATESTARTIFACTID}" + echo "${ARTIFACTDLURL};${LATESTARTIFACTSHA::7}" +} + +# HMM doesn't really have a "setup" exe, but MO2 and Vortex use this naming convention so... keeping it :-) +function getLatestHMMVer { + HMMSET="HedgeModManager" + + writelog "INFO" "${FUNCNAME[0]} - Searching for latest '$HMMSET' Release under '$HMMPROJURL'" + HMMSETUP="$( getLatestGitHubExeVer "HedgeModManager" "https://github.com/thesupersonic16/HedgeModManager" )" + if [ -n "$HMMSETUP" ]; then + writelog "INFO" "${FUNCNAME[0]} - Found '$HMMSETUP'" + else + writelog "ERROR" "${FUNCNAME[0]} - Could not find any '$HMMSET' Release" + fi +} + +function checkLatestHMM { + AVAILABLEHMMVER="$1" + HMMSPATH="$2" + + HMMUPDATEAVAILABLE=0 + + # Auto-update executable - May not be needed if HMM auto updater works + if [ -f "$HMMVERFILE" ]; then + CURRHMMVER="$( head -n 1 "$HMMVERFILE" )" + if [[ "$CURRHMMVER" = "$AVAILABLEHMMVER" ]]; then + writelog "INFO" "${FUNCNAME[0]} - Latest HedgeModManager already downloaded - Nothing to do" # Probably have to do a version check here later + echo "Latest HedgeModManager is already downloaded or was downloaded previously" + else + writelog "INFO" "${FUNCNAME[0]} - HedgeModManager update is available ($CURRHMMVER -> $AVAILABLEHMMVER) - Updating" + echo "HedgeModManager update is available ($CURRHMMVER -> $AVAILABLEHMMVER) - Updating" + if [ -f "$HMMSPATH" ]; then + rm "$HMMSPATH" + else + writelog "INFO" "${FUNCNAME[0]} - HedgeModManager executable doesn't exist - nothing to remove before updating" # Could happen if EXE is removed but version tracking file is not + echo "No existing HedgeModManager executable" + fi + HMMUPDATEAVAILABLE=1 + fi + else + writelog "INFO" "${FUNCNAME[0]} - No HedgeModManager version file found at '$HMMVERFILE' - Nothing to check, assuming we need to update" + echo "Could not get existing HedgeModManager version - Downloading latest '$AVAILABLEHMMVER'" + HMMUPDATEAVAILABLE=1 + fi +} + +function dlLatestHMM { + + function dlLatestHMMDev { + HMMARCHIVENAME="${HMM}-Release.zip" + HMMARCHIVEPATH="$HMMDLDIR/${HMMARCHIVENAME}" + + HMMSETUP="${HMM}.exe" + HMMSETUPBASE="$( basename "${HMMSETUP}" )" # Doing this in case "HMMSETUP" ever changes + HMMSPATH="$HMMDLDIR/$HMMSETUP" + + HMMUPDATEAVAILABLE=0 + + HMMAPIURLPATH="${HMMPROJURL//$GHURL}" + HMMLATESTDEV="${HMMPROJURL}/$( fetchLatestGitHubActionsBuild "${AGHURL}/repos${HMMAPIURLPATH}" 1 )" # Used to get the latest dev version SHA + HMMLATESTDEVURL="https://nightly.link${HMMAPIURLPATH}/workflows/build/rewrite/${HMMARCHIVENAME}" # Use nightly.link to get latest artifact download link for HMM + HMMVER="$( echo "$HMMLATESTDEV" | cut -d ";" -f 2 )" + + writelog "INFO" "${FUNCNAME[0]} - HedgeModManager artifact URL: '$HMMLATESTDEVURL' ($HMMVER)" + + checkLatestHMM "$HMMVER" "$HMMSPATH" + + mkProjDir "$HMMDLDIR" + if [ ! -f "$HMMSPATH" ] || [ "$HMMUPDATEAVAILABLE" -eq 1 ]; then + # No exe OR we need to update, check if we have the archive to extract it from + writelog "INFO" "${FUNCNAME[0]} - Either no HedgeModManager executable downloaded and extracted, or there is an update available - HMMUPDATEAVAILABLE is '${HMMUPDATEAVAILABLE}'" + if [ ! -f "$HMMARCHIVEPATH" ] || [ "$HMMUPDATEAVAILABLE" -eq 1 ]; then + # (No archive and no exe) or update available, download from GitHub + writelog "INFO" "${FUNCNAME[0]} - Either no HedgeModManager artifact present, or an update is available - HMMUPDATEAVAILABLE is '${HMMUPDATEAVAILABLE}'" + + # Download + writelog "INFO" "${FUNCNAME[0]} - Downloading latest HedgeModManager Development Artifact from URL '$HMMLATESTDEVURL'" + echo "Downloading latest HedgeModManager Development Artifact" + notiShow "$(strFix "$NOTY_HMMDL" "$HMMDLVER")" "X" + dlCheck "$HMMLATESTDEVURL" "$HMMARCHIVEPATH" "X" "Downloading latest HedgeModManager Development '$HMMVER'" &>/dev/null + else + # We have existing archive but no executable + writelog "INFO" "${FUNCNAME[0]} - Found existing and up-to-date HedgeModManager archive at '$HMMSPATH' - Extracting" + echo "Found up-to-date HedgeModManager Development release archive - Extracting " + fi + + # Extract + # Check if download success + if [ -f "$HMMARCHIVEPATH" ]; then + writelog "INFO" "${FUNCNAME[0]} - Downloaded latest HedgeModManager Artifact - Extracting archive at '$HMMARCHIVEPATH'" + echo "Extracting latest HedgeModManager Development Artifact" + "$UNZIP" -qo "$HMMARCHIVEPATH" -d "$HMMDLDIR" # Extract quiet and overwrite existing file if present without confirmation + + # If download sucess, try to extract + if [ -f "$HMMSPATH" ]; then + writelog "INFO" "${FUNCNAME[0]} - Successfully extracted HedgeModManager archive at '$HMMSPATH'" + echo "Successfully extracted HedgeModManager archive" + writelog "Info" "${FUNCNAME[0]} - Removing archive '$HMMARCHIVENAME' after successful extraction" + rm "$HMMARCHIVEPATH" + + echo "$HMMVER" > "$HMMVERFILE" # Update version on successfull download and extract + else + # Download failed + writelog "WARN" "${FUNCNAME[0]} - Failed to extract HedgeModManager archive at '$HMMSPATH'" + echo "Failed to extract HedgeModManager archive" + fi + else + # Download failed + writelog "WARN" "${FUNCNAME[0]} - Failed to download latest HedgeModManager Development archive ('$HMMVER') to '$( basename "$HMMSETUP" )'" + echo "Failed to download latest HedgeModManager development release archive" + fi + else + # We have executable - Nothing to do + writelog "INFO" "${FUNCNAME[0]} - Found existing and up-to-date HedgeModManager executable at '$HMMSPATH'" + echo "Found up-to-date HedgeModManager executable - Nothing to download" + fi + } + + # Download latest HedgeModManager stable release + function dlLatestHMMStable { + getLatestHMMVer + + # These values return the version URL from GitHub, so when we called "basename" we're getting the URL basename + # The format that comes back is something like /releases/7.8-2/HedgeModManager.exe + if [ -n "$HMMSETUP" ]; then + mkProjDir "$HMMDLDIR" + HMMSETUPBASE="$( basename "$HMMSETUP" )" + HMMVER="$( dirname "$HMMSETUP" )" + HMMVER="${HMMVER##*/}" + HMMSPATH="$HMMDLDIR/$HMMSETUPBASE" + + echo "Latest available version is '$HMMVER' - Checking to see if we are up-to-date" + checkLatestHMM "$HMMVER" "$HMMSPATH" + + if [ ! -f "$HMMSPATH" ] || [ "$HMMUPDATEAVAILABLE" -eq 1 ]; then + DLURL="${HMMPROJURL//"HedgeModManager"}$HMMSETUP" + writelog "INFO" "${FUNCNAME[0]} - Downloading '$HMMSETUPBASE' to '$( basename "$HMMDLDIR" )' from '$DLURL'" + echo "Downloading HedgeModManager ${HMMVER}" + notiShow "$(strFix "$NOTY_HMMDL" "$HMMVER")" "X" + dlCheck "$DLURL" "$HMMSPATH" "X" "Downloading HedgeModManager $HMMSETUP $HMMVER" &>/dev/null + if [ -f "$HMMSPATH" ]; then + writelog "INFO" "${FUNCNAME[0]} - Successfully downloaded HedgeModManager $HMMVER - continuing installation" + echo "Successfully downloaded HedgeModManager $HMMVER to '$( basename "$HMMSETUP" )'" + echo "$HMMVER" > "$HMMVERFILE" + else + writelog "ERROR" "${FUNCNAME[0]} - Failed to download HedgeModManager from '$DLURL'" + echo "Failed to download HedgeModManager" + fi + else + writelog "INFO" "${FUNCNAME[0]} - HedgeModManager executable already downloaded - Nothing to do" + echo "HedgeModManager is up-to-date" + fi + else + writelog "SKIP" "${FUNCNAME[0]} - No HMMSETUP defined - nothing to download - skipping" + echo "Could not find HedgeModManager release" + fi + } + + # Internet connection check + if ! ping -q -c1 github.com &>/dev/null; then + writelog "WARN" "${FUNCNAME[0]} - Looks like we're offline or GitHub is down, not attempting to download HedgeModManager when offline - May cause issues if no HMM exe is downloaded!" + writelog "WARN" "${FUNCNAME[0]} - Will still attempt to install Winetricks as they may be cached" + echo "WARNING: Can't reach GitHub - Not attempting to download HedgeModManager" + + return + fi + + DLVER="$1" + if [ -z "$DLVER" ]; then + writelog "INFO" "${FUNCNAME[0]} - No value passed for whether user wants stable or development HedgeModManager - Assuming they want stable!" + fi + writelog "INFO" "${FUNCNAME[0]} - User wants HedgeModManager '${DLVER:-stable}'" + + if [[ "$DLVER" = "$HMMDEV" ]]; then + # Get latest GitHub artifacts ver + writelog "INFO" "${FUNCNAME[0]} - Checking latest available HedgeModManager Development version" + echo "Checking latest available HedgeModManager Development version" + + dlLatestHMMDev + else + # If we don't pass dev, assume we want stable + writelog "INFO" "${FUNCNAME[0]} - Checking latest available HedgeModManager Release/Stable version" + echo "Checking latest available HedgeModManager Release version" + + dlLatestHMMStable + fi +} + +function setHMMVars { + # Set prefix path here + # Set exe path here + # Set Proton version here - If we use a custom HMMPROT we'll need to write that out into the config file + HMMPFX="${HMMCOMPDATA}/pfx" + if [ -z "$HMMEXE" ]; then + HMMEXE="$HMMDLDIR/${HMM}.exe" + fi + HMMGAMES="$GLOBALMISCDIR/hmmgames.txt" + if [ -z "$HMMWINE" ] || [ ! -f "$HMMWINE" ]; then + if [ "$USEHMMPROTON" == "$NON" ]; then + if [ ! -f "$PROTONCSV" ]; then + writelog "INFO" "${FUNCNAME[0]} - Looking for available Proton versions" + getAvailableProtonVersions "up" X + fi + + if ! grep -q "^GE" "$PROTONCSV"; then + autoBumpGE "X" + else + writelog "INFO" "${FUNCNAME[0]} - Seems like we have a GE-Proton version available already" + fi + + SETHMMPROT="$(grep "^GE" "$PROTONCSV" | sort -V | tail -n1)" + SETHMMPROT="${SETHMMPROT%%;*}" + USEHMMPROTON="$SETHMMPROT" + touch "$FUPDATE" + updateConfigEntry "USEHMMPROTON" "$USEHMMPROTON" "$STLDEFGLOBALCFG" + writelog "INFO" "${FUNCNAME[0]} - USEHMMPROT is '$NON', so using latest GE-Proton" + else + SETHMMPROT="$USEHMMPROTON" + fi + + writelog "INFO" "${FUNCNAME[0]} - Using $USEHMMPROTON for $HMM" + setModWine "SETHMMPROT" "HMMRUNPROT" "HMMWINE" + fi +} + +# Doesn't really "install" HMM, just creates the prefix for it if it doesn't already exist +# HMM's UI needs `dotnet48` to run and `d3dx9 vcrun2019 d3dcompiler_47` to render - we don't want to install this for every game, give HMM its own prefix to run in +# We can remove these if HMM ever works with Wine out of the box +function installHMM { + if [ -f "$HMMSPATH" ]; then + setHMMVars + if [ -f "$HMMEXE" ]; then + writelog "INFO" "${FUNCNAME[0]} - HedgeModManager executable found at '$HMMEXE' - Checking if we need to set up its Wine prefix" + if [ ! -d "$HMMCOMPDATA" ]; then + writelog "INFO" "${FUNCNAME[0]} - No existing HedgeModManager prefix found - Creating one" + echo "Installing HedgeModManager $HMMVER" + notiShow "$( strFix "$NOTY_HMMINST" "$HMMVER" )" "X" + mkProjDir "$HMMCOMPDATA/pfx" + + # Install dotnet48 + writelog "INFO" "${FUNCNAME[0]} - Installing dotnet48 for $HMM" + installDotNet "$HMMPFX" "$HMMWINE" "48" &>/dev/null + writelog "INFO" "${FUNCNAME[0]} - Done" + + # Setup prefix with Proton + touch "${HMMCOMPDATA}/tracked_files" + STEAM_COMPAT_CLIENT_INSTALL_PATH="$SROOT" STEAM_COMPAT_DATA_PATH="$HMMCOMPDATA" "$HMMRUNPROT" "run" 2> "$STLSHM/${FUNCNAME[0]}_protonrun.log" + + # Install other needed Winetricks + writelog "INFO" "${FUNCNAME[0]} - Installing 'd3dx9' 'vcrun2019' 'd3dcompiler_47' with '$HMMWINE' - These extra Winetricks are needed for HedgeModManager to run as well" + OGGPFX="$GPFX" + GPFX="$HMMPFX" + RUNWINE="$HMMWINE" + installWinetricksPaks "d3dx9 vcrun2019 d3dcompiler_47" "$HMMWINE" "extWine64Run" + GPFX="$OGGPFX" + writelog "INFO" "${FUNCNAME[0]} - Finished installing extra HedgeModManager winetricks" + + configureHMMPfxReg &>/dev/null + + writelog "INFO" "${FUNCNAME[0]} - Finished setting up HedgeModManager prefix" + echo "Successfully installed HedgeModManager $HMMVER" + notiShow "$NOTY_HMMINSTFIN" "X" + else + writelog "SKIP" "${FUNCNAME[0]} - HedgeModManager prefix already exists - Not recreating - Skipping installation" + + configureHMMPfxReg &>/dev/null # The registry configuration needed may change overtime and may not have been fully configured at installation + + echo "Finished installing HedgeModManager" + fi + else + writelog "ERROR" "${FUNCNAME[0]} - HedgeModManager '$HMMEXE' went missing - This should not happen!" + echo "HedgeModManager executable '$HMMEXE' went missing - This should not happen! You should open an issue about this." + fi + else + writelog "SKIP" "${FUNCNAME[0]} - '$HMMSPATH' not found - Nothing to install - skipping" + fi +} + +# Remove Steam reg keys - needed to get HMM to find games with our prefix +function configureHMMPfxReg { + writelog "INFO" "${FUNCNAME[0]} - Removing extra Steam registry keys from HedgeModManager prefix '$HMMPFX'" + + # Reg paths + HKLMSTEAM="HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam" + HKCUSTEAM="HKEY_CURRENT_USER\\Software\\Valve\\Steam" + KHCUSTEAMACTPRO="${HKCUSTEAM}\\ActiveProcess" + + # Reg values + STEXE="SteamExe" + STPA="SteamPath" + INSTPA="InstallPath" + STCLIDLL="SteamClientDll" + STCLIDLL64="SteamClientDll64" + + # HKEY_LOCAL_MACHINE + updateWineRegistryKey "delete" "$HKLMSTEAM" "$INSTPA" "$HMMPFX" "$HMMWINE" + + # KEY_CURRENT_USER + updateWineRegistryKey "delete" "$HKCUSTEAM" "$STEXE" "$HMMPFX" "$HMMWINE" + updateWineRegistryKey "delete" "$HKCUSTEAM" "$STPA" "$HMMPFX" "$HMMWINE" + + # ActiveProcess + updateWineRegistryKey "delete" "$KHCUSTEAMACTPRO" "$STPA" "$HMMPFX" "$HMMWINE" + updateWineRegistryKey "delete" "$KHCUSTEAMACTPRO" "$STCLIDLL" "$HMMPFX" "$HMMWINE" + updateWineRegistryKey "delete" "$KHCUSTEAMACTPRO" "$STCLIDLL64" "$HMMPFX" "$HMMWINE" + + writelog "INFO" "${FUNCNAME[0]} - Finished removing registry keys from HedgeModManager prefix" + + # TODO disable Proton light theme? +} + +# Game-specific Winetricks +function prepareHMMGameWinetricks { + HMMGTWEAKAID="$1" # Game AppID + HMMGINSTPFX="$2" # Prefix to install winetricks to (i.e. game prefix) + + # Set GPFX to game's prefix - Can't guarantee current GPFX will be the game's prefix so force it to ensure winetrick(s) are installed to the game's prefix and not HMM's prefix + OGGPFX="$GPFX" + GPFX="$HMMGINSTPFX" + case $HMMGTWEAKAID in + "71340") + writelog "INFO" "${FUNCNAME[0]} - AppID '$HMMGTWEAKAID' determined to be Sonic Generations" + + # Install d3d to Sonic Generations' prefix + writelog "INFO" "${FUNCNAME[0]} - Applying 'd3dcompiler_47' winetrick for Direct3D 11 mod support" + echo "Sonic Generations: Installing 'd3dcompiler_47' for Direct3D 11 mod support" + + RUNWINE="$RUNHMMWINE" + installWinetricksPaks "d3dcompiler_47" "$HMMWINE" "extWine64Run" &>/dev/null + writelog "INFO" "${FUNCNAME[0]} - Finished installing 'd3dcompiler47' for Sonic Generations" + ;; + esac + GPFX="$OGGPFX" +} + +# Install dotnet48 for every 64bit game +function prepareHMMGames { + setHMMVars + + # Get all hardcoded HMM supported games + writelog "INFO" "${FUNCNAME[0]} - Reading all hardcoded HedgeModManager supported games from '$HMMGAMES'" + echo "Setting up installed HedgeModManager compatible games" + notiShow "$NOTY_HMMCONFIG" "X" + while read -r HMMG; do + HMMGN="$( echo "$HMMG" | cut -d ";" -f 1 | cut -d '"' -f2 )" + HMMGAID="$( echo "$HMMG" | cut -d ";" -f 2 | cut -d '"' -f2 )" + HMMGARCH="$( echo "$HMMG" | cut -d ";" -f 3 | cut -d '"' -f2 )" + + HMMGAPPMA="$( listAppManifests | grep -m1 "${HMMGAID}.acf" )" + HMMGPFX="$( setGPfxFromAppMa "$HMMGAID" "$HMMGAPPMA" )" + + # If HMM game is 64bit, installed and has a compatdata dir, install dotnet48 for that game + if [[ "$HMMGARCH" = "64" ]]; then + GPFX="$HMMPFX" + + # Check if we have a valid compatdata for a game (pfx/drive_c/users/steamuser) + GPFXSTUS="$HMMGPFX/$DRCU/$STUS" + if [ -d "$GPFXSTUS" ]; then + writelog "INFO" "${FUNCNAME[0]} - Found compatdata dir for '$HMMGN' at '$GPFXSTUS' - Assuming it is installed" + + writelog "INFO" "${FUNCNAME[0]} - Install dotnet48 for install 64bit HedgeModManager game '$HMMGN'" + notiShow "$( strFix "$NOTY_HMMGAMCONFIG" "$HMMGN" )" "X" + echo "Running configuration for '$HMMGN'" + installDotNet "$HMMGPFX" "$HMMWINE" "48" &>/dev/null + writelog "INFO" "${FUNCNAME[0]} - Finished installing dotnet48 for '$HMMGN'" + else + writelog "SKIP" "${FUNCNAME[0]} - Could not find compatdata dir for '$HMMGN' - Assuming that it is not installed" + fi + else + writelog "SKIP" "${FUNCNAME[0]} - '$HMMGN' is 32bit, skipping" + fi + + writelog "INFO" "${FUNCNAME[0]} - Checking if we need to apply any game-specific tweaks to improve mod compatibility" + prepareHMMGameWinetricks "$HMMGAID" "$HMMGPFX" + done <$HMMGAMES + echo "Finished configuring installed HedgeModManager games" +} + +function startHMM { + # TODO: + # - Refine UI (add HMM button, etc) + # - Update lang strings + # - Add HMM Collection support + # - Test on Steam Deck + HMMDLVERARG="$1" + + # Add notifier + dlLatestHMM "$HMMDLVERARG" + installHMM + prepareHMMGames + + writelog "INFO" "${FUNCNAME[0]} - Starting HedgeModManager in prefix '$HMMPFX' with Wine '$HMMWINE' and using executable at '$HMMEXE'" + echo "Starting HedgeModManager" + notiShow "$( strFix "$NOTY_HMMSTART" "$HMMVER" )" "X" + + WINEDEBUG="-all" WINEPREFIX="$HMMPFX" "$HMMWINE" "$HMMEXE" &>/dev/null +} + +function listSupportedHMMGames { + # List HMM compatible games (taken from misc/hmmgames.txt), like: + # Game Name (appid) (architecture) + while read -r HMMGAME; do + HMMGAMENAME="$( echo "$HMMGAME" | cut -d ";" -f 1 | cut -d '"' -f2 )" + HMMGAMEAID="$( echo "$HMMGAME" | cut -d ";" -f 2 | cut -d '"' -f2 )" + HMMGAMEARCH="$( echo "$HMMGAME" | cut -d ";" -f 3 | cut -d '"' -f2 )" + + echo "$HMMGAMENAME ($HMMGAMEAID) ($HMMGAMEARCH-bit)" + done < "$GLOBALMISCDIR/hmmgames.txt" +} + +### HMM END + #### MO2 + Vortex #### -# NOTE: This was written with MO2 and Vortex in mind +# NOTE: This was written with MO2 and Vortex in mind (seems to also currently work for HMM) # It relies on projects having proper releases and tagging # It may need tweaking if this is used for other projects in future or might require an entirely new function function getLatestGitHubExeVer { @@ -17992,6 +18458,29 @@ function commandline { echo "need arg2" howto fi + elif [ "$1" == "hedgemodmanager" ] || [ "$1" == "hmm" ]; then + if [ -n "$2" ]; then + if [ -n "$3" ]; then + HMMDLVER="$3" + fi + + if [ "$2" == "download" ] || [ "$2" == "d" ]; then + dlLatestHMM "$HMMDLVER" + elif [ "$2" == "install" ] || [ "$2" == "i" ]; then + dlLatestHMM "$HMMDLVER" + installHMM + elif [ "$2" == "start" ] || [ "$2" == "s" ]; then + startHMM "$HMMDLVER" + elif [ "$2" == "list-supported" ] || [ "$2" == "ls" ]; then + listSupportedHMMGames + else + echo "Need to input a valid arg2 '$2' to run a HedgeModManager command" + howto + fi + else + writelog "INFO" "arg2 '$2' is no valid command" + howto + fi elif [ "$1" == "noty" ]; then if [ -n "$2" ]; then NTEXT="$2" From 27c3c6e53c2bb47375d2303fca35a24044590c0f Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Fri, 11 Nov 2022 22:14:40 +0000 Subject: [PATCH 05/10] Add HedgeModManager usage to help screen --- steamtinkerlaunch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index cdf421e3..b1c09f66 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221112-1" +PROGVERS="v11.12.20221112-2" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -18151,6 +18151,13 @@ function howto { echo " gettitle|gt Print the Game Title for " echo " getcompatdata|gc Print the Game compatdata path" echo " getgamedir|gg Print the Game dir" + echo " hedgemodmanager|hmm HedgeModManager" + echo " install|i install latest stable HedgeModManager" + echo " download|d download latest HedgeModManager release (stable or nightly)" + echo " defaults to stable" + echo " start|s start HedgeModManager" + echo " automatically downloads and installs latest stable if " + echo " is not provided" echo " steamdeckcompat Get information about Steam Deck compatibility for " echo " Will work offline if the information has been fetched before" echo " " From e69f02a4cb0b32e7d87b30fa8fcc639f3e4c0332 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sat, 12 Nov 2022 00:23:55 +0000 Subject: [PATCH 06/10] HMM: Fix wrong RUNWINE name Stopped Sonic Generations from correctly applying Winetricks --- steamtinkerlaunch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index b1c09f66..294d1ee5 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -12389,7 +12389,7 @@ function prepareHMMGameWinetricks { writelog "INFO" "${FUNCNAME[0]} - Applying 'd3dcompiler_47' winetrick for Direct3D 11 mod support" echo "Sonic Generations: Installing 'd3dcompiler_47' for Direct3D 11 mod support" - RUNWINE="$RUNHMMWINE" + RUNWINE="$HMMWINE" installWinetricksPaks "d3dcompiler_47" "$HMMWINE" "extWine64Run" &>/dev/null writelog "INFO" "${FUNCNAME[0]} - Finished installing 'd3dcompiler47' for Sonic Generations" ;; From 064b947ae24108608ba2d04b49577bd6c1e697f2 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sat, 12 Nov 2022 00:24:07 +0000 Subject: [PATCH 07/10] version bump --- steamtinkerlaunch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 294d1ee5..60409192 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221112-2" +PROGVERS="v11.12.20221112-4" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" From e89df4e51ed0f14137789cae1e661215fcc226cc Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sat, 12 Nov 2022 01:06:02 +0000 Subject: [PATCH 08/10] HMM: Only install Winetricks for installed games --- steamtinkerlaunch | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 60409192..7c9fd524 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221112-4" +PROGVERS="v11.12.20221112-5" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -12384,14 +12384,18 @@ function prepareHMMGameWinetricks { case $HMMGTWEAKAID in "71340") writelog "INFO" "${FUNCNAME[0]} - AppID '$HMMGTWEAKAID' determined to be Sonic Generations" - - # Install d3d to Sonic Generations' prefix - writelog "INFO" "${FUNCNAME[0]} - Applying 'd3dcompiler_47' winetrick for Direct3D 11 mod support" - echo "Sonic Generations: Installing 'd3dcompiler_47' for Direct3D 11 mod support" + GPFXSTUS="$HMMGPFX/$DRCU/$STUS" + if [ -d "$GPFXSTUS" ]; then + # Install d3d to Sonic Generations' prefix + writelog "INFO" "${FUNCNAME[0]} - Applying 'd3dcompiler_47' winetrick for Direct3D 11 mod support" + echo "Sonic Generations: Installing 'd3dcompiler_47' for Direct3D 11 mod support" - RUNWINE="$HMMWINE" - installWinetricksPaks "d3dcompiler_47" "$HMMWINE" "extWine64Run" &>/dev/null - writelog "INFO" "${FUNCNAME[0]} - Finished installing 'd3dcompiler47' for Sonic Generations" + RUNWINE="$HMMWINE" + installWinetricksPaks "d3dcompiler_47" "$HMMWINE" "extWine64Run" &>/dev/null + writelog "INFO" "${FUNCNAME[0]} - Finished installing 'd3dcompiler47' for Sonic Generations" + else + writelog "INFO" "${FUNCNAME[0]} - Seems like Sonic Generations is not installed - skipping" + fi ;; esac GPFX="$OGGPFX" From b731f7e4990dcfd6d96aabb4e4ea6ebe8f43a582 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sat, 12 Nov 2022 03:03:28 +0000 Subject: [PATCH 09/10] Add check for JQ installation before generating online Proton versions JQ is required for online Proton version checking. In future we could potentially remove the reliance on this and instead parse it with a different function --- steamtinkerlaunch | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 7c9fd524..08e5e5e9 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221112-5" +PROGVERS="v11.12.20221112-6" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -3763,23 +3763,28 @@ function dlCustomProton { } function createDLProtList { - writelog "INFO" "${FUNCNAME[0]} - Generating list of online available custom Proton builds" + if [ ! -x "$(command -v "$JQ")" ]; then + writelog "WARN" "${FUNCNAME[0]} - 'jq' is not installed - Can't generate list of online Proton versions" + else + writelog "INFO" "${FUNCNAME[0]} - Generating list of online available custom Proton builds" - PROTDLLIST="$STLSHM/ProtonDL.txt" - MAXAGE=360 + PROTDLLIST="$STLSHM/ProtonDL.txt" + MAXAGE=360 - if [ ! -f "$PROTDLLIST" ] || test "$(find "$PROTDLLIST" -mmin +"$MAXAGE")"; then - rm "$PROTDLLIST" 2>/dev/null - while read -r CPURL; do - if grep -q "$GHURL" <<< "${!CPURL}"; then - SRCURL="${!CPURL}" - SRCURL="${SRCURL//\/releases}" - SRCURL="${SRCURL//$GHURL/$AGHURL\/repos}" - SRCURL="${SRCURL}/releases" + if [ ! -f "$PROTDLLIST" ] || test "$(find "$PROTDLLIST" -mmin +"$MAXAGE")"; then + rm "$PROTDLLIST" 2>/dev/null + while read -r CPURL; do + if grep -q "$GHURL" <<< "${!CPURL}"; then + SRCURL="${!CPURL}" + SRCURL="${SRCURL//\/releases}" + SRCURL="${SRCURL//$GHURL/$AGHURL\/repos}" + SRCURL="${SRCURL}/releases" - "$WGET" -q "$SRCURL" -O - | jq -r '.[].assets[].browser_download_url' | grep "tar.gz\|tar.xz" | grep -v "Yad\|7.x" >> "$PROTDLLIST" - fi - done <<< "$(grep "^CP_" "$STLURLCFG" | cut -d '=' -f1)" + # Potentially rewrite to avoid reliance on jq? + "$WGET" -q "$SRCURL" -O - | jq -r '.[].assets[].browser_download_url' | grep "tar.gz\|tar.xz" | grep -v "Yad\|7.x" >> "$PROTDLLIST" + fi + done <<< "$(grep "^CP_" "$STLURLCFG" | cut -d '=' -f1)" + fi fi delEmptyFile "$PROTDLLIST" @@ -9687,12 +9692,12 @@ function StandaloneProtonGame { fi } -# TODO these both need work on Steam Deck to function +# TODO these both need work on Steam Deck to function' function oneTimeWinecfg { writelog "INFO" "${FUNCNAME[0]} - Running OneTime Winecfg" PROTWINECMD="${RUNPROTON//\"/}/bin/wine" - WINE="$PROTWINECMD" WINEPREFIX="$GPFX" "$PROTWINECMD" "${WINECFG}.exe" + WINE="$PROTWINECMD" WINEPREFIX="$GPFX" "$PROTWINECMD" "${WINECFG}.exe" # Maybe check if we're on Steam Deck and use Winetricks for this? Would also require Winetricks but we could fetch and install that } function oneTimeWinetricks { From 90c95b7a1bd5b449f13f894420ad8741ffef08b9 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sat, 12 Nov 2022 03:25:27 +0000 Subject: [PATCH 10/10] Remove useless Flatpak warning Does not work as Flatpak STL does not come with sh, and since users on Steam Deck (at least the ones that complain it doesn't work) almost certainly wont have Flatpak Steam installed, they won't be able to run the script at all and so it won't show up. --- steamtinkerlaunch | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 08e5e5e9..a338e8e8 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v11.12.20221112-6" +PROGVERS="v11.12.20221112-7" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -21110,24 +21110,6 @@ function steamdedeckt { if [ -f "/etc/os-release" ] && grep -q "steamdeck" "/etc/os-release"; then ONSTEAMDECK=1 - if [ "$INFLATPAK" -eq 1 ]; then - # Not sure if this will even work, not sure if the Flatpak can even do the Steam Deck probe check - writelog "ERROR" "${FUNCNAME[0]} - Looks like you're trying to install Flatpak SteamTinkerLaunch on Steam Deck - This is not the correct way to install SteamTinkerLaunch on Steam Deck." - writelog "ERROR" "${FUNCNAME[0]} - See the wiki for how to correctly install SteamTinkerLaunch on Steam Deck: https://github.com/sonic2kk/steamtinkerlaunch/wiki/Steam-Deck" - - echo "Looks like you're trying to install Flatpak SteamTinkerLaunch on Steam Deck - This is not the correct way to install SteamTinkerLaunch on Steam Deck." - echo "See the wiki for how to correctly install SteamTinkerLaunch on Steam Deck: https://github.com/sonic2kk/steamtinkerlaunch/wiki/Steam-Deck" - - # Also not sure if this will work, yad may not work - yad --title="Incorrect SteamTinkerLaunch Usage" --width=400 --form \ - --field="WARNING":LBL \ - --field="It looks like you're trying to use Flatpak SteamTinkerLaunch (downloaded from Discover) on Steam Deck.\n":LBL \ - --field="This is not the correct way to use SteamTinkerLaunch.\n":LBL \ - --field "Please visit the SteamTinkerLaunch Steam Deck wiki page for information on how to correctly install SteamTinkerLaunch.":LBL - - exit 1 - fi - export STEAMDECKWASUPDATE=0 export STEAMDECKDIDINSTALL=1 export STEAMDECKSTEAMRUN=0 # Stores if we're running STL when Steam opens on Steam Deck