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

fix: no asar support (#4), renamed directories (#5) and check if we need to duplicate asar's (#2) #8

Merged
merged 2 commits into from
Nov 19, 2020
Merged

Conversation

NielsLeenheer
Copy link
Contributor

@NielsLeenheer NielsLeenheer commented Nov 19, 2020

Fixes all issues from #4, #5 and #2.

The fix for #4 was pretty simple. Just prepare two separate entry-asar files. One for asar's and one in case there is no asar. And copy the right one for each situation.

The fix for #5 was renaming the directories to app-x64 and app-arm64 instead of x64.app and arm64.app. I've also renamed the asar files, to match this new naming scheme.

For #2, I now check if the asar or app directories are identical. If they are, then we can leave the exiting asar or app directory just in place in the tmp directory. No need to rename and create and entry-asar. In case of an asar, I use the already existing sha function to check if they are identical. In case of an app directory I use a new dependency dir-compare to check the directories by size and content.

@NielsLeenheer NielsLeenheer changed the title fix: no asar support (#4), renamed directories (#5) and check if we need to duplicate asar's (#1) fix: no asar support (#4), renamed directories (#5) and check if we need to duplicate asar's (#2) Nov 19, 2020
Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

This all seems legit enough 😄

process._archPath = require.resolve('../app-x64.asar');
}

require(process._archPath);
Copy link
Member

Choose a reason for hiding this comment

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

prettier should have done this for us but can you add the trailing new line in here?

process._archPath = require.resolve('../app-x64');
}

require(process._archPath);
Copy link
Member

Choose a reason for hiding this comment

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

Same here, missing new line

@NielsLeenheer
Copy link
Contributor Author

Fixed! Added a new line to both entry-asar files.

@MarshallOfSound MarshallOfSound merged commit 82acb6f into electron:master Nov 19, 2020
@electron-bot
Copy link

🎉 This PR is included in version 1.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants