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

Clarify build and patch processes for code signing #597

Closed
derek-groupmail opened this issue Apr 1, 2019 · 1 comment
Closed

Clarify build and patch processes for code signing #597

derek-groupmail opened this issue Apr 1, 2019 · 1 comment

Comments

@derek-groupmail
Copy link

I'm hoping to use Nexe because:-

"...You want to codesign the executable. By bypassing the built in bundler (with a patch) you can create an application executable that can be signed/verified..."

However, I don't see any obvious way in the main documentation how to apply the build and patch options or how to apply the various option configurations listed in those main docs. Is there any other documentation links out there I'm missing perhaps?

So... noob questions:-

Are these build, patch and configuration options applied entirely via the command line? I can do rudimentary builds using the basic options listed in the --help but don't see any command line way of passing in a configuration option object to nexe?

Or are these option configurations perhaps supplied to nexe by including a "nexe": {...} option configuration section in the package.json of the app I want to compile?

Or, do I have to create a separate javascript or node build script which requires nexe and uses the nexe.compile() option to programmatically control the build options etc.

Presumably it's the latter, but I don't see any obvious examples of how to do this. I'm familiar with the snippet for this in #446 but I just don't see where that code should go!

Could you provide in the docs a sample set of scripts for successfully compiling a hello world node app that should be capable of being code signed using the build and patch scripts and showing what goes where?

I'm currently building on a Mac, but hope to target windows soon as well, so if there are any major differences for each platform, it would be great if you could highlight those.

@calebboyd
Copy link
Member

"...You want to codesign the executable. By bypassing the built in bundler (with a patch) you can create an application executable that can be signed/verified..."

After #600 this should be possible using pre-builds (the CI system will have to build them... but the builds will be a while provisioning) Thanks @foxever!

However, I don't see any obvious way in the main documentation how to apply the build and patch options or how to apply the various option configurations listed in those main docs. Is there any other documentation links out there I'm missing perhaps?

You can use the programmatic API
Or you can use the cli nexe --build --patch ./some/patch.js
A simple patch example
Patch API

Are these build, patch and configuration options applied entirely via the command line?

Yeah, if you want, you can use --patch ./path/to/patch/script The default export is expected, just like the nodeGyp example

Or are these option configurations perhaps supplied to nexe by including a "nexe": {...} option configuration section in the package.json of the app I want to compile?

Nexe doesn't support a package.json configuration

Or, do I have to create a separate javascript or node build script which requires nexe and uses the nexe.compile() option to programmatically control the build options etc.

If you want, all the options should be possible with the CLI (except custom downloadOptions -- which are not documented (purposefully) anyway)

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

No branches or pull requests

2 participants