AppImageCrafters / AppRun

AppDir runtime components
MIT License
26 stars 10 forks source link

AppImage to wine WoW64 #16

Closed ferion11 closed 3 years ago

ferion11 commented 3 years ago

Hi @azubieta ,

I want to make one AppImage multilib to wine WoW64 (Windows on Windows 64-bit) with all dependencies.

My issue is that I need hooks for both ABI in the same AppImage (64-bits ld-linux-x86-64.so.2, and 32-bits ld-linux.so.2). Could you help me with that?

azubieta commented 3 years ago

Right now only one ARCH is supported, but we can work it out. Let's start by listing with libraries you would need from the system. Do you have a bundle to share so we I can take a look ?

ferion11 commented 3 years ago

Right now only one ARCH is supported, but we can work it out. Let's start by listing with libraries you would need from the system. Do you have a bundle to share so we I can take a look ?

Well, I'm trying it here:

Until now, I had been using hooks from Hackerl (https://github.com/Hackerl/Wine_Appimage). But they are just for one ABI too.

azubieta commented 3 years ago

@ferion11 @probonopd I'm going to left this picture here and walk away ...

DeepinScreenshot_select-area_20200910213857

It's a Wine AppImage made using ubuntu focal binaries running a windows tetris.

azubieta commented 3 years ago

Changes added on #7c0f8917482631b3846cea1f4d89838f5ee18933

I'm having some issues with the CI, I'll have to fix that to make binaries available. Changes on appimage-builder were also made and are available in https://github.com/AppImageCrafters/appimage-builder/pull/42

Bundle for testing: https://transfersh.com/uv8Zq/wine-i386.AppImage

ferion11 commented 3 years ago

Changes added on #7c0f8917482631b3846cea1f4d89838f5ee18933

I'm having some issues with the CI, I'll have to fix that to make binaries available. Changes on appimage-builder were also made and are available in AppImageCrafters/appimage-builder#42

Bundle for testing: https://transfersh.com/uv8Zq/wine-i386.AppImage

Tested it here. It can make win32 and win64 bottles, but can't run WoW64 Application (and have some issue to run wineserver).

Well, I need it to make the installation and run LogosBible (that will drop 32bits support at the end of this year). It can't run on mono, just on MS dotnet, and MS dotnet 64bits is one WoW64 application (At the moment, I offer 4 options to my users): https://github.com/ferion11/LogosLinuxInstaller step_01 If you want to test, just install with option 4 first (so you don't need wineserver), then select your AppImage with:

$ ./Logos.sh selectAppImage

and run with:

$ ./Logos.sh

You don't have to worry about the size of the AppImage, up to 1.5GB is still acceptable, if all the wine features are working. Thanks for the hard work :)

azubieta commented 3 years ago

Here is a x86_64 wine AppImage, please try it https://transfersh.com/UlRU4/wine-x86_64.AppImage

ferion11 commented 3 years ago

Here is a x86_64 wine AppImage, please try it https://transfersh.com/UlRU4/wine-x86_64.AppImage

In the preliminary tests here, it worked very well, thanks. But only when there are no blank spaces in the application path (and it's common for applications to be installed with it on Windows, as in the "Program Files" directory).

It's very creative to leave "ld-linux.so.2" and "ld-linux-x86-64.so.2" in "/tmp".

Well, the part I needed was done very quickly. Thank you again.

ferion11 commented 3 years ago

I tested it now using ubuntu-18.04.5-desktop-amd64.iso liveISO, and got:

...
      5885: symbol=getcwd;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      5885: binding file wine64 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `getcwd' [GLIBC_2.2.5]
      5885: symbol=execv;  lookup in file=wine64 [0]
      5885: symbol=execv;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
      5885: symbol=execv;  lookup in file=/lib/x86_64-linux-gnu/libpthread.so.0 [0]
      5885: symbol=execv;  lookup in file=/lib/x86_64-linux-gnu/libz.so.1 [0]
      5885: symbol=execv;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      5885: binding file wine64 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `execv' [GLIBC_2.2.5]
APPRUN_DEBUG: interpreter "ld-linux-x86-64.so.2" 
APPRUN_DEBUG: system glibc(2.27), appdir glibc(2.30) 
./controlPanel.sh: line 96:  5885 Segmentation fault      (core dumped) wine64 control
...

but it's probably due to some dependency that wasn't included, as it worked in a linux installation with all the dependencies installed.

azubieta commented 3 years ago

Regarding the paths with spaces, you can pass them like this "Program\ Files". I'll have to check this.

I haven't tested deeply the AppImage as the docker images I use for testing only include one arch. I'll continue doing some additional testing and get back to you.

azubieta commented 3 years ago

I just noticed that you're running a shell scrip. There is an issue with those, if the chain of execution leaves the AppImage context (like when you run /bin/bash), the AppImage environment is removed. But if it tries to run something from the AppImage again it's not restored. This can (and must) be fixed.

To workaround you can bundle bash and the commands it uses.

azubieta commented 3 years ago

Making WoW64 AppImage is now possible using the latest versions of AppRun (1.2.0) and appimage-builder (0.7.0). Closing the issue, please reopen if required.