How to deal with obligatory installation of .NET / Direct X

Questions about Wine on Linux
Locked
Nokia-808
Level 2
Level 2
Posts: 22
Joined: Wed Apr 20, 2016 11:50 am

How to deal with obligatory installation of .NET / Direct X

Post by Nokia-808 »

Hi. Native .NET & direct X can cause many problem if installed on WINE.

There are many games when installed give option to installed .NET / direct X asking user if need to install them or not. In these case no problem: user can select "not install them" & that is all.

But my question is about many other games that during their installation, they are obligate user to install .NET / direct X & give no option for user to select whether need to install .NET / direct X or not. In this case .NET / direct X will installed & thus can cause problems ..... Then how can manage these cases ?

Best.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: How to deal with obligatory installation of .NET / Direc

Post by Bob Wya »

Nokia-808 wrote: But my question is about many other games that during their installation, they are obligate user to install .NET / direct X & give no option for user to select whether need to install .NET / direct X or not. In this case .NET / direct X will installed & thus can cause problems ..... Then how can manage these cases ?

Best.
  • Generally it's OK to let DirectX installers complete as normal is fine... Since Wine relies on dll overrides to determine whether it uses the builtin functionality or the native (Windows) dlls.
  • Currently .NET requires a 32-bit WINEPREFIX. Generally it is best to pre-install the framework, using winetricks when you first create the 32-bit WINEPREFIX.
    It is probably best to stick to the rule of "one Windows application / WINEPREFIX" in this case.
    Hopefully then the Windows installer will simply detect that the .NET framework is already installed and skip the full installation process.
Bob
Nokia-808
Level 2
Level 2
Posts: 22
Joined: Wed Apr 20, 2016 11:50 am

Re: How to deal with obligatory installation of .NET / Direc

Post by Nokia-808 »

@Bob
Thank you for replay. I understand point about DirectX.

However, I have confusion about .NET: can you please explain further what you mean by "it is best to pre-install the framework, using winetricks when you first create the 32-bit WINEPREFIX."

In my mind - please correct to me - WINEPREFIX is folder within /.wine directory where a windows application is installed.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: How to deal with obligatory installation of .NET / Direc

Post by Bob Wya »

Nokia-808 wrote: However, I have confusion about .NET: can you please explain further what you mean by "it is best to pre-install the framework, using winetricks when you first create the 32-bit WINEPREFIX."

In my mind - please correct to me - WINEPREFIX is folder within /.wine directory where a windows application is installed.
See: Github: Winetricks / winetricks (homepage of the winetricks shell script).
See: WineHQ FAQ: 6.5 Wineprefixes.

So I'd mean something like:

Code: Select all

export WINEPREFIX=.....          # some system path (with the final directory, not pre-existing)
WINEARCH=win32 wineboot -u       # Create 32-bit WINEPREFIX
winetricks -q dotnet40           # Install the precisely required version of .Net framework (in this example: .Net 4.0)
Since different applications will require different/specific versions of .Net framework, it's almost obligatory to have a separate WINEPREFIX for each Windows application.

Bob

Bob
Nokia-808
Level 2
Level 2
Posts: 22
Joined: Wed Apr 20, 2016 11:50 am

Re: How to deal with obligatory installation of .NET / Direc

Post by Nokia-808 »

@Bob Wya

Dear, just one thing to explain: why I have to install .NET at all as long as I'm already installed "mono" ? I do not like to use native .NET at all ! This is my real question !

But from your kind reply I feel that you deal with installation of native .NET before installation of windows games/programs that their installer obligatory install native .NET, isn't it ?

My question is that: I have certain windows games & programs that their installers obligatory install a .NET .... How can I remove such .NET after their installation ?? In fact I did not test any of such windows games/programs because I'm afraid that native .NET will break something if installed. For that I opened this topic to see what I should do to remove native .NET without damaging my system & other Wine applications/games that currently run without any problem.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: How to deal with obligatory installation of .NET / Direc

Post by Bob Wya »

Nokia-808 wrote:@Bob Wya

Dear, just one thing to explain: why I have to install .NET at all as long as I'm already installed "mono" ? I do not like to use native .NET at all ! This is my real question !
Wine Mono is not .Net - it simply partially replicates the .Net API.
Wine Mono only supports the .Net API / functionality up to around version 2.0 .
Nokia-808 wrote: But from your kind reply I feel that you deal with installation of native .NET before installation of windows games/programs that their installer obligatory install native .NET, isn't it ?
Basically the .Net framework installers require a number of workarounds to successfully install...
Hence why it's safer to do this with winetricks before an application tries (and fails) to install it without any workarounds.
Nokia-808 wrote: My question is that: I have certain windows games & programs that their installers obligatory install a .NET .... How can I remove such .NET after their installation ?? In fact I did not test any of such windows games/programs because I'm afraid that native .NET will break something if installed. For that I opened this topic to see what I should do to remove native .NET without damaging my system & other Wine applications/games that currently run without any problem.
You can try:

Code: Select all

winetricks forcemono
Which disables any any installed .Net framework versions and overrides mscoree.dll back to native.

There is also the gui helper utility:

Code: Select all

wine uninstaller
Which may let you uninstall Windows applications, including installed versions of frameworks (but this doesn't always work too great!)

Bob
Locked