Conversation
Current package detailsCurrent package file listClick to expand! |
New package detailsNew package file listClick to expand! |
| "electron-packager": "^14.2.1", | ||
| "electron-winstaller": "4.0.0" | ||
| }, | ||
| "optionalDependencies": { |
There was a problem hiding this comment.
I had to use this section because Windows will complain that it cannot install this.
Minor thing to be aware of if this ever gets upstreamed.
| maintainer: 'Brendan Forster <github@brendanforster.com>', | ||
| } | ||
|
|
||
| export async function packageDebian(): Promise<string> { |
There was a problem hiding this comment.
This is the pattern I stumbled upon for these modules - an exported function that does the work to perform the packaging, returning a string when the promise resolves, or throwing an error if it cannot complete.
This felt a bit cleaner than using sync functions from Node to perform blocking work, and there's examples in here where we can convert a callback-based function into a promise-returning function using util.promisify.
| return Promise.reject('Windows is not supported') | ||
| } | ||
|
|
||
| const installer = require('electron-installer-debian') |
There was a problem hiding this comment.
This is required inline because of the problem with the dependency not being present on Windows - easier to avoid this blowing up if the script is accidentally invoked.
| '1024x1024': 'app/static/logos/1024x1024.png', | ||
| }, | ||
| scripts: { | ||
| postinst: 'script/resources/deb/postinst.sh', |
There was a problem hiding this comment.
I've moved the original linux-after-install.sh and linux-after-remove.sh scripts into this directory to indicate it's tied to a specific installer, and as we find ourselves maintaining specific files for different installers we can introduce additional directories.
Resolves #262
electron-installer-debianoptional for Windowsdpkg-debSectionandPriorityconfig valuesdependsset works and app launchesgithubcommand line shortcut worksmimeTypesstill work as expected