From 7dd0975be8ca513d11562f65de0ca39e23719f19 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 27 Dec 2023 00:59:36 +0000 Subject: [PATCH 1/4] ReShade: Add Toggle for Creating INI --- lang/english.txt | 2 ++ steamtinkerlaunch | 58 ++++++++++++++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/lang/english.txt b/lang/english.txt index aceaac2b..7742b96b 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -1273,3 +1273,5 @@ GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file on first install of ReShade -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 3a0a8552..46b3b5ca 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20231212-1" +PROGVERS="v14.0.20231227-1 (reshade-noini)" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -3170,6 +3170,7 @@ function setDefaultCfgValues { if [ -z "$USERESHADE" ] ; then USERESHADE="0"; fi if [ -z "$CUSTOMCMDRESHADE" ] ; then CUSTOMCMDRESHADE="0"; fi if [ -z "$RESHADEUPDATE" ] ; then RESHADEUPDATE="0"; fi + if [ -z "$CREATERESHINI" ] ; then CREATERESHINI="1"; fi if [ -z "$RSOVRD" ] ; then RSOVRD="0"; fi if [ -z "$RSOVRVERS" ] ; then RSOVRVERS="$RSVERS"; fi if [ -z "$RESHADEDLLNAME" ] ; then RESHADEDLLNAME="$DXGI"; fi @@ -3820,6 +3821,8 @@ function saveCfg { echo "CUSTOMCMDRESHADE=\"$CUSTOMCMDRESHADE\"" echo "## $DESC_RESHADEUPDATE" echo "RESHADEUPDATE=\"$RESHADEUPDATE\"" + echo "## $DESC_CREATERESHINI" + echo "CREATERESHINI=\"$CREATERESHINI\"" echo "## $DESC_RESHADEDLLNAME" echo "RESHADEDLLNAME=\"$RESHADEDLLNAME\"" echo "## $DESC_RESHADEOVERRIDETOGGLE" @@ -5682,6 +5685,7 @@ function AllSettingsEntriesDummyFunction { --field=" $GUI_CUSTOMCMDRESHADE!$DESC_CUSTOMCMDRESHADE ('CUSTOMCMDRESHADE')":CHK "${CUSTOMCMDRESHADE/#-/ -}" `#CAT_Shader` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_DOWNLOAD_RESHADE!$DESC_DOWNLOAD_RESHADE ('DOWNLOAD_RESHADE')":CHK "${DOWNLOAD_RESHADE/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#SUB_Checkbox` `#MENU_GLOBAL` \ --field=" $GUI_RESHADEUPDATE!$DESC_RESHADEUPDATE ('RESHADEUPDATE')":CHK "${RESHADEUPDATE/#-/ -}" `#CAT_Shader` `#SUB_Checkbox` `#MENU_GAME` \ +--field=" $GUI_CREATERESHINI!$DESC_CREATERESHINI ('CREATERESHINI')":CHK "${CREATERESHINI/#-/ -}" `#CAT_Shader` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_RESHADEOVERRIDETOGGLE!$DESC_RESHADEOVERRIDETOGGLE ('RSOVRD')":CHK "${RSOVRD/#-/ -}" `#CAT_Shader` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_RSVERS!$DESC_RSVERS ('RSVERS')" "${RSVERS/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#MENU_GLOBAL` \ --field=" $GUI_USERSSPEKVERS!$DESC_USERSSPEKVERS ('USERSSPEKVERS')":CHK "${USERSSPEKVERS/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#MENU_GLOBAL` \ @@ -9620,6 +9624,37 @@ function installReshadeForSpecialK { fi } +# Helper to create ReShade INI +function createReShadeINI { + if [ "$CREATERESHINI" -eq 0 ]; then + writelog "SKIP" "${FUNCNAME[0]} - ReShade INI creation is disabled (CREATERESHINI is '$CREATERESHINI') -- Skipping" + return + fi + + writelog "INFO" "${FUNCNAME[0]} - Creating ReShade INI file" + + if [ -f "$FRSINI" ]; then + if grep -q "EffectSearchPaths=.\$RSSUB\Shaders" "$FRSINI"; then + writelog "SKIP" "${FUNCNAME[0]} - Already have '$FRSINI' with default paths pointing to '$RSSUB'" + else + writelog "SKIP" "${FUNCNAME[0]} - Found a '$FRSINI' without default paths pointing to '$RSSUB' - not touching it" + fi + else + if [ -f "$FRSOINI" ] && grep -q "EffectSearchPaths=.*$RSSUB.*Shaders" "$FRSOINI"; then + writelog "INFO" "${FUNCNAME[0]} - Re-enabling previously disabled '$FRSOINI'" + mv "$FRSOINI" "$FRSINI" + else + writelog "INFO" "${FUNCNAME[0]} - Creating initial '$FRSINI' with default paths pointing to '$RSSUB'" + { + echo "[GENERAL]" + echo "EffectSearchPaths=.\\$RSSUB\Shaders" + echo "TextureSearchPaths=.\\$RSSUB\Textures" + echo "PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=1,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0" + } > "$FRSINI" + fi + fi +} + function checkReshade { setShadDestDir @@ -9655,26 +9690,7 @@ function checkReshade { fi if [ "$USERESHADE" -eq 1 ]; then - if [ -f "$FRSINI" ]; then - if grep -q "EffectSearchPaths=.\$RSSUB\Shaders" "$FRSINI"; then - writelog "SKIP" "${FUNCNAME[0]} - Already have '$FRSINI' with default paths pointing to '$RSSUB'" - else - writelog "SKIP" "${FUNCNAME[0]} - Found a '$FRSINI' without default paths pointing to '$RSSUB' - not touching it" - fi - else - if [ -f "$FRSOINI" ] && grep -q "EffectSearchPaths=.*$RSSUB.*Shaders" "$FRSOINI"; then - writelog "INFO" "${FUNCNAME[0]} - Re-enabling previously disabled '$FRSOINI'" - mv "$FRSOINI" "$FRSINI" - else - writelog "INFO" "${FUNCNAME[0]} - Creating initial '$FRSINI' with default paths pointing to '$RSSUB'" - { - echo "[GENERAL]" - echo "EffectSearchPaths=.\\$RSSUB\Shaders" - echo "TextureSearchPaths=.\\$RSSUB\Textures" - echo "PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=1,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0" - } > "$FRSINI" - fi - fi + createReShadeINI # EXPERIMENTALLY RE-ENABLED # NOTE that this has no ReShade updating or version override checks, so it is missing many features that regular ReShade has! From 49358831980e99e9822ae484e2bd6253cac2c439 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 27 Dec 2023 01:05:45 +0000 Subject: [PATCH 2/4] ReShade: Phrasing tweaks --- lang/english.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/english.txt b/lang/english.txt index 7742b96b..f550c5f5 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -1274,4 +1274,4 @@ DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" GUI_CREATERESHINI="Create ReShade INI" -DESC_CREATERESHINI="Disable creating the ReShade INI file on first install of ReShade -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" From bd6ff0b4c1169f8f822dd97466312c0b91e04216 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Thu, 4 Jan 2024 21:13:19 +0000 Subject: [PATCH 3/4] update langfiles --- lang/chinese.txt | 2 ++ lang/dutch.txt | 2 ++ lang/englishUK.txt | 2 ++ lang/french.txt | 2 ++ lang/german.txt | 2 ++ lang/italian.txt | 2 ++ lang/polish.txt | 2 ++ lang/russian.txt | 2 ++ 8 files changed, 16 insertions(+) diff --git a/lang/chinese.txt b/lang/chinese.txt index 23bea8eb..0993af2d 100644 --- a/lang/chinese.txt +++ b/lang/chinese.txt @@ -1274,3 +1274,5 @@ GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" diff --git a/lang/dutch.txt b/lang/dutch.txt index 6661d778..ba98d099 100644 --- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -1271,3 +1271,5 @@ NOTY_NOSTEXENOTFOUND="Error: Could not add Non-Steam Game -- Executable is not a NOTY_NOSTEXEBLANK="Error: Could not add Non-Steam Game -- Executable path was not provided" GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" diff --git a/lang/englishUK.txt b/lang/englishUK.txt index 943b1302..4b343561 100644 --- a/lang/englishUK.txt +++ b/lang/englishUK.txt @@ -1273,3 +1273,5 @@ GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" diff --git a/lang/french.txt b/lang/french.txt index ed125e12..d08503ab 100644 --- a/lang/french.txt +++ b/lang/french.txt @@ -1272,3 +1272,5 @@ GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" diff --git a/lang/german.txt b/lang/german.txt index f47a915a..c8e0a385 100644 --- a/lang/german.txt +++ b/lang/german.txt @@ -1275,3 +1275,5 @@ GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" diff --git a/lang/italian.txt b/lang/italian.txt index 8f202244..570c2a55 100644 --- a/lang/italian.txt +++ b/lang/italian.txt @@ -1273,3 +1273,5 @@ GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" diff --git a/lang/polish.txt b/lang/polish.txt index 57be9532..898e2ccc 100644 --- a/lang/polish.txt +++ b/lang/polish.txt @@ -1274,3 +1274,5 @@ GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" diff --git a/lang/russian.txt b/lang/russian.txt index 0982820e..59f66b8a 100644 --- a/lang/russian.txt +++ b/lang/russian.txt @@ -1273,3 +1273,5 @@ GUI_SPEKPROJURL="SpecialK URL" DESC_SPEKPROJURL="SpecialK GitHub Page URL, used for nightly builds" NOTY_USESPEKCUSTOMDLL="Using found custom SpecialK DLL(s)" NOTY_USESPEKCUSTOMEXE="Using custom SpecialK DLLs extracted from 'XXX'" +GUI_CREATERESHINI="Create ReShade INI" +DESC_CREATERESHINI="Disable creating the ReShade INI file when using ReShade on first install or if missing, will do nothing if ReShade is disabled -- This will NOT remove an existing ReShade INI, it will only avoid (re)creating it if one is not found" From c7474ab044b68be7d05b0f2edf7dd0123580389f Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Thu, 4 Jan 2024 21:14:06 +0000 Subject: [PATCH 4/4] version bump --- steamtinkerlaunch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 46b3b5ca..647e18d5 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20231227-1 (reshade-noini)" +PROGVERS="v14.0.20230105-1" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl"