revery-packager
revery-packager copied to clipboard
Helper utility to package Revery applications into installable app bundles
revery-packager
Utility inspired by electron-builder for bundling Revery applications into installable application packages.
This is extracted out from the Onivim 2 packaging scripts, and provides a way to get redistributable executables from your Revery projects.
This packager takes care of some of the heavy lifting, like:
- Windows: Bringing in the proper set of runtime DLL dependencies
- OS X: Bundling
dylibsand remappingrpaths to be relocatable - Linux: Bundling
solibs and remappingrpath's to be relocatable.
...but you don't have to worry about that - you can just run revery-packager and be good to go.
Installation
npm install -g revery-packager`
Usage
- Ensure your Revery project is built and up-to-date (
esy install,esy build). - Run
revery-packagerat the root of your Revery project.
You'll find the release artifacts for the current platform in the _release folder.
NOTE: Today,
revery-packagerdoesn't support 'cross-platform' packaging - meaning you need to runrevery-packageron each platform you wish to distribute builds. We recommend Azure Devops CI as a way build and get packages for all platforms - see our revery-quick-start pipeline for an example.
Configuration
You can customize the behavior of the packager by adding a revery-packager section to your package.json, like:
package.json
"name": "revery-quick-start",
"version": "1.3.0",
"description": "Revery quickstart",
"license": "MIT",
"esy": {
"build": "refmterr dune build -p App",
"buildsInSource": "_build"
},
"revery-packager": {
"bundleName": "ExampleApp",
"bundleId": "com.example.app",
"displayName": "Revery Example App",
"mainExecutable": "App",
"windows": {
"packages": ["zip"],
"iconFile": "assets/icon.ico"
},
"darwin": {
"packages": ["tar", "dmg"],
"iconFile": "assets/icon.icns"
},
"linux": {
"packages": ["tar", "appimage"]
}
},
...
The following properties are configurable:
bundleName- The bundle name of the application. Used for manifests and for the filename.bundleId- An identifier for the application. Used as theCFBundleIdentifierfor Mac.displayName- Display name of the application, used for installers, desktop entries, etc.mainExecutable- The entry point for the application. There should be no.exesuffix added.packages- per-platform list of packages to build:dmgBackground- MAC-ONLY - background to use for DMG installerappImageType- LINUX-ONLY - type to use in the desktop entry for the AppImageappImageCategory- LINUX_ONLY - category to use for the desktop entry for the AppImageiconFile- Windows - an
.icofile to use for the executable - Linux - a
.pngfile to use the desktop entry - Mac - an
.icnsfile to use for the app icon
- Windows - an
You can also specify per-platform settings by using the windows, darwin, and linux sections - you probably want to do this for settings like iconFile.
Roadmap
- Windows
- [ ] Code signing
- [x]
zippackage - [ ]
exeinstaller - [ ]
msiinstaller
- OSX
- [ ] Code signing
- [ ] Notarization
- [x]
tarpackage - [x]
dmgpackage
- Linux
- [ ] GPG signature
- [x]
tarpackage - [x]
appimagepackage
License
MIT License
Copyright 2019 Outrun Labs, LLC