automation-stack / electron-sudo

Electron subprocesses with administrative privileges, prompting the user with an OS dialog if necessary.
MIT License
383 stars 55 forks source link

works with electron-builder #31

Open zh99998 opened 8 years ago

zh99998 commented 8 years ago

It can't run with electron-builder dist package Image: Imgur

in fact, this executable is in /Users/zh99998/mycard/dist/mac/MyCard.app/Contents/Resources/app.asar.unpacked/node_modules/electron-sudo/dist/bin

notice app.asar.unpacked during packaging, it says: node_modules/electron-sudo is not packed into asar archive - contains executable code and then leaves it in app.asar.unpacked under Resources root.

further more, I can't code sign my package (it will automatically done with with electron-builder before)

Signing app (identity: Developer ID Application: XIAOCHI CHEN (ZNVDEVDRX3))
Error: Command failed: codesign --sign Developer ID Application: XIAOCHI CHEN (ZNVDEVDRX3) --force --keychain /var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/electron-builder-eH2lUj/t-d16-0.keychain /Users/travis/build/mycard/mycard/dist/mac/MyCard.app/Contents/Resources/app.asar.unpacked/node_modules/electron-sudo/dist/bin/applet.app/Contents/MacOS/applet
/Users/travis/build/mycard/mycard/dist/mac/MyCard.app/Contents/Resources/app.asar.unpacked/node_modules/electron-sudo/dist/bin/applet.app/Contents/MacOS/applet: unsealed contents present in the bundle root

seems it caused by this executable file and maybe can solved by some manually codesign command call, but I googled it for several hours and can't get it work.... I can provide a apple developer certificate if it helps to debug.

automation-stack commented 8 years ago

@zh99998 it's actual problem, need to investigate this

automation-stack commented 7 years ago

@zh99998 will get support in version 5.0 with "asar-unpack" in package.json

gniezen commented 7 years ago

Any update on when version 5.0 will be released?