bottlesdevs / Bottles

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

[BUG] Issue installing 32-bit dependency #772

Closed bayazidbh closed 2 years ago

bayazidbh commented 2 years ago

Describe the bug Problem with some dependencies on 32-bit bottle. Failed to install, then locks up the dependency tab.

Installation

To Reproduce Steps to reproduce the behavior:

  1. Create a 32-bit bottle.
  2. Try to install msxml6.
2021-12-10 23:35:17 INFO: Installing dependency [msxml6] in bottle [gamejp].
Downloading msxml6-KB973686-enu-amd64.exe: 100% [==================================================>
2021-12-10 23:35:43 ERROR: Error while running async job: <bound method DependencyManager.install of <bottles.backend.dependency.DependencyManager object at 0x7fbf3df42bb0>>
Exception: [Errno 2] No such file or directory: '/home/fenglengshun/.var/app/com.usebottles.bottles/data/bottles/bottles/a/drive_c/windows/syswow64//msxml6.dll'
File "/app/share/bottles/bottles/utils.py", line 318, in __target
result = self.task_func(*args, **kwargs)
File "/app/share/bottles/bottles/backend/dependency.py", line 163, in install
res = self.__perform_steps(config, step)
File "/app/share/bottles/bottles/backend/dependency.py", line 256, in __perform_steps
if not self.__step_get_from_cab(config=config, step=step):
File "/app/share/bottles/bottles/backend/dependency.py", line 517, in __step_get_from_cab
shutil.copy(
File "/usr/lib/python3.9/shutil.py", line 426, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.9/shutil.py", line 265, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
Traceback (most recent call last):
File "/app/share/bottles/bottles/widgets/dependency.py", line 159, in set_install_status
if result.status:
AttributeError: 'NoneType' object has no attribute 'status'

Was able to replicate even after resetting all flatpak overrides and deleting bottle's ~/.var/app folder.

Expected behavior msxml6 exits with no issues.

Screenshots image

Desktop (please complete the following information):

Additional context msxml6 installs just fine on 64-bit bottle. I looked in the c:/windows/system32 folder, and found that msxml.dll to msxml6r.dll is present, even without installing the dependency. To check some things, I also tried with mf.dll, and it seems to be the same - dependency installer locks up, error message in console, but mf*.dlls are already present in system32.

Downloading windows6.1-kb976932-x64_74865ef2562006e51d7f9333b4a8d45b7a749dab.exe: 100% [==================================================>

2021-12-10 22:33:30 INFO: Renaming [windows6.1-kb976932-x64_74865ef2562006e51d7f9333b4a8d45b7a749dab.exe] to [windows6.1-kb976932-x64.exe].
2021-12-10 22:33:31 INFO: Setting Key: [State] to [0] for bottle: [Game32]…
2021-12-10 22:33:31 INFO: Setting Key: [Versioning] to [True] for bottle: [Game32]…
2021-12-10 22:33:31 INFO: New state [0] created successfully!
2021-12-10 22:33:31 INFO: Bottles found: GameJP|Game32
2021-12-10 22:33:31 INFO: [Game32] is now bottled.
wine: configuration in L"/home/fenglengshun/.var/app/com.usebottles.bottles/data/bottles/bottles/Game32" has been updated.
2021-12-10 22:33:32 INFO: Bottles found: GameJP|Game32
2021-12-10 22:33:34 ERROR: Error while running async job: <bound method DependencyManager.install of <bottles.backend.dependency.DependencyManager object at 0x7f0ffa6a5bb0>>
Exception: [Errno 2] No such file or directory: '/home/fenglengshun/.var/app/com.usebottles.bottles/data/bottles/bottles/GameJP/drive_c/windows/syswow64//mf.dll'
File "/app/share/bottles/bottles/utils.py", line 318, in __target
result = self.task_func(*args, **kwargs)
File "/app/share/bottles/bottles/backend/dependency.py", line 163, in install
res = self.__perform_steps(config, step)
File "/app/share/bottles/bottles/backend/dependency.py", line 256, in __perform_steps
if not self.__step_get_from_cab(config=config, step=step):
File "/app/share/bottles/bottles/backend/dependency.py", line 517, in __step_get_from_cab
shutil.copy(
File "/usr/lib/python3.9/shutil.py", line 426, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.9/shutil.py", line 265, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
Traceback (most recent call last):
File "/app/share/bottles/bottles/widgets/dependency.py", line 159, in set_install_status
if result.status:
AttributeError: 'NoneType' object has no attribute 'status'
006c:err:rpc:RpcAssoc_BindConnection syntax {57c680ac-7bce-4f39-97fd-ffea566754d5}, 0.0 not supported

Judging by the error message, the file the dependency installer downloaded, and looking at c:/windows, it seems that the dependency installer pulled the 64-bit msxml6 installer, tried to install it, but can't because it's not a 64-bit windows prefix.

I also checked on dotnet35, just in case. That one seems to register just fine, even though it exits with an error message:

image

Clicked close.

image

It seems that there are already a number of 32-bit dependencies installed by default, so perhaps a message notifying that "On a 32-bit bottle, this is already intstalled," or disabling unneeded dependencies install if bottles entered a 32-bit bottle? Or maybe it's an issue with grabbing wrong installer or script?

mirkobrombin commented 2 years ago

Hi, thanks to being so detailed. Bottles should not look for the SysWoW64 path when installing in a 32-bit prefix, I'll implement this asap.

Btw this issue is already tracked here: https://github.com/bottlesdevs/Bottles/issues/713 but I'll keep this instead as it provide more details.