Closed cstringer closed 5 months ago
Sorry, I don't have a Mac, so I can't verify your issue.
@dusionlike that's quite alright, I'm on a Mac and can easily verify this issue for you.
First, refer to Apple's documentation on the structure of a macOS .app
bundle: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
MyApp.app/
Contents/
Info.plist
MacOS/
Resources/
As it mentions for the MacOS
sub-directory: "(Required) Contains the application’s standalone executable code. Typically, this directory contains only one binary file with your application’s main entry point and statically linked code."
Here is the output from running npm run release
on the "playground" code as-is:
By adding the correct MacOS
subdirectory in index.ts
, the build succeeds:
Let me know if there's anything else I can provide to assist, thanks!
@cstringer It looks like you're right. Can you create a PR? thanks! ❤️
https://github.com/dusionlike/electron-builder-encryptor/blob/6bb97042619f78839d6e903b6c41544149a36d38/src/index.ts#L64
Currently, the executable path (
execPath
) for thecompileToBytenode()
function on MacOS builds is missing the "MacOS" subdirectory. For example:And thank you for this cool project, it is a very interesting idea!