Skip to content

Commit

Permalink
dotnet40: use OnlyUseLatestCLR registry setting instead of dotnet20 t…
Browse files Browse the repository at this point in the history
…o avoid WINEPREFIX update popup
  • Loading branch information
austin987 committed Aug 11, 2020
1 parent c0cb32b commit 1131bf0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/winetricks
Expand Up @@ -9144,10 +9144,6 @@ load_dotnet40()

w_call remove_mono

# Installing dotnet20 beforehand avoids a popup for users when updating their WINEPREFIX
# See https://bugs.winehq.org/show_bug.cgi?id=41727#c5
w_call dotnet20

w_call winxp

w_try_cd "$W_CACHE/$W_PACKAGE"
Expand All @@ -9161,6 +9157,9 @@ load_dotnet40()

W_NGEN_CMD="$WINE $WINEPREFIX/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe executequeueditems"

# Avoid a popup on WINEPREFIX updates, see https://bugs.winehq.org/show_bug.cgi?id=41727#c5
"$WINE" reg add "HKLM\\Software\\Microsoft\\.NETFramework" /v OnlyUseLatestCLR /t REG_DWORD /d 0001 /f

w_set_winver 'default'
}

Expand Down

3 comments on commit 1131bf0

@mirh
Copy link

@mirh mirh commented on 1131bf0 Sep 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very not good, as pointed out on the bug tracker

@austin987
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly are you referring to? A cryptic comment like this on a commit isn't useful.

@mirh
Copy link

@mirh mirh commented on 1131bf0 Sep 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are multiple ways to work around these annoying message boxes when the WINEPREFIX gets updated:
...
3) Export specific environment variables or set registry keys:

  • OnlyUseLatestCLR (big hammer/red knob)

in my previous comment #5, 'OnlyUseLatestCLR' setting was mentioned with "big hammer/red knob" in the list of possible workarounds.
The potential danger/impact of this global setting is mentioned in this StackOverflow thread:
https://stackoverflow.com/questions/2094694/how-can-i-run-powershell-with-the-net-4-runtime ("How can I run PowerShell with the .NET 4 runtime?")

Please sign in to comment.