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.
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
andapp-arm64
instead ofx64.app
andarm64.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.