rednimgames / rose-updater

ROSE Online Updater
MIT License
5 stars 1 forks source link

Launcher does not work on Lutris #11

Open snyke7 opened 10 months ago

snyke7 commented 10 months ago

Hey! I read on the forums that the official rose-updater should now also work on Linux/Wine/Lutris. I tried and was not able to get it working :/.

Specifically, something in webview seems to fail. With RUST_BACKTRACE=full, I get the following error:

thread 'main' panicked at 'assertion failed: !inner.is_null()', C:\Users\admin\.cargo\registry\src\github.com-1ecc6299db9ec823\fltk-webview-0.2.16\src\lib.rs:189:9
stack backtrace:
   0:        0x1402d43d2 - <unknown>
   1:        0x1402f568b - <unknown>
   2:        0x1402ccf5a - <unknown>
   3:        0x1402d6dd4 - <unknown>
   4:        0x1402d6a0a - <unknown>
   5:        0x1402d75c1 - <unknown>
   6:        0x1402d748a - <unknown>
   7:        0x1402d50df - <unknown>
   8:        0x1402d7190 - <unknown>
   9:        0x1403fd785 - <unknown>
  10:        0x1403fd62c - <unknown>
  11:        0x14008c697 - <unknown>
  12:        0x14003be48 - <unknown>
  13:        0x140029b56 - <unknown>
  14:        0x14004fe3c - <unknown>
  15:        0x1402c7a3e - <unknown>
  16:        0x14003dfec - <unknown>
  17:        0x1403ea38c - <unknown>
  18:         0x7b62a1c9 - <unknown>
  19:        0x170061bd7 - <unknown>

This seems to refer to this piece of code -- I don't quite see how that assertion can fail, but it does.

Happy to provide more information if needed. I am using Wine GE 8.22, I think that should be recent enough.

I saw #9 will drop webview anyway, perhaps that fixes this too..?

rminderhoud commented 10 months ago

Hello @snyke7, it sometimes work if you're able to force the webview installation first but it's spotty. We do plan to remove the webview, there is a WIP branch here for it https://github.com/rednimgames/rose-updater/tree/ralph/egui but.....in our initial test it also doesn't work under wine 😭.

We might need to have a no-ui option for wine installations

snyke7 commented 9 months ago

If you can build a .exe of the egui branch for me I'm happy to test it. And a no-ui option would also help.

But maybe we're thinking about this wrong? I can cargo build the launcher (both main and egui version) just fine on Linux! And even better: I can actually run these (OS-native) updaters, and the UI seems to work. So we don't actually need wine to run the updater!

I think this might be an easier path toward better support for wine installations. The installer could additionally provide versions of the updater built for linux and macOS..? Or you could just have Github Actions build these non-standard updaters, and provide a different installation method using the releases from this project.

Some caveats with the native updater: the updater from the main branch did not display any 'News/Patch notes/Announcements' items, that part of the window was just white. Probably webview2 not working.
The updater from the egui branch did show the updates, but failed to relaunch itself after trying to updating itself (I think).

Perhaps the linux/macos-native updaters should have the 'Launch Game' button disabled -- launching the game through the correct wine settings seems hard.

rminderhoud commented 9 months ago

You're right, we don't need wine for the updater at all. We could publish native options. However, we would need a way to know which wine/proton environment to use to run the client. In theory we could make this an option on the updater but then it gets trick for steamdeck launching through steam. In steam you can add a "non-steam game" and set which version of proton to use. However players would not be able to add the updater directly unless they are using the windows version. They might need to do something awkward like setup the updater as one game and then the regular game as another. Not our ideal scenario, it's probably a better user experience if they use proton/wine end-to-end

snyke7 commented 9 months ago

For Lutris, there is an 'execute script' configuration option for games. If set, right-clicking on the game > choosing 'execute script' can run the chosen executable, like the native launcher for example. That would already be an improvement over running my bash script updater in the background.

Steam only has 'launch options', but you can set these up somewhat similarly. I experimented a bit with this, and the launch options will replace %command% with the actual Wine command. So setting launch options to

"$PWD"/rose-updater-native && %command% --init --server connect.roseonlinegame.com

will, on starting the game from Steam:

  1. Run the rose-updater-native executable in the ROSE Online install folder
  2. Wait for this executable to exit succesfully
  3. Then start trose.exe with the wine version configured for the game.

With these launch options in place (and if the native updater is patched to just close when clicking 'play'), the user experience will be the same as when launching rose-updater.exe through wine. (Although the rose-updater-native should probably also exit 1 when closed or when it encounters an exception). You could maybe also pass %command% as argument to the native launcher, and make it run that when clicking Play!

If rose-updater.exe could be made to work directly through wine, that would of course be better. But I think this provides quite an acceptable alternative.