bottlesdevs / Bottles

Run Windows software and games on Linux
https://usebottles.com
GNU General Public License v3.0
6.45k stars 273 forks source link

[Request] Ability to reinstall grayed-out "core" dependencies #1020

Closed Arcitec closed 2 years ago

Arcitec commented 2 years ago

Is your feature request related to a problem? Please describe. The bottle can break and require reinstallation of core dependencies. Current GUI doesn't allow the user to fix this.

Here's an example:

My final solution:

cd ~/.var/app/com.usebottles.bottles/data/bottles/bottles/Gaming/
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
WINEPREFIX="$(pwd)" ./winetricks

Then I used it to install d3dcompiler_47 and now my prefix/bottle is repaired.

Describe the solution you'd like How about this: If user clicks "..." menu of Bottles > Dependencies > d3dcompiler_47 it has an option "Re-install" which runs the install scripts again?

Describe alternatives you've considered I was able to use Winetricks manually to repair the bottle, but it would be nice to be able to fix this situation with Bottles GUI. What do you think about it?

mirkobrombin commented 2 years ago

Next time just remove the dependency from your bottle.yml. Avoid using winetricks in Bottles as it breaks the dependency tree.

Btw I’m going to implement this 👀

Arcitec commented 2 years ago

Next time just remove the dependency from your bottle.yml.

Oh that's smart, thanks for the tip!

Avoid using winetricks in Bottles as it breaks the dependency tree.

Yeah, I guess you mean because Bottles doesn't know that Winetricks has installed this dependency. I just used it to repair this file which Bottles had already installed earlier.

But I noticed something weird actually. Winetricks adds *d3dcompiler_47 to the top of winecfg - Libraries, and Bottles adds d3dcompiler_47. Difference is the *. I have no idea why winetricks adds the library with * at the start of the name.

Btw I’m going to implement this

Yayyy great. Your GUI is much better than winetricks so I respect that you made your own dependency system! :)

mirkobrombin commented 2 years ago

But I noticed something weird actually. Winetricks adds d3dcompiler_47 to the top of winecfg - Libraries, and Bottles adds d3dcompiler_47. Difference is the . I have no idea why winetricks adds the library with * at the start of the name.

I think it's a pattern, maybe they install more data? Idk.

Arcitec commented 2 years ago

@mirkobrombin Yeah I found out what it means. It's a pattern.

Winetricks adds names with the pattern asterisk like *d3d9.dll just to let people know that Winetricks added it. It's nothing special. It's the same result as d3d9.dll.

https://forum.winehq.org/viewtopic.php?f=2&t=10925

https://askubuntu.com/a/1173527/1173262

And I see the Bottles new Reinstall feature in the menus and tried it out. Works very well. Thanks a lot Mirko! :) :heart:

Edit: The asterisk has a purpose after all. We need it too. I made a separate ticket (linked below as a reference).

Arcitec commented 2 years ago

@mirkobrombin For your info (can be useful), I found the exact code where Winetricks generates all of its DLL registrations. It uses the pattern *${module} to always put a * before the name. So yeah mystery is solved:

https://github.com/Winetricks/winetricks/blob/d431b15fa55667217571a791074dc3eb69155dfc/src/winetricks#L2115-L2122

mirkobrombin commented 2 years ago

Makes sense