Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special K: Remove api-ms-win-crt-string-11-1-0.dll check #896

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 35 additions & 40 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20230906-1"
PROGVERS="v14.0.20230906-2"
PROGCMD="${0##*/}"
SHOSTL="stl"
GHURL="https://github.com"
Expand Down Expand Up @@ -9093,7 +9093,8 @@ function useSpecialK {
fi
fi

IPAK="vcrun2019-$3"
# TODO this does not appear to be working!
IPAK="vcrun2022-$3"
if [ -f "$GPFX/${IPAK}_installed.txt" ]; then
writelog "SKIP" "${FUNCNAME[0]} - Skipping '$IPAK' - already installed" "E"
else
Expand Down Expand Up @@ -9124,51 +9125,45 @@ function useSpecialK {
SPEKENA="$SPEKDDIR/${SPEK}_enabled.txt"

if [ "$USESPECIALK" -eq 1 ]; then
REQDLL="api-ms-win-crt-string-l1-1-0.dll"
if [ -d "$GPFX/$DRCW" ] && [ ! -f "$GPFX/$DRCW/system32/$REQDLL" ]; then # the directory check exists for skipping the warning if the pfx does not exist yet _(not nice, but )_ - PR if you care
writelog "SKIP" "${FUNCNAME[0]} - '$SPEK' requires '$REQDLL', which is not available in the WINEPREFIX currently running with '$USEPROTON'" "E"
notiShow "$(strFix "$NOTY_MISSDLL" "$SPEK" "$REQDLL" "$USEPROTON")"
else
prepareSpecialKReshade
prepareSpecialKIni
prepareSpecialKReshade
prepareSpecialKIni
UPSPEK=1

if [ "$AUTOSPEK" -eq 1 ] && { [ "$SPEKVERS" == "default" ] || [ "$SPEKVERS" == "latest" ];}; then
writelog "INFO" "${FUNCNAME[0]} - Updating $SPEK in the gamedir because AUTOSPEK is enabled"
UPSPEK=1

if [ "$AUTOSPEK" -eq 1 ] && { [ "$SPEKVERS" == "default" ] || [ "$SPEKVERS" == "latest" ];}; then
writelog "INFO" "${FUNCNAME[0]} - Updating $SPEK in the gamedir because AUTOSPEK is enabled"
UPSPEK=1
elif [ -f "$SPEKENA" ]; then
writelog "SKIP" "${FUNCNAME[0]} - ${SPEK} is already configured - nothing to do"
UPSPEK=0
fi

if [ "$UPSPEK" -eq 1 ]; then
writelog "INFO" "${FUNCNAME[0]} - ${SPEK} is enabled - Installing dlls if required"
dlSpecialK
elif [ -f "$SPEKENA" ]; then
writelog "SKIP" "${FUNCNAME[0]} - ${SPEK} is already configured - nothing to do"
UPSPEK=0
fi

if [ "$UPSPEK" -eq 1 ]; then
writelog "INFO" "${FUNCNAME[0]} - ${SPEK} is enabled - Installing dlls if required"
dlSpecialK

getSpecialKGameRenderApi
writelog "INFO" "${FUNCNAME[0]} - Using '$SPEKDST' as $SPEK destination dll"
getSpecialKGameRenderApi

writelog "INFO" "${FUNCNAME[0]} - Using '$SPEKDST' as $SPEK destination dll"

if [ -f "$GPFX/$DRCW/DirectX.log" ]; then
writelog "SKIP" "${FUNCNAME[0]} - Skipping 'dxsetup' - already installed" "E"
else
notiShow "$(strFix "$NOTY_INSTSTART" "dxsetup")"
installSteWoShPak "dxsetup" "$GPFX" "$RUNWINE"
notiShow "$(strFix "$NOTY_INSTSTOP" "dxsetup")"
fi
if [ -f "$GPFX/$DRCW/DirectX.log" ]; then
writelog "SKIP" "${FUNCNAME[0]} - Skipping 'dxsetup' - already installed" "E"
else
notiShow "$(strFix "$NOTY_INSTSTART" "dxsetup")"
installSteWoShPak "dxsetup" "$GPFX" "$RUNWINE"
notiShow "$(strFix "$NOTY_INSTSTOP" "dxsetup")"
fi

echo "$SPEKDST" > "$SPEKENA"
echo "$SPEKDST" > "$SPEKENA"

if [ -f "$SPEKDST" ]; then
if [ "$AUTOSPEK" -eq 1 ] && { [ "$SPEKVERS" == "default" ] || [ "$SPEKVERS" == "latest" ];}; then
writelog "INFO" "${FUNCNAME[0]} - Updating $SPEK dlls because AUTOSPEK is enabled"
installSpekArchDll
else
writelog "SKIP" "${FUNCNAME[0]} - Already have a '${SPEKDST##*/}' in '$SPEKDDIR' - not installing '$SPEK'" "E"
fi
else
if [ -f "$SPEKDST" ]; then
if [ "$AUTOSPEK" -eq 1 ] && { [ "$SPEKVERS" == "default" ] || [ "$SPEKVERS" == "latest" ];}; then
writelog "INFO" "${FUNCNAME[0]} - Updating $SPEK dlls because AUTOSPEK is enabled"
installSpekArchDll
else
writelog "SKIP" "${FUNCNAME[0]} - Already have a '${SPEKDST##*/}' in '$SPEKDDIR' - not installing '$SPEK'" "E"
fi
else
installSpekArchDll
fi
fi
else
Expand Down