Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package webapp into an asar archive #9

Merged
merged 4 commits into from
Dec 10, 2019
Merged

Package webapp into an asar archive #9

merged 4 commits into from
Dec 10, 2019

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Dec 10, 2019

Make the fetch script package the webapp up into an asar archive. Means we can have all the random riot resources in one archive file on the user's machine which generally keeps things tidier and might save some space. Also means we don't have to deal with making electron-builder follow symlinks...

Also some chunky but not actually terribly significant changes to the app code to search for the webapp resources before startup (this is async so we need to wait for this to happen before continuing with startup). Previously, by pure chance, this was '../../' whether we were running from a source checkout or from a built app because our main source file was at electron_app/src/. It's now just in src/ so is only one directory level above when running from a source checkout. We now try both locations (along with just webapp as we did before so you can symlink in for dev).

As a bonus, we now exit when we can't find the resources rather than display an app with a blank, white screen which was a common pitfall before. This also means we don't need to run the check script when just running the electron app since the app itself will bail sensibly.

Also Remove the call to install:electron because we removed that script in #8.

@dbkr dbkr requested a review from a team December 10, 2019 17:54
@dbkr dbkr mentioned this pull request Dec 10, 2019
@dbkr dbkr mentioned this pull request Dec 10, 2019
@turt2live turt2live requested review from turt2live and removed request for a team December 10, 2019 18:08
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a thing

@dbkr dbkr merged commit 36f741e into master Dec 10, 2019
@t3chguy t3chguy deleted the dbkr/asar branch May 3, 2022 09:56
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.

None yet

2 participants