google / google/dart_cli_pkg

Add support for standalone executables

Open
#67 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Dart
Stars
64
Forks
25
Avg merge
3d 20h
Merged PRs (30d)
10

Description

`dart2native` supports generating fully standalone executables, and we should ideally support this as well for standalone compilation. There are some complications, though: on OS X and Windows, standalone executables need to be signed or they'll produce scary and annoying warnings when they're run. This requires that users purchase a trusted certificate for each OS and run a command to sign the generated executables with those certificates. See details for [OS X](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html) and [Windows](https://mkaz.blog/code/code-signing-a-windows-application/).

I think the best way to handle this would be to have `pkg.standaloneWindowsCert` and `pkg.standaloneMacOSCert` fields and, if those fields are set, generate full standalone executables and sign them. I don't think it's especially useful to generate unsigned executables; they won't be much faster than native snapshots, and the generated warnings will be very frustrating.

Note that for Linux, this is much easier, since code signing isn't required. Given that all three supported operating systems are substantially different here, I'm going to split this up into three tasks:

* [ ] Linux
* [ ] Windows
* [ ] Mac OS

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.