Skip to content

Conversation

drojf
Copy link
Collaborator

@drojf drojf commented Sep 25, 2022

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

  • the installer launches in your normal web browser, unlike most apps
  • and the installer is themed similar to our website, causing some users to think they have been re-directed to our website by mistake.
  • It's also confusing how to close the installer, as closing your browser tab won't close the installer, you need to close the install loader

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

  • Check for a solution to "Links launch in a new webview window rather than in a browser window"
  • Check where log files download to at end of install
  • Check how difficult it is to change the icon (do we just need to change the installer icon?)
  • See if the webview temporary files can be placed in another folder - currently they're just dumped in the same folder as the launcher .exe
  • Search source code for any leftover TODOs
  • Rebase/review code changes for final PR

@drojf drojf force-pushed the f-webview branch 2 times, most recently from ef7dc40 to c5f7308 Compare December 17, 2022 09:47
drojf added 2 commits January 1, 2023 13:31
 - Usually for wiki pages, discord server links, we want them to open in your normal browser
 - Will use the default webbrowser on the system
 - This progress bar just displays the timeout progress as we don't really have any progress feedback from the Python script
@drojf drojf marked this pull request as ready for review January 1, 2023 06:27
@drojf drojf merged commit 40d36e1 into master Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant