diff --git a/lang/chinese.txt b/lang/chinese.txt index c346b820..4a58a28c 100644 --- a/lang/chinese.txt +++ b/lang/chinese.txt @@ -1222,7 +1222,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1232,3 +1232,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/lang/dutch.txt b/lang/dutch.txt index 348c6f9b..2669373a 100644 --- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -1221,7 +1221,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1231,3 +1231,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/lang/english.txt b/lang/english.txt index b0dc4926..96fdc1ec 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -1222,7 +1222,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1232,3 +1232,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/lang/englishUK.txt b/lang/englishUK.txt index c3b6e087..38a988e3 100644 --- a/lang/englishUK.txt +++ b/lang/englishUK.txt @@ -1221,7 +1221,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1231,3 +1231,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/lang/french.txt b/lang/french.txt index 257cc5d8..ac64421b 100644 --- a/lang/french.txt +++ b/lang/french.txt @@ -1220,7 +1220,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1230,3 +1230,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/lang/german.txt b/lang/german.txt index 830bacd6..2a6ebcad 100644 --- a/lang/german.txt +++ b/lang/german.txt @@ -1223,7 +1223,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1233,3 +1233,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/lang/italian.txt b/lang/italian.txt index 4af04dfb..e2d7d9d7 100644 --- a/lang/italian.txt +++ b/lang/italian.txt @@ -1221,7 +1221,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1231,3 +1231,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/lang/polish.txt b/lang/polish.txt index 30b55fb5..4631b9ea 100644 --- a/lang/polish.txt +++ b/lang/polish.txt @@ -1221,7 +1221,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1231,3 +1231,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/lang/russian.txt b/lang/russian.txt index 697f8879..983fdcf7 100644 --- a/lang/russian.txt +++ b/lang/russian.txt @@ -1221,7 +1221,7 @@ GUI_PERGAMEWINEDPI="Wine DPI Scaling" DESC_PERGAMEWINEDPI="set a Wine DPI value for this game only, this will override any global Wine DPI value - Default is '96' as set by Wine" GUI_SPEKDLLNAME="SpecialK DLL Name" DESC_SPEKDLLNAME="Choose the name for the SpecialK DLL, default is 'auto' and chosen based on game renderer (if known) - Override to set specific DLL name for specific rendering backend or to avoid DLL name conflicts" -NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen XXX DLL name conflicts with the YYY DLL nme -- Not installing" +NOTY_SPEKRESHDLLCONFLICT="XXX is enabled and the chosen YYY DLL name conflicts with the XXX DLL name -- Not installing YYY" NOTY_SPEKDLLCONFLICT="SpecialK DLL name has unresolvable with existing DLL in game files -- Not installing" GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" @@ -1231,3 +1231,6 @@ GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" GUI_RSSPEKVERS="SpecialK ReShade Version Override" DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" +GUI_USERESHSPEKPLUGIN="Load ReShade as SpecialK Plugin" +DESC_USERESHSPEKPLUGIN="copy ReShade DLLs without renaming them and let SpecialK manage loading them - If disabled, ReShade will be loaded by the game instead of SpecialK and will IGNORE any Global SpecialK ReShade Override Version, which may be more desirable in some cases" +NOTY_RESHADEINSTALLING="Installing ReShade..." diff --git a/steamtinkerlaunch b/steamtinkerlaunch index d7a9bc60..8dbe4a79 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20230925-4" +PROGVERS="v14.0.20230926-1" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -2991,6 +2991,7 @@ function setDefaultCfgValues { if [ -z "$WAITMO2" ] ; then WAITMO2="2"; fi if [ -z "$USESPECIALK" ] ; then USESPECIALK="0"; fi if [ -z "$SPEKDLLNAME" ] ; then SPEKDLLNAME="$AUTO"; fi + if [ -z "$USERESHSPEKPLUGIN" ] ; then USERESHSPEKPLUGIN="1"; fi if [ -z "$SDLUSEWAYLAND" ] ; then SDLUSEWAYLAND="0"; fi if [ -z "$STLRAD_PFTST" ] ; then STLRAD_PFTST="none"; fi if [ -z "$SPEKVERS" ] ; then SPEKVERS="default"; fi @@ -3648,6 +3649,8 @@ function saveCfg { echo "USESPECIALK=\"$USESPECIALK\"" echo "## $DESC_SPEKDLLNAME" echo "SPEKDLLNAME=\"$SPEKDLLNAME\"" + echo "## $DESC_USERESHSPEKPLUGIN" + echo "USERESHSPEKPLUGIN=\"$USERESHSPEKPLUGIN\"" echo "## $DESC_SDLUSEWAYLAND" echo "SDLUSEWAYLAND=\"$SDLUSEWAYLAND\"" echo "## $DESC_STLRAD_PFTST" @@ -5279,6 +5282,7 @@ function AllSettingsEntriesDummyFunction { --field=" $GUI_USESPECIALK!$DESC_USESPECIALK ('USESPECIALK')":CHK "${USESPECIALK/#-/ -}" `#CAT_Proton` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_SPEKVERS!$DESC_SPEKVERS ('SPEKVERS')":CB "$(cleanDropDown "${SPEKVERS/#-/ -}" "default!$SPEKYADLIST")" `#CAT_Proton` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_SPEKDLLNAME!$DESC_SPEKDLLNAME ('SPEKDLLNAME')":CBE "$( cleanDropDown "${SPEKDLLNAME/#-/ -}" "$SPEKDLLNAMELIST" )" `#CAT_Proton` `#MENU_GAME` \ +--field=" $GUI_USERESHSPEKPLUGIN!$DESC_USERESHSPEKPLUGIN ('USERESHSPEKPLUGIN')":CHK "${USERESHSPEKPLUGIN/#-/ -}" `#CAT_Proton` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_AUTOSPEK!$DESC_AUTOSPEK ('AUTOSPEK')":CHK "${AUTOSPEK/#-/ -}" `#CAT_Proton` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_PROTON_LOG!$DESC_PROTON_LOG $HOME/steam-$AID.log ('PROTON_LOG')":CHK "${PROTON_LOG/#-/ -}" `#CAT_Proton` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_PROTON_LOG_DIR!$DESC_PROTON_LOG_DIR ('PROTON_LOG_DIR')":DIR "${PROTON_LOG_DIR/#-/ -}" `#CAT_Proton` `#SUB_Directories` `#MENU_GAME` \ @@ -8132,7 +8136,7 @@ function overrideReShadeVersion { else writelog "SKIP" "${FUNCNAME[0]} - '$RESH' Override version and '$RESH' global version match - Not overriding" fi - elif [ "$USESPECIALK" -eq 1 ] && [ "$USERESHADE" -eq 1 ] && [ "$USERSSPEKVERS" -eq 1 ]; then # Global Menu ReShade version to load when ReShade is loaded via SpecialK + elif [ "$USESPECIALK" -eq 1 ] && [ "$USERESHADE" -eq 1 ] && [ "$USERSSPEKVERS" -eq 1 ] && [ "$USERESHSPEKPLUGIN" -eq 1 ]; then # Global Menu ReShade version to load when ReShade is loaded via SpecialK writelog "INFO" "${FUNCNAME[0]} - Overriding global '$RESH' version '$RSVERS' with SpecialK ReShade version override '$RSSPEKVERS' as it is enabled and ReShade+SpecialK are enabled together" RSVERS="$RSSPEKVERS" else @@ -8722,20 +8726,15 @@ function installRSdll { # Manage creating backup if untracked DLL with our selected ReShade DLL name already exists at location # This function could be changed in future to take the path as a parameter as well, but that was not important at time of writing function manageDuplicateRSDLL { - if [ "$USESPECIALK" -eq 1 ] && [[ "$SPEKDLLNAME" == "$1" ]]; then - # If we call this function we assume there's a DLL conflict, and if SpecialK is enabled and its DLL name matches the conflicting DLL name, skip this DLL - writelog "WARN" "${FUNCNAME[0]} - SpecialK is enabled and its DLL name '$SPEKDLLNAME' appears to conflict with the selected ReShade DLL name '$1' -- Not overwriting SpecialK DLL with ReShade!" - else - writelog "WARN" "${FUNCNAME[0]} - DLL with name '$1' found in game dir '$INSTDESTDIR' but is not tracked by us - This is possibly a game/mod DLL" - writelog "WARN" "${FUNCNAME[0]} - Backing up DLL at '$INSTDESTDIR/$1' to '$INSTDESTDIR/${1}.bak' and moving our ReShade DLL anyway" - - if [ -f "$INSTDESTDIR/${1}.bak" ]; then - writelog "ERROR" "${FUNCNAME[0]} - ERROR: Back-up DLL name '${1}.bak' already exists -- This is probably a very bad thing!" - fi + writelog "WARN" "${FUNCNAME[0]} - DLL with name '$1' found in game dir '$INSTDESTDIR' but is not tracked by us - This is possibly a game/mod DLL" + writelog "WARN" "${FUNCNAME[0]} - Backing up DLL at '$INSTDESTDIR/$1' to '$INSTDESTDIR/${1}.bak' and moving our ReShade DLL anyway" - mv "$INSTDESTDIR/$1" "$INSTDESTDIR/${1}.bak" 2>/dev/null - cp "$RESHADESRCDIR/$RSVERS/$2" "$INSTDESTDIR/$1" >/dev/null 2>/dev/null + if [ -f "$INSTDESTDIR/${1}.bak" ]; then + writelog "ERROR" "${FUNCNAME[0]} - ERROR: Back-up DLL name '${1}.bak' already exists -- This is probably a very bad thing!" fi + + mv "$INSTDESTDIR/$1" "$INSTDESTDIR/${1}.bak" 2>/dev/null + cp "$RESHADESRCDIR/$RSVERS/$2" "$INSTDESTDIR/$1" >/dev/null 2>/dev/null } if [ ! -f "$INSTDESTDIR/$1" ] || [ "$1" == "F" ]; then @@ -8756,7 +8755,7 @@ function installRSdll { if [ "$RSDLLNAMECONFLICTFOUND" -eq 1 ]; then # DLL with name matching our ReShade DLL name exists, but was not installed by us (missing from ReShade.txt) - Backing up existing DLL and installing ReShade DLL anyway writelog "INFO" "${FUNCNAME[0]} - ReShade update is DISABLED" - writelog "INFO" "${FUNCNAME[0]} - Specified ReShade DLL name conflict detected!" + writelog "WARN" "${FUNCNAME[0]} - Specified ReShade DLL name conflict detected!" manageDuplicateRSDLL "$1" "$3" # 1 = target ReShade DLL name, 3 = ReShade DLL name from STL downloads folder to copy with the name specified in $1 else @@ -8821,6 +8820,7 @@ function installReshade { if [ -d "$INSTDESTDIR" ]; then # Get ReShade DLL names from comma separated list -- User will probably mostly only pass one, but this will handle cases where they might want multiple (ex: d3d9, opengl32) + RSDLLNAMEARR=() # Make sure the array of DLL names is always reset when installReshade is called, to avoid duplicate entries mapfile -d "," -t -O "${#RSDLLNAMEARR[@]}" RSDLLNAMEARR < <(printf '%s' "$RESHADEDLLNAME") for CUSTRSDLL in "${RSDLLNAMEARR[@]}"; do @@ -8834,12 +8834,12 @@ function installReshade { if [ "$(getArch "$CHARCH")" == "32" ]; then #32bit: writelog "INFO" "${FUNCNAME[0]} - Installing 32bit ${RESH} as '$CHARCH' is 32bit" - RSD3D47DLL="$D3D47_32" + # RSD3D47DLL="$D3D47_32" RSARCHDLL="$RS_32" elif [ "$(getArch "$CHARCH")" == "64" ]; then #64bit: writelog "INFO" "${FUNCNAME[0]} - Installing 64bit ${RESH} as '$CHARCH' is 64bit" - RSD3D47DLL="$D3D47_64" + # RSD3D47DLL="$D3D47_64" RSARCHDLL="$RS_64" else #feelsbad.jpg: @@ -8849,30 +8849,53 @@ function installReshade { # Common conditional to install either 32bit/64bit ReShade DLLs, since process is same, just different DLL names # USESPECIALK check needed because we can't use custom DLL names when using SpecialK -- It expects the raw ReShade32/ReShade64 DLL names - if [ "$USERESHADE" -eq 1 ] && [ "$USESPECIALK" -eq 0 ]; then - #d3d47 - Required for ReShade - # NOTE 25/08/23: *Is* it still required? - installd3d47dll "$D3D47_32" "$RSD3D47DLL" + # + # Only install ReShade "normally" if (ReShade is on and SpecialK is off) or (if ReShade+SpecialK are on and ReShade SpecialK Plugin is disabled) + if [[ ( "$USERESHADE" -eq 1 && "$USESPECIALK" -eq 0 ) || ( "$USERESHADE" -eq 1 && "$USESPECIALK" -eq 1 && "$USERESHSPEKPLUGIN" -eq 0 ) ]]; then + # Check to make sure none of our ReShade names conflict with SpecialK -- This will abort install, and is the only place we need to abort install + if [ "$USESPECIALK" -eq 1 ] && [ "$USERESHSPEKPLUGIN" -eq 0 ]; then + getSpecialKGameRenderApi + SPEKREALDLLNAME="$( basename "$SPEKDST" )" + for CUSTRSDLL in "${RSDLLNAMEARR[@]}"; do + if [[ "$CUSTRSDLL" = "$SPEKREALDLLNAME" ]] && [ -f "$SPEKREALDLLNAME" ] && [ ! -f "$INSTDESTDIR/$RSTXT" ]; then + # If our ReShade DLL matches the chosen SpecialK DLL name, if the SpecialK DLL is already in the game files, and if it's not a ReShade DLL (i.e. RSTXT doesn't exist), assume we have a SpecialK conflict + # If ReShade+SpecialK are installed fresh at the same time, ReShade is installed early, and this logic prevents logging that ReShade won't be installed because it conflicts with SpecialK + # Which is incorrect because it's detecting our installed ReShade DLLs as SpecialK DLLs + writelog "ERROR" "${FUNCNAME[0]} - SpecialK is enabled and the chosen ReShade DLL name conflicts with the SpecialK DLL name -- Not installing ReShade" + notiShow "$( strFix "$NOTY_SPEKRESHDLLCONFLICT" "$SPEK" "$RESH" )" + + return + fi + done + fi # actual ReShade DLL name (either d3d9/d3d11/dxgi, or a custom user selected name) + notiShow "$NOTY_RESHADEINSTALLING" for CUSTRSDLL in "${RSDLLNAMEARR[@]}"; do installRSdll "$CUSTRSDLL" "0" "$RSARCHDLL" done + ## TODO add notifier for ReShade install, like we have for SpecialK + + #d3d47 - Required for ReShade + # NOTE 25/08/23: *Is* it still required? + # installd3d47dll "$D3D47_32" "$RSD3D47DLL" + # Rewrite the ReShade TXT file to ensure it only has our installed ReShade DLLs if [ -f "$RSTXT" ]; then rm "$RSTXT" fi # Add d3dcompiler_47 and custom ReShade DLL names, removing any non-ReShade DLLs (ensures previously entered DLL names get removed and not incorrectly tracked as ReShade DLLs) - appendToRSTXT "$D3D47" + # appendToRSTXT "$D3D47" for CUSTRSDLL in "${RSDLLNAMEARR[@]}"; do writelog "INFO" "${FUNCNAME[0]} - Writing '$CUSTRSDLL' to '$RSTXT'" appendToRSTXT "$CUSTRSDLL" done else - if [ "$USESPECIALK" -eq 1 ]; then - writelog "SKIP" "${FUNCNAME[0]} - USERESHADE and USESPECIALK are enabled together, skipping custom ReShade DLL name as SpecialK needs specific ReShade DLL names" + if [ "$USERESHADE" -eq 1 ] && [ "$USESPECIALK" -eq 1 ]; then + # End here, as ReShade Installation code will be handled by SpecialK + writelog "SKIP" "${FUNCNAME[0]} - USERESHADE and USESPECIALK are enabled together, and ReShade is being used as a Plugin, skipping custom ReShade DLL name as SpecialK needs specific ReShade DLL names" fi fi @@ -8889,6 +8912,25 @@ function installReshade { fi } +# Remove ReShade files (i.e. to replace with SpecialK) +# Use later +function removeReShadeInstallation { + while read -r RSDLLREMOVEFILE; do + RSDLLREMOVEPATH="${INSTDESTDIR}/$RSDLLREMOVEFILE" + if [ -f "$RSDLLREMOVEPATH" ]; then + rm "$RSDLLREMOVEPATH" + fi + done < "$INSTDESTDIR/$RSTXT" + + if [ -f "$INSTDESTDIR/$RSINI" ]; then + rm "$INSTDESTDIR/$RSINI" + fi + + if [ -f "$INSTDESTDIR/$RSTXT" ]; then + rm "$INSTDESTDIR/$RSTXT" + fi +} + function installDepth3DReshade { SHADERPOOL="depth3d" @@ -8992,7 +9034,7 @@ function checkReshade { # EXPERIMENTALLY RE-ENABLED # NOTE that this has no ReShade updating or version override checks, so it is missing many features that regular ReShade has! - if [ "$USESPECIALK" -eq 1 ]; then + if [ "$USESPECIALK" -eq 1 ] && [ "$USERESHSPEKPLUGIN" -eq 1 ]; then writelog "WARN" "${FUNCNAME[0]} - Both '$SPEK' and '$RESH' are enabled." "E" writelog "WARN" "${FUNCNAME[0]} - This has historically caused crashes, but has been experimentally re-enabled!" writelog "WARN" "${FUNCNAME[0]} - Manual intervention may be required to fix crashes, such as renaming the SpecialK DLL to fix the SpecialK UI, or running dos2unix on INI files to fix crashes" @@ -9024,8 +9066,8 @@ function checkReshade { installReshade F fi - writelog "INFO" "${FUNCNAME[0]} - Setting WINEDLLOVERRIDES for ${RESH}: dxgi=n,b;d3d9=n,b;${D3D47//.dll}=n,b;opengl32=n,b" - export WINEDLLOVERRIDES="$WINEDLLOVERRIDES;dxgi=n,b;d3d9=n,b;${D3D47//.dll}=n,b;opengl32=n,b" + writelog "INFO" "${FUNCNAME[0]} - Setting WINEDLLOVERRIDES for ${RESH}: dxgi=n,b;d3d9=n,b;${D3D47//.dll}=n,b;d3d11=n,b;opengl32=n,b" + export WINEDLLOVERRIDES="$WINEDLLOVERRIDES;dxgi=n,b;d3d9=n,b;${D3D47//.dll}=n,b;d3d11=n,b;opengl32=n,b" fi else if [ -f "$FRSINI" ]; then @@ -9044,7 +9086,7 @@ function checkReshade { done < "$RSLIST" mv "$RSLIST" "$RSOLIST" fi - + if [ "$USESPECIALK" -eq 0 ]; then if [ -f "$SHADDESTDIR/$RS_DX_DEST" ] && grep -q "$RESH" "$SHADDESTDIR/$RS_DX_DEST"; then writelog "WARN" "${FUNCNAME[0]} - Found unknown '$RESH' dll '$RS_DX_DEST' in '$SHADDESTDIR'" @@ -9253,22 +9295,25 @@ function useSpecialK { SPEKDLLCONFLICTFOUND=0 SHOULDINSTALLSPEK=1 - # TODO this is a freaking mess... PR to simplify welcome! - if [ "$USERESHADE" -eq 1 ] && [ -f "$SPEKDDIR/$RSTXT" ]; then + if [ "$USERESHADE" -eq 1 ] && [ -f "$SPEKDDIR/$RSTXT" ] && [ "$USERESHSPEKPLUGIN" -eq 0 ]; then ## ReShade is already installed and in use, and ReShade+SpecialK have selected DLL names conflict ## Check each entered ReShade DLL name and see if any conflict with the entered SpecialK DLL name - mapfile -d "," -t -O "${#SPEKRSDLLNAMECHECKARR[@]}" RSDLLNAMEARR < <(printf '%s' "$RESHADEDLLNAME") + writelog "INFO" "${FUNCNAME[0]} - ReShade is installed and not loaded as SpecialK plugin -- Checking for DLL naming conflicts" + mapfile -d "," -t -O "${#SPEKRSDLLNAMECHECKARR[@]}" SPEKRSDLLNAMECHECKARR < <(printf '%s' "$RESHADEDLLNAME") + + SPEKREALDLLNAME="$( basename "$SPEKDST" )" # Makes sure we don't compare against 'auto' for SPEKRSCHECKDLL in "${SPEKRSDLLNAMECHECKARR[@]}"; do - if [[ "$SPEKRSCHECKDLL" == "$SPEKDLLNAME" ]]; then - writelog "ERROR" "${FUNCNAME[0]} - ReShade is enabled and the chosen ReShade DLL name conflicts with the SpecialK DLL name -- Not installing" + if [[ "$SPEKRSCHECKDLL" == "$SPEKREALDLLNAME" ]] && [ -f "$SPEKRSCHECKDLL" ]; then + writelog "ERROR" "${FUNCNAME[0]} - ReShade is enabled and the chosen SpecialK DLL name conflicts with the ReShade DLL name -- Not installing SpecialK" notiShow "$( strFix "$NOTY_SPEKRESHDLLCONFLICT" "$RESH" "$SPEK" )" SPEKDLLCONFLICTFOUND=1 break fi done else - # Not sure if this works yet -- Same as ReShade check to see if DLL exists and is not tracked by us + writelog "INFO" "${FUNCNAME[0]} - SpecialK loading normally" + # Check to see if SpecialK DLL already exists and is not tracked by us # There's probably scope to make installRSdll generic so it applies for both ReShade+SpecialK if [ ! -f "$SPEKDST" ]; then writelog "INFO" "${FUNCNAME[0]} - No SpecialK DLL installation found, installing as normal" @@ -9314,6 +9359,7 @@ function useSpecialK { cp "${SPEKSRC//dll/pdb}" "$SPEKDDIR" echo "$SPEKDDIR/$SPEKPDB" >> "$SPEKENA" fi + prepareSpecialKIni # Moved here so this is created only once we confirm SpecialK can be installed elif [ "$SPEKDLLCONFLICTFOUND" -eq 0 ] && [ "$SHOULDINSTALLSPEK" -eq 0 ]; then # In this scenario, SpecialK is already installed so we don't need to install it # So write out the DLL name to the SPEKENA file to ensure we don't end up with a blank file @@ -9360,8 +9406,6 @@ function useSpecialK { fi if [ "$USESPECIALK" -eq 1 ]; then - prepareSpecialKIni - if [ "$AUTOSPEK" -eq 1 ] && { [ "$SPEKVERS" == "default" ] || [ "$SPEKVERS" == "latest" ];}; then writelog "INFO" "${FUNCNAME[0]} - Updating $SPEK in the gamedir because AUTOSPEK is enabled" fi @@ -9370,7 +9414,7 @@ function useSpecialK { dlSpecialK getSpecialKGameRenderApi - + writelog "INFO" "${FUNCNAME[0]} - Using '$SPEKDST' as $SPEK destination dll" installSpekArchDll @@ -17869,7 +17913,7 @@ function prepareLaunch { writelog "INFO" "${FUNCNAME[0]} - checkReshade:" checkReshade - # start game with ${RESH} if USERESHADE is 1 + # start game with ${SPEK} if USESPECIALK is 1 writelog "INFO" "${FUNCNAME[0]} - useSpecialK:" useSpecialK