{"action":"created","issue":{"url":"https://api.github.com/repos/asamuzaK/withExEditorHost/issues/24","repository_url":"https://api.github.com/repos/asamuzaK/withExEditorHost","labels_url":"https://api.github.com/repos/asamuzaK/withExEditorHost/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/asamuzaK/withExEditorHost/issues/24/comments","events_url":"https://api.github.com/repos/asamuzaK/withExEditorHost/issues/24/events","html_url":"https://github.com/asamuzaK/withExEditorHost/issues/24","id":298051234,"number":24,"title":"Remove the need for users to set up Node.js themselves","user":{"login":"ssokolow","id":46915,"avatar_url":"https://avatars3.githubusercontent.com/u/46915?v=4","gravatar_id":"","url":"https://api.github.com/users/ssokolow","html_url":"https://github.com/ssokolow","followers_url":"https://api.github.com/users/ssokolow/followers","following_url":"https://api.github.com/users/ssokolow/following{/other_user}","gists_url":"https://api.github.com/users/ssokolow/gists{/gist_id}","starred_url":"https://api.github.com/users/ssokolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssokolow/subscriptions","organizations_url":"https://api.github.com/users/ssokolow/orgs","repos_url":"https://api.github.com/users/ssokolow/repos","events_url":"https://api.github.com/users/ssokolow/events{/privacy}","received_events_url":"https://api.github.com/users/ssokolow/received_events","type":"User","site_admin":false},"labels":[{"id":532910299,"url":"https://api.github.com/repos/asamuzaK/withExEditorHost/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":38,"created_at":"2018-02-18T01:34:26Z","updated_at":"2018-05-25T10:48:19Z","closed_at":null,"author_association":"NONE","body":"As a means of doing something useful with my spiteful urges against the limitations of the WebExtensions API, I've been researching options for making native messaging hosts as easy for end-users to install as possible.\r\n\r\nI was wondering whether you're be receptive to the idea.\r\n\r\nFor withExEditorHost, it would require two steps at minimum:\r\n\r\n## 1. Removing the need to install Node.js separately\r\n\r\nThis can be accomplished using [pkg](https://github.com/zeit/pkg) or [nexe](https://github.com/nexe/nexe). (Or possibly [node-compiler](https://github.com/hellojixian/node-compiler) or [node-packer](https://github.com/pmq20/node-packer) but I hadn't heard of them before.)\r\n\r\nBoth tools allow you to bundle your project, the Node.js runtime, and all of your dependencies into a single executable. (And to generate Windows, Linux, and MacOS versions from the same machine as long as none of your dependencies are compiled C modules. They can download the ready-made runtimes from the Node site.)\r\n\r\n## 2. Giving Windows users something friendlier than `setup.js`\r\n\r\nThe simplest way to accomplish this would be to build an installer. (Which will also allow you to use LZMA (7-zip) compression without requiring users to have 7-zip installed.)\r\n\r\nThere are three tools I know of which are free and open source, good enough that major companies are using them, and powerful enough to be scripted into autodetecting which browsers are installed and enabling/disabling entries in the components list based on that:\r\n\r\n1. [InnoSetup](http://www.jrsoftware.org/isinfo.php) (Basic functionality is defined via a `.ini`-like format. Advanced functionality is supported by a Pascal-based scripting language added in version 4.x. You could either have a \"component\" for each browser and [disable](https://stackoverflow.com/questions/7353990/inno-setup-hide-disable-component-at-runtime) ones that weren't found or use [`CreateInputOptionPage`](http://www.jrsoftware.org/ishelp/topic_isxfunc_createinputoptionpage.htm) to create a wizard page full of checkboxes... I recommend the former.)\r\n2. [NSIS](https://en.wikipedia.org/wiki/Nullsoft_Scriptable_Install_System) (Uses its own internal scripting language, but has the longest history of being scriptable and NSIS installers can also be created on Debian/Ubuntu/Mint Linux without using Wine via the `nsis` package.)\r\n3. [WiX](https://en.wikipedia.org/wiki/WiX) Microsoft's toolkit for building `.msi` files. (While this is technically the best solution for the end-user, I find it harder to learn than the other two choices and haven't learned enough about it to know how to actually use it in this situation yet... but it looks like the dialog set you'd want to use is [WixUI_FeatureTree](http://wixtoolset.org/documentation/manual/v3/wixui/dialog_reference/wixui_featuretree.html).)\r\n\r\nAs for checking for updates, the best solution would probably be to have the browser extension responsible for doing that, with the host just telling the extension its version number when asked."},"comment":{"url":"https://api.github.com/repos/asamuzaK/withExEditorHost/issues/comments/392015924","html_url":"https://github.com/asamuzaK/withExEditorHost/issues/24#issuecomment-392015924","issue_url":"https://api.github.com/repos/asamuzaK/withExEditorHost/issues/24","id":392015924,"user":{"login":"ssokolow","id":46915,"avatar_url":"https://avatars3.githubusercontent.com/u/46915?v=4","gravatar_id":"","url":"https://api.github.com/users/ssokolow","html_url":"https://github.com/ssokolow","followers_url":"https://api.github.com/users/ssokolow/followers","following_url":"https://api.github.com/users/ssokolow/following{/other_user}","gists_url":"https://api.github.com/users/ssokolow/gists{/gist_id}","starred_url":"https://api.github.com/users/ssokolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssokolow/subscriptions","organizations_url":"https://api.github.com/users/ssokolow/orgs","repos_url":"https://api.github.com/users/ssokolow/repos","events_url":"https://api.github.com/users/ssokolow/events{/privacy}","received_events_url":"https://api.github.com/users/ssokolow/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T10:48:19Z","updated_at":"2018-05-25T10:48:19Z","author_association":"NONE","body":"Sorry for going silent for so long. I'm still trying to get other concerns under control, but, to make sure it doesn't get lost, here's the research I've done toward the goal of building an installer:\r\n\r\nInnoSetup is the most comfortable to work with, having a nice and well-documented `.ini`-style declarative format, optionally extended with PascalScript:\r\n\r\n* [Inno Setup Downloads](http://www.innosetup.com/isdl.php) (Contains the Windows IDE and compiler, for doing the initial development work)\r\n* [node-innosetup-compiler](https://github.com/felicienfrancois/node-innosetup-compiler) (An automated means of downloading and running the InnoSetup compiler from a Node.js-hosted build script which is explicitly compatible with both Windows and, when Wine is installed, other OSes)\r\n* [Inno Setup Help](http://www.innosetup.com/ishelp/) (Especially \"Setup Script Sections > [Registry] section\", which has an example of population a registry key via variable substitution, and \"Pascal Scripting\", which is necessary for displaying custom wizard pages and dynamically filling the install path in the manifest file.)\r\n* [A StackOverflow page](https://stackoverflow.com/questions/15335340/inno-setup-working-with-json) which has examples of subbing values into a JSON file (ie. setting the install path within the manifest) during installation using either a regexp or a JSON-manipulating InnoSetup extension.\r\n\r\nNSIS could also do the trick, but it's got a *very* low-level scripting language (even flow-control constructs you'd typically expect to be core language functions are implemented as macros) and something as simple as automatically recording what got installed for use by the uninstaller doesn't come bundled, so you have to grab a user-contributed implementation from the wiki... but, for what it's worth, it's the only open-source option which combines scripting and support all the way back to Windows 95.)\r\n\r\n* The Ubuntu [nsis](https://packages.ubuntu.com/trusty/nsis) and [nsis-pluginapi](https://packages.ubuntu.com/trusty/nsis-pluginapi) packages enable cross-building of Windows installers if using [Travis CI](https://travis-ci.org/) without [AppVeyor](https://www.appveyor.com/) for package-building.\r\n* [NSIS Users Manual](http://nsis.sourceforge.net/Docs/)\r\n   * [Scripting Reference: Registry, INI, File Instructions](http://nsis.sourceforge.net/Docs/Chapter4.html#registry)\r\n   * [Appendix D.2: Add uninstall information to Add/Remove Programs](http://nsis.sourceforge.net/Docs/AppendixD.html#useful_add_uninst_infos)\r\n   * [Appendix E: Useful Headers](http://nsis.sourceforge.net/Docs/AppendixE.html)\r\n* [NSIS Modern User Interface](http://nsis.sourceforge.net/Docs/Modern%20UI%202/Readme.html) (reference and examples for frontend stuff)\r\n* NSIS Wiki:\r\n   * [Best practices](http://nsis.sourceforge.net/Best_practices)\r\n   * [Category: Tutorials](http://nsis.sourceforge.net/Category:Tutorials)\r\n   * [Category: Code Examples](http://nsis.sourceforge.net/Category:Code_Examples)\r\n   * [Uninstall only installed files](http://nsis.sourceforge.net/Uninstall_only_installed_files)\r\n   * [Add uninstall information to Add/Remove Programs](http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs)\r\n   * [Auto-uninstall old before installing new](http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new)\r\n   * [Adding custom installer pages](http://nsis.sourceforge.net/Adding_custom_installer_pages)\r\n   * [NsJSON plug-in](http://nsis.sourceforge.net/NsJSON_plug-in)\r\n* [Nsis: Modifying a Json file using NsJson - Stack Overflow](https://stackoverflow.com/questions/15220538/nsis-modifying-a-json-file-using-nsjson)\r\n\r\nFinally, Microsoft's recommended solution is to use the Microsoft Installer (ie. build a `.msi` file) but the only open-source solution for that is their [WiX Toolset](http://wixtoolset.org/), which isn't worth the hassle unless you're building a big, compiex project with a bunch of dependencies like DirectX, the .NET framework, or Visual C++ redistributables that need to have their installers bundled in... and even if it *is* worth the hassle, the free documentation I examined was a pain in the butt. (It's no wonder InstallShield remained a profitable product after switching to using MSI as a backend.)"}}
{"actor":{"display_login":"ssokolow"}}