From c89d29f93c33f2a04d1ff25ef97d22b40a1cb19c Mon Sep 17 00:00:00 2001 From: Castro-Fidel Date: Sun, 31 May 2020 19:32:08 +0300 Subject: [PATCH] Add nvapi,nvapi64=disabled for nvidia --- data_from_portwine/scripts/runlib | 7 +++++++ data_from_portwine/scripts/winecfg | 7 ++++++- data_from_portwine/scripts/winetricks | 30 ++++++++++++++------------- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/data_from_portwine/scripts/runlib b/data_from_portwine/scripts/runlib index f42dcdd7..849b6292 100755 --- a/data_from_portwine/scripts/runlib +++ b/data_from_portwine/scripts/runlib @@ -123,6 +123,13 @@ then export __GL_SHADER_DISK_CACHE_SIZE=1000000000 export __GL_THREADED_OPTIMIZATIONS=1 nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 > /dev/null + if [ ! -z "${WINEDLLOVERRIDES}" ] + then + export WINEDLLOVERRIDES="nvapi,nvapi64=";${WINEDLLOVERRIDES} + else + export WINEDLLOVERRIDES="nvapi,nvapi64=" + fi + echo "runtime libs is disabled" else export DRI_PRIME=1 export vblank_mode=1 diff --git a/data_from_portwine/scripts/winecfg b/data_from_portwine/scripts/winecfg index 27e48320..0f762de4 100755 --- a/data_from_portwine/scripts/winecfg +++ b/data_from_portwine/scripts/winecfg @@ -5,5 +5,10 @@ runlib_path="$(dirname $(readlink -f "$0"))"/runlib "${WINESERVER}" -k START_PORTWINE export WINEDEBUG="fixme-all" -"${PROTONRUN}" "run" "winecfg" >&2 +if [ ! -z ${optirun_on} ] +then + ${optirun_on} "${PROTONRUN}" "run" "winecfg" >&2 +else + "${PROTONRUN}" "run" "winecfg" >&2 +fi STOP_PORTWINE diff --git a/data_from_portwine/scripts/winetricks b/data_from_portwine/scripts/winetricks index ffeb9c0f..495e161d 100755 --- a/data_from_portwine/scripts/winetricks +++ b/data_from_portwine/scripts/winetricks @@ -2476,6 +2476,8 @@ w_set_winver() # FIXME: This should really be done with winecfg, but it has no CLI options. # Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45616 + _W_winver="$1" + # First, delete any lingering version info, otherwise it may conflict: ( "$WINE" reg delete "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion" /v SubVersionNumber /f || true @@ -2490,9 +2492,9 @@ w_set_winver() "$WINE" reg delete "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /f || true ) > /dev/null 2>&1 - case "$1" in + case "$_W_winver" in win31) - echo "Setting Windows version to $1" + echo "Setting Windows version to $_W_winver" cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 @@ -2506,7 +2508,7 @@ _EOF_ win95) # This key is only used for Windows 95/98: - echo "Setting Windows version to $1" + echo "Setting Windows version to $_W_winver" cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 @@ -2522,7 +2524,7 @@ _EOF_ win98) # This key is only used for Windows 95/98: - echo "Setting Windows version to $1" + echo "Setting Windows version to $_W_winver" cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 @@ -2538,7 +2540,7 @@ _EOF_ nt40) # Similar to modern version, but sets two extra keys: - echo "Setting Windows version to $1" + echo "Setting Windows version to $_W_winver" cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 @@ -2645,7 +2647,7 @@ _EOF_ ;; esac - echo "Setting Windows version to $1" + echo "Setting Windows version to $_W_winver" cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 @@ -2694,7 +2696,7 @@ w_set_app_winver() # Note: currently only -ge and -le are supported, # as well as the special case -bn (between) # Example: -# if w_compare_wine_version -gt 2.5 ; then +# if w_compare_wine_version -ge 2.5 ; then # ... # fi w_compare_wine_version() @@ -8690,14 +8692,14 @@ load_dotnet20sp1() w_download https://download.microsoft.com/download/0/8/c/08c19fa4-4c4f-4ffb-9d6c-150906578c9e/NetFx20SP1_x86.exe c36c3a1d074de32d53f371c665243196a7608652a2fc6be9520312d5ce560871 exe="NetFx20SP1_x86.exe" - w_warn "Setting windows version so installer works" + w_warn "Setting Windows version so installer works" w_set_winver win2k elif [ "$W_ARCH" = "win64" ]; then # https://www.microsoft.com/en-us/download/details.aspx?id=6041 w_download https://download.microsoft.com/download/9/8/6/98610406-c2b7-45a4-bdc3-9db1b1c5f7e2/NetFx20SP1_x64.exe 1731e53de5f48baae0963677257660df1329549e81c48b4d7db7f7f3f2329aab exe="NetFx20SP1_x64.exe" - w_warn "Setting windows version so installer works" + w_warn "Setting Windows version so installer works" w_set_winver winxp fi @@ -8756,7 +8758,7 @@ load_dotnet20sp2() WINEDLLOVERRIDES="ngen.exe,regsvcs.exe,mscorsvw.exe=b;$WINEDLLOVERRIDES" export WINEDLLOVERRIDES fi - w_warn "Setting windows version so installer works" + w_warn "Setting Windows version so installer works" w_set_winver winxp if [ "$W_ARCH" = "win32" ]; then @@ -14694,7 +14696,7 @@ load_ie6() "$WINE" regsvr32 /i $i > /dev/null 2>&1 done - # Set windows version back to user's default. Leave at win2k for better rendering (is there a bug for that?) + # Set Windows version back to the default. Leave at win2k for better rendering (is there a bug for that?) w_set_winver 'default' # the ie6 we use these days lacks pngfilt, so grab that @@ -15578,7 +15580,7 @@ load_psdk2003() w_download https://download.microsoft.com/download/7/5/e/75ec7f04-4c8c-4f38-b582-966e76602643/5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img 7ef138b07a8ed2e008371d8602900eb68e86ac2a832d16b53f462a9e64f24d53 # Unpack ISO (how handy that 7z can do this!) - # Only the windows version of 7z can handle .img files? + # Only the Windows version of 7z can handle .img files? WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip w_try_cd "$W_PROGRAMS_X86_UNIX"/7-Zip w_try "$WINE" 7z.exe x -y -o"$W_TMP_WIN" "$W_CACHE_WIN\\psdk2003\\5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img" @@ -16063,7 +16065,7 @@ load_vc2005trial() w_download https://download.microsoft.com/download/6/f/5/6f5f7a01-50bb-422d-8742-c099c8896969/En_vs_2005_vsts_180_Trial.img 3ae9f611c60c64d82e1fa9c94714aa6b6c10f6c2c05446e14b5afb5a257f86dc # Unpack ISO (how handy that 7z can do this!) - # Only the windows version of 7z can handle .img files? + # Only the Windows version of 7z can handle .img files? WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip w_try_cd "$W_PROGRAMS_X86_UNIX"/7-Zip w_try "$WINE" 7z.exe x -y -o"$W_TMP_WIN" "$W_CACHE_WIN\\vc2005trial\\En_vs_2005_vsts_180_Trial.img" @@ -22299,7 +22301,7 @@ _EOF_ w_metadata nt40 settings \ title_uk="Встановити версію Windows NT 4.0" \ - title="Set windows version to Windows NT 4.0" + title="Set Windows version to Windows NT 4.0" load_nt40() {