w3champions / flo

Warcraft III toolkit in Rust.
MIT License
119 stars 21 forks source link

[WINE] Cannot run current version of W3Champions Launcher with Bottles or Lutris #40

Open graves501 opened 5 months ago

graves501 commented 5 months ago

Tried out running the current version of the launcher with both Bottles and Lutris, but it would crash instantly. The legacy launcher does install, but it would not let me join games, like already mentioned in https://github.com/w3champions/launcher/issues/94.

In issue https://github.com/w3champions/flo/issues/26 the solution is to run the current version, but like mentioned above, it just crashes.

Here's the stacktrace:

thread 'main' panicked at src-tauri\src\main.rs:75:10:
error while running tauri application: Runtime(CreateWebview(WebView2Error(WindowsError(Error { code: 0x80070002, message: File not found. }))))
stack backtrace:
   0:        0x1410cf2da - <unknown>
   1:        0x1410f7afb - <unknown>
   2:        0x1410c9381 - <unknown>
   3:        0x1410cf0c6 - <unknown>
   4:        0x1410d179f - <unknown>
   5:        0x1410d1437 - <unknown>
   6:        0x1410d1cdd - <unknown>
   7:        0x1410d1b99 - <unknown>
   8:        0x1410cfbe9 - <unknown>
   9:        0x1410d1856 - <unknown>
  10:        0x1411ab747 - <unknown>
  11:        0x1411abc43 - <unknown>
  12:        0x14020bbd0 - <unknown>
  13:        0x140207304 - <unknown>
  14:        0x14013f76d - <unknown>
  15:        0x1401778b7 - <unknown>
  16:        0x140055575 - <unknown>
  17:        0x14018d326 - <unknown>
  18:        0x1401e5e2c - <unknown>
  19:        0x1410c2d02 - <unknown>
  20:        0x14005568c - <unknown>
  21:        0x141168d1c - <unknown>
  22:     0x6fffffeea639 - <unknown>
  23:     0x6ffffff9884f - <unknown>
graves501 commented 5 months ago

So even after installing Webview2 via Evergreen Bootstrapper (downloaded from the official Microsoft site) all I get is a black window with no real log output:

Asset `vite.svg` not found; fallback to vite.svg.html
wine: Call from 000000007B013AD7 to unimplemented function wevtapi.dll.EvtCreateBookmark, aborting

NOTE: On my Arch Linux install I had to make sure to have lib32-gnutls installed and set the Windows version to Windows 7 within your WINE prefix for the Webview2 installation.

graves501 commented 5 months ago

Like mentioned in this issue (Thanks Kovax!) msedgewebview2.exe needs to be set to use Windows 7.

This will result in the launcher window showing the basic UI: 2024-06-09_12-03-22

However, after clicking on sign up the process will crash:

Initial process has exited (return code: 1280)
All processes have quit
Exit with return code 1280
Hillkorn commented 4 months ago

were you able to solve it?

graves501 commented 3 months ago

@Hillkorn

No, not really.

There might be a chance that Webview2 works with WINE now, but I haven't checked.

Here's a little write up of the current situation regarding Linux + current W3Champions launcher that I posted in the linux-support channel on Discord, June 11th, 2024:

hello everyone, so from what I've seen in this chat the current launcher does not work with WINE (webview2 support in WINE is not ready yet). 

I installed wc3 via battle.net launcher within Lutris, then also installed w3champions (legacy) within the same wine prefix. I duplicated the battle.net lutris game entry and set the executable to YOUR_WINEPREFIX/drive_c/users/YOUR_USER/AppData/Local/Programs/w3champions/w3champions.exe .
The legacy launcher did work, bonjour did install, but I could not join any games.

What I had to do - like seanmcnabb mentioned it earlier - is to kill the mDNSResponder process after launching battle.net and then start w3champions via legacy launcher.
After this I could join games, but only 1v1 and custom games since the legacy launcher is limited at the moment.

so in the end w3champions legacy works for 1v1 and custom games for now.

the current version of the launcher needs webview2.
Installing Webview2 by switching to Windows 7 installs an older version of Webview2 (109... something) ... the latest version is around 124 or 125. So that might be the culprit. Webview2 should be installed with Win10, but it needs at least Wine version 9.2.
With Webview2 version 109 you get the window for signing in, but after clicking the button, it just crashes.
My guess is that with a later version of Webview2 you might be able to proceed further.

Related links:
https://forum.winehq.org/viewtopic.php?t=38443
https://bugs.winehq.org/show_bug.cgi?id=56259 (Bug report with patch that fixes the Win10 Webview2 installs)
but currently I cannot finish the install of Webview2, only when switching to win7. so webview2 version 109 might be too old for the w3c launcher 🤔

I decided to sum up the previous messages so some other future Linux user doesn't have to look through the whole chat history 🙂

PS: I also tried the whole procedure within Bottles (Flatpak), but Lutris (also Flatpak) just feels snappier and caused less trouble.
Hillkorn commented 2 months ago

I tried https://lutris.net/games/warcraft-iii-reforged/ Battle.net + w3champions version and I can play as you said but the recent version of w3champions doesn't work.

I played a bit around with a locally installed version of wine 9.15 which was able to install more recent versions of webview2 but I did only see a black screen when I tried to start w3champions 1.4.35 in there. I was not able to fix this yet

mercifulboss commented 2 months ago

I tried https://lutris.net/games/warcraft-iii-reforged/ Battle.net + w3champions version and I can play as you said but the recent version of w3champions doesn't work.

I played a bit around with a locally installed version of wine 9.15 which was able to install more recent versions of webview2 but I did only see a black screen when I tried to start w3champions 1.4.35 in there. I was not able to fix this yet

you need to go into winecfg, click on the installed msedgview and set it to use anything from windows 7 to 8. Anything later will cause a blackscreen. Getting the screen to work won't help much tho since clicking "login" will crash the app.

mercifulboss commented 2 months ago

@Hillkorn

No, not really.

There might be a chance that Webview2 works with WINE now, but I haven't checked.

Here's a little write up of the current situation regarding Linux + current W3Champions launcher that I posted in the linux-support channel on Discord, June 11th, 2024:

hello everyone, so from what I've seen in this chat the current launcher does not work with WINE (webview2 support in WINE is not ready yet). 

I installed wc3 via battle.net launcher within Lutris, then also installed w3champions (legacy) within the same wine prefix. I duplicated the battle.net lutris game entry and set the executable to YOUR_WINEPREFIX/drive_c/users/YOUR_USER/AppData/Local/Programs/w3champions/w3champions.exe .
The legacy launcher did work, bonjour did install, but I could not join any games.

What I had to do - like seanmcnabb mentioned it earlier - is to kill the mDNSResponder process after launching battle.net and then start w3champions via legacy launcher.
After this I could join games, but only 1v1 and custom games since the legacy launcher is limited at the moment.

so in the end w3champions legacy works for 1v1 and custom games for now.

the current version of the launcher needs webview2.
Installing Webview2 by switching to Windows 7 installs an older version of Webview2 (109... something) ... the latest version is around 124 or 125. So that might be the culprit. Webview2 should be installed with Win10, but it needs at least Wine version 9.2.
With Webview2 version 109 you get the window for signing in, but after clicking the button, it just crashes.
My guess is that with a later version of Webview2 you might be able to proceed further.

Related links:
https://forum.winehq.org/viewtopic.php?t=38443
https://bugs.winehq.org/show_bug.cgi?id=56259 (Bug report with patch that fixes the Win10 Webview2 installs)
but currently I cannot finish the install of Webview2, only when switching to win7. so webview2 version 109 might be too old for the w3c launcher 🤔

I decided to sum up the previous messages so some other future Linux user doesn't have to look through the whole chat history 🙂

PS: I also tried the whole procedure within Bottles (Flatpak), but Lutris (also Flatpak) just feels snappier and caused less trouble.

Newest version of webview does indeed install in wine. The issue with the app crashing persists when you click login.

graves501 commented 1 month ago

@mercifulboss

Thanks for trying/testing! For documentation and issue tracking purposes it would be great if you could also add the respective (startup) logs as well. This might help the devs.

orangeag3nt commented 1 month ago

you need to go into winecfg, click on the installed msedgview and set it to use anything from windows 7 to 8

I use lutris. I successfully run w3c with wine 9.15-devel with your instruction. But bnet->wc3 doesnt work well on 9.15 (bnet doesnt work on wine 9.15-devel, on wine 9.15-staging: bnet works, but wc3 after opening gates = just black screen + cursor), it runs on wine-ge-8-26 good. Can you start bnet->wc3 from wine 9.15? Do I need something special to do so?

mercifulboss commented 1 month ago

you need to go into winecfg, click on the installed msedgview and set it to use anything from windows 7 to 8

I use lutris. I successfully run w3c with wine 9.15-devel with your instruction. But bnet->wc3 doesnt work well on 9.15 (bnet doesnt work on wine 9.15-devel, on wine 9.15-staging: bnet works, but wc3 after opening gates = just black screen + cursor), it runs on wine-ge-8-26 good. Can you start bnet->wc3 from wine 9.15? Do I need something special to do so?

Use Proton-GE-9.13 and set it to windows 7 mode. Thats how i fixed it on mine in both PortProton and Lutris

orangeag3nt commented 1 month ago

Use Proton-GE-9.13 and set it to windows 7 mode. Thats how i fixed it on mine in both PortProton and Lutris

Tried that in Lutris. BNet works fine. WC3 gates doesn't open. W3Champions instantly closes. win7 compatibility enabled for everything (blizzard browser, warcraft iii, w3champions, msedgewebview2)

phaux commented 1 month ago

I have my Battle.net launcher added as a non-steam game in Steam. First add Battle.net installer as non-steam game, then after it installs, change launch path to the actual Battle.net.exe.

The game works fine but no luck with W3Champions still.

Change launch path to explorer.exe, run W3C installer, it installs. Run Battle.net.exe, it opens. Run W3Champions.exe, nothing happens.

md-weber commented 1 week ago

I am really not that deep in Flo or Lutris, but I really would like this feature to happen. Because I believe the player base on Linux is growing at the moment daylie and I am play myself mostly on a Linux system and really really miss playing WC3.

Could any of the developers give me a hint on what parts I would need to look at or which places are maybe relevant to enable Flo on Linux?

orangeag3nt commented 1 week ago

Could any of the developers give me a hint on what parts I would need to look at or which places are maybe relevant to enable Flo on Linux?

I'm not dev, but main problem is the launcher that uses Webview2. On some versions of Wine it can even start, but it fails when you try to sign in with Bnet account (fails when opening new window). AFAIK Flo works through the Wine, but I didn't tried.

th3br4vetrave1er commented 1 week ago

Not been able to launch w3c on linux is the only thing that keeps me on win :/

Miezhiko commented 1 week ago

I'm not dev, but main problem is the launcher that uses Webview2.

try setting win8.1 for it