07th-mod / python-patcher

Mod Installer for the Higurashi and Umineko Games
150 stars 12 forks source link

Launch installer in webview on Windows #186

Closed drojf closed 1 year ago

drojf commented 1 year ago

There is always some confusion when launching the installer, because:

This PR fixes part of that problem on Windows by launching the installer in a separate window:

webview-installer

The window appears as a normal app in your taskbar (I don't know how to change the icon yet).

Also, the launcher window still hangs around even after the window is launched, but I guess that is not necessary anymore.

Note that the library I use for this, wry, is cross-platform and so could work on MacOS/Linux too, but I'm not as confident in running it on other platforms at the moment. I'll try to get it working on Windows for now.

It should be noted that this PR uses the wry library, which is used by Tauri, which could serve as a base for our installer/replace parts of the backend, but it would be too much work to port fully to it with little benefit for the end user. So I don't think I'll ever port our installer to Tauri.

Possible Problems

I'll only list issues I don't know how to fix here, as this is a work in progress.

Links launch in a new webview window rather than in a browser window

I'm not sure what exactly we want our installer to do, but if you click an external link in our installer, it will open a new webview window (not your default browser window) which then shows the content.

You can still right-click -> copy the link to your preferred browser, but this could be annoying, especially if you need to log-in.

I'm not sure if there is an option to change this behavior

Downloading Files

Downloading files manually seems to work, butI have not yet tested whether the install logs download automatically somewhere, or if you have to choose where they go.

Extra Notes

This PR does not attempt to fix that the installer theming is similar to our website (I'm not sure if that needs to be fixed if we just make the installer more clear).

TODO