{"id":13681018,"url":"https://github.com/electron-userland/electron-installer-debian","last_synced_at":"2025-05-14T13:09:35.060Z","repository":{"id":3689189,"uuid":"50532900","full_name":"electron-userland/electron-installer-debian","owner":"electron-userland","description":"Create a Debian package for your Electron app.","archived":false,"fork":false,"pushed_at":"2025-05-05T08:03:38.000Z","size":1322,"stargazers_count":380,"open_issues_count":17,"forks_count":71,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-08T04:01:59.585Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electron-userland.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-01-27T19:42:55.000Z","updated_at":"2025-03-30T00:42:29.000Z","dependencies_parsed_at":"2024-06-16T05:28:41.778Z","dependency_job_id":"67e2d680-1bd0-4221-bd37-dbfd6fcf329c","html_url":"https://github.com/electron-userland/electron-installer-debian","commit_stats":{"total_commits":222,"total_committers":16,"mean_commits":13.875,"dds":0.5810810810810811,"last_synced_commit":"1e9ab45aa5a93841d8838758e40970a6de41b07e"},"previous_names":["unindented/electron-installer-debian"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Felectron-installer-debian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Felectron-installer-debian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Felectron-installer-debian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Felectron-installer-debian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron-userland","download_url":"https://codeload.github.com/electron-userland/electron-installer-debian/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149977,"owners_count":22022852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:01:25.064Z","updated_at":"2025-05-14T13:09:30.041Z","avatar_url":"https://github.com/electron-userland.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"![Electron Installer for Debian](resources/logo.png)\n\n# electron-installer-debian [![Version](https://img.shields.io/npm/v/electron-installer-debian.svg)](https://www.npmjs.com/package/electron-installer-debian) [![Build Status](https://img.shields.io/travis/electron-userland/electron-installer-debian.svg)](http://travis-ci.org/electron-userland/electron-installer-debian)\n\n\u003e Create a Debian package for your Electron app.\n\n----\n\n[Usage](#usage) |\n[Options](#options) |\n[Release Notes](https://github.com/electron-userland/electron-installer-debian/blob/main/NEWS.md) |\n[License](https://github.com/electron-userland/electron-installer-debian/blob/main/LICENSE) |\n[Code of Conduct](https://github.com/electron-userland/electron-installer-debian/blob/main/CODE_OF_CONDUCT.md) |\n[Support](https://github.com/electron-userland/electron-installer-debian/blob/main/SUPPORT.md)\n\n## Requirements\n\nThis tool requires Node 10 or greater, `fakeroot`, and `dpkg` to build the `.deb` package.\n\nI'd recommend building your packages on your target platform, but if you insist on using Mac OS X, you can install these tools through [Homebrew](http://brew.sh/):\n\n```\n$ brew install fakeroot dpkg\n```\n\n\n## Installation\n\nFor use from command-line:\n\n```\n$ npm install -g electron-installer-debian\n```\n\nFor use in npm scripts or programmatically:\n\n```\n$ npm install --save-dev electron-installer-debian\n```\n\n\n## Usage\n\nSay your Electron app lives in `path/to/app`, and has a structure like this:\n\n```\n.\n├── LICENSE\n├── README.md\n├── node_modules\n│   ├── electron-packager\n│   └── electron\n├── package.json\n├── resources\n│   ├── Icon.png\n│   ├── IconTemplate.png\n│   └── IconTemplate@2x.png\n└── src\n    ├── index.js\n    ├── main\n    │   └── index.js\n    └── renderer\n        ├── index.html\n        └── index.js\n```\n\nYou now run `electron-packager` to build the app for Debian:\n\n```\n$ electron-packager . app --platform linux --arch x64 --out dist/\n```\n\nAnd you end up with something like this in your `dist` folder:\n\n```\n.\n└── dist\n    └── app-linux-x64\n        ├── LICENSE\n        ├── LICENSES.chromium.html\n        ├── content_shell.pak\n        ├── app\n        ├── icudtl.dat\n        ├── libgcrypt.so.11\n        ├── libnode.so\n        ├── locales\n        ├── natives_blob.bin\n        ├── resources\n        ├── snapshot_blob.bin\n        └── version\n```\n\nHow do you turn that into a Debian package that your users can install?\n\n### Command-Line\n\nIf you want to run `electron-installer-debian` straight from the command-line, install the package globally:\n\n```\n$ npm install -g electron-installer-debian\n```\n\nAnd point it to your built app:\n\n```\n$ electron-installer-debian --src dist/app-linux-x64/ --dest dist/installers/ --arch amd64\n```\n\nYou'll end up with the package at `dist/installers/app_0.0.1_amd64.deb`.\n\n### Scripts\n\nIf you want to run `electron-installer-debian` through npm, install the package locally:\n\n```\n$ npm install --save-dev electron-installer-debian\n```\n\nEdit the `scripts` section of your `package.json`:\n\n```json\n{\n  \"name\": \"app\",\n  \"description\": \"An awesome app!\",\n  \"version\": \"0.0.1\",\n  \"scripts\": {\n    \"start\": \"electron .\",\n    \"build\": \"electron-packager . app --platform linux --arch x64 --out dist/\",\n    \"deb64\": \"electron-installer-debian --src dist/app-linux-x64/ --dest dist/installers/ --arch amd64\"\n  },\n  \"devDependencies\": {\n    \"electron-installer-debian\": \"^0.6.0\",\n    \"electron-packager\": \"^9.0.0\",\n    \"electron\": \"~1.7.0\"\n  }\n}\n```\n\n_*Note*: The versions in `devDependencies` are examples only, please use the latest package versions\nwhen possible._\n\nAnd run the script:\n\n```\n$ npm run deb64\n```\n\nYou'll end up with the package at `dist/installers/app_0.0.1_amd64.deb`.\n\n### Programmatically\n\nInstall the package locally:\n\n```\n$ npm install --save-dev electron-installer-debian\n```\n\nAnd write something like this:\n\n```javascript\nconst installer = require('electron-installer-debian')\n\nconst options = {\n  src: 'dist/app-linux-x64/',\n  dest: 'dist/installers/',\n  arch: 'amd64'\n}\n\nasync function main (options) {\n  console.log('Creating package (this may take a while)')\n  try {\n    await installer(options)\n    console.log(`Successfully created package at ${options.dest}`)\n  } catch (err) {\n    console.error(err, err.stack)\n    process.exit(1)\n  }\n}\nmain(options)\n```\n\nYou'll end up with the package at `dist/installers/app_0.0.1_amd64.deb`.\n\n_Note: As of 1.0.0, the Node-style callback pattern is no longer available. You can use\n[`util.callbackify`](https://nodejs.org/api/util.html#util_util_callbackify_original) if this is\nrequired for your use case._\n\n### Options\n\nEven though you can pass most of these options through the command-line interface, it may be easier to create a configuration file:\n\n```javascript\n{\n  \"dest\": \"dist/installers/\",\n  \"icon\": \"resources/Icon.png\",\n  \"compression\": \"gzip\",\n  \"categories\": [\n    \"Utility\"\n  ],\n  \"lintianOverrides\": [\n    \"changelog-file-missing-in-native-package\"\n  ]\n}\n```\n\nAnd pass that instead with the `config` option:\n\n```\n$ electron-installer-debian --src dist/app-linux-x64/ --arch amd64 --config config.json\n```\n\nAnyways, here's the full list of options:\n\n#### src\nType: `String`\nDefault: `undefined`\n\nPath to the folder that contains your built Electron application.\n\n#### dest\nType: `String`\nDefault: `undefined`\n\nPath to the folder that will contain your Debian installer.\n\n#### rename\nType: `Function`\nDefault: `function (dest, src) { return path.join(dest, src); }`\n\nFunction that renames all files generated by the task just before putting them in your `dest` folder.\n\n#### options.name\nType: `String`\nDefault: `package.name || \"electron\"`\n\nName of the package (e.g. `atom`), used in the [`Package` field of the `control` specification](https://www.debian.org/doc/debian-policy/#package).\n\nAccording to the *Debian Policy Manual*:\n\n\u003e Package names [...] must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.\n\n`electron-installer-debian` will try to help conform to these requirements by lowercasing the name\nprovided and replacing any invalid characters with `-`s.\n\n#### options.productName\nType: `String`\nDefault: `package.productName || package.name`\n\nName of the application (e.g. `Atom`), used in the [`Name` field of the `desktop` specification](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html).\n\n#### options.genericName\nType: `String`\nDefault: `package.genericName || package.productName || package.name`\n\nGeneric name of the application (e.g. `Text Editor`), used in the [`GenericName` field of the `desktop` specification](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html).\n\n#### options.description\nType: `String`\nDefault: `package.description`\n\nShort description of the application, used in the [`Description` field of the `control` specification](https://www.debian.org/doc/debian-policy/#the-single-line-synopsis).\n\n#### options.productDescription\nType: `String`\nDefault: `package.productDescription || package.description`\n\nLong description of the application, used in the [`Description` field of the `control` specification](https://www.debian.org/doc/debian-policy/#the-extended-description).\n\n#### options.version\nType: `String`\nDefault: `package.version || \"0.0.0\"`\n\nVersion number of the package, used in the [`Version` field of the `control` specification](https://www.debian.org/doc/debian-policy/#version).\n\n#### options.revision\nType: `String`\nDefault: `undefined`\n\nRevision number of the package, used in the [`Version` field of the `control` specification](https://www.debian.org/doc/debian-policy/#version) and, by default, the filename of the generated `.deb` file.\n\n#### options.section\nType: `String`\nDefault: `\"utils\"`\n\nApplication area into which the package has been classified, used in the [`Section` field of the `control` specification](https://www.debian.org/doc/debian-policy/#section).\n\nYou can read more about [sections](https://www.debian.org/doc/debian-policy/#sections), and also check out the [list of existing sections in Debian unstable](https://packages.debian.org/unstable/).\n\n#### options.priority\nType: `String`\nDefault: `\"optional\"`\n\nHow important it is that the user have the package installed., used in the [`Priority` field of the `control` specification](https://www.debian.org/doc/debian-policy/#priority).\n\nYou can read more about [priorities](https://www.debian.org/doc/debian-policy/#priorities).\n\n#### options.arch\nType: `String`\nDefault: `undefined`\n\nMachine architecture the package is targeted to, used in the [`Architecture` field of the `control` specification](https://www.debian.org/doc/debian-policy/#architecture).\n\nFor possible values see the output of `dpkg-architecture -L`.\n\n#### options.size\nType: `Integer`\nDefault: `size of the folder`\n\nEstimate of the total amount of disk space required to install the named package, used in the [`Installed-Size` field of the `control` specification](https://www.debian.org/doc/debian-policy/#installed-size).\n\n#### options.depends, recommends, suggests, enhances, preDepends\nType: `Array[String]`\nDefault: For `depends`, the minimum set of packages necessary for Electron to run; See [source code](https://github.com/electron-userland/electron-installer-debian/blob/53fb5c5/src/installer.js#L146-L157) for `recommends`, `suggests`, `enhances`, and `preDepends` default values\n\nRelationships to other packages, used in the [`Depends`, `Recommends`, `Suggests`, `Enhances` and `Pre-Depends` fields of the `control` specification](https://www.debian.org/doc/debian-policy/#binary-dependencies-depends-recommends-suggests-enhances-pre-depends).\n\nAll user dependencies will be appended to the `Default` array of dependencies and any duplicates will be removed.\n\n#### options.maintainer\nType: `String`\nDefault: `package.author.name \u003cpackage.author.email\u003e`\n\nMaintainer of the package, used in the [`Maintainer` field of the `control` specification](https://www.debian.org/doc/debian-policy/#maintainer).\n\n#### options.homepage\nType: `String`\nDefault: `package.homepage || package.author.url`\n\nURL of the homepage for the package, used in the [`Homepage` field of the `control` specification](https://www.debian.org/doc/debian-policy/#homepage).\n\n#### options.bin\nType: `String`\nDefault: `package.name || \"electron\"`\n\nRelative path to the executable that will act as binary for the application, used in the [`Exec` field of the `desktop` specification](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html).\n\nThe generated package will contain a symlink `/usr/bin/\u003c%= options.name %\u003e` pointing to the path provided here.\n\nFor example, providing this configuration:\n\n```javascript\n{\n  src: '...',\n  dest: '...',\n  name: 'foo',\n  bin: 'resources/cli/launcher.sh'\n}\n```\n\nWill create a package with the following symlink:\n\n```\nusr/bin/foo@ -\u003e ../lib/foo/resources/cli/launcher.sh\n```\n\nAnd a desktop specification with the following `Exec` key:\n\n```\nExec=foo %U\n```\n\n#### options.icon\nType: `String` or `Object[String:String]`\nDefault: [`resources/icon.png`](https://github.com/electron-userland/electron-installer-debian/blob/main/resources/icon.png)\n\nPath to a single image that will act as icon for the application:\n\n```javascript\n{\n  icon: 'resources/Icon.png'\n}\n```\n\nOr multiple images with their corresponding resolutions:\n\n```javascript\n{\n  icon: {\n    '48x48': 'resources/Icon48.png',\n    '64x64': 'resources/Icon64.png',\n    '128x128': 'resources/Icon128.png',\n    '256x256': 'resources/Icon256.png',\n    'scalable': 'resources/Icon.svg'\n  }\n}\n```\nNote that the image files must be one of the types: PNG or SVG. The support for SVG works only on `scalable` resolution.\n\n#### options.categories\nType: `Array[String]`\nDefault: `['GNOME', 'GTK', 'Utility']`\n\nCategories in which the application should be shown in a menu, used in the [`Categories` field of the `desktop` specification](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html).\n\nFor possible values check out the [Desktop Menu Specification](http://standards.freedesktop.org/menu-spec/latest/apa.html).\n\n#### options.mimeType\nType: `Array[String]`\nDefault: `[]`\n\nMIME types the application is able to open, used in the [`MimeType` field of the `desktop` specification](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html).\n\n#### options.lintianOverrides\nType: `Array[String]`\nDefault: `[]`\n\nYou can use these to quieten [`lintian`](https://lintian.debian.org/manual/).\n\n#### options.scripts\nType: `Object[String:String]`\nDefault: `undefined`\n\nPath to package maintainer scripts with their corresponding name, used in the [installation procedure](https://www.debian.org/doc/debian-policy/#introduction-to-package-maintainer-scripts):\n\n```javascript\n{\n  scripts: {\n    'preinst': 'resources/preinst_script',\n    'postinst': 'resources/postinst_script',\n    'prerm': 'resources/prerm_script',\n    'postrm': 'resources/postrm_script'\n  }\n}\n```\nYou can read more about [package maintainer scripts](https://www.debian.org/doc/debian-policy/#package-maintainer-scripts-and-installation-procedure) and [general scripts](https://www.debian.org/doc/debian-policy/#scripts)\n\n#### options.desktopTemplate\nType: `String`\nDefault: [`resources/desktop.ejs`](https://github.com/electron-userland/electron-installer-debian/blob/main/resources/desktop.ejs)\n\nThe absolute path to a custom template for the generated [FreeDesktop.org desktop\nentry](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html) file.\n\n#### options.compression\nType: `String`\nDefault: `xz`\n\nSet the compression type used by dpkg-deb when building .deb package\nAllowed values: `'xz', 'gzip', 'bzip2', 'lzma', 'zstd', 'none'`\n\nUsed by `dpkg-deb` to set the compression type. You can read more about it on the [manual page of `dpkg-deb`](https://man7.org/linux/man-pages/man1/dpkg-deb.1.html)\n\n### Installed Package\n\nThe package installs the Electron application into `/usr/lib`, since there are\narchitecture-specific files in the package. There was a [discussion in the issue\ntracker](https://github.com/electron-userland/electron-installer-debian/issues/46) about the\ninstallation directory.\n\nIn versions of `electron-installer-debian` prior to 0.5.0, the app was (incorrectly) installed in\n`/usr/share`.\n\n## Meta\n\n* Code: `git clone git://github.com/electron-userland/electron-installer-debian.git`\n* Home: \u003chttps://github.com/electron-userland/electron-installer-debian/\u003e\n\n\n## Contributors\n\n* Daniel Perez Alvarez ([unindented@gmail.com](mailto:unindented@gmail.com))\n\n\n## License\n\nCopyright (c) 2016 Daniel Perez Alvarez ([unindented.org](https://unindented.org/)). This is free software, and may be redistributed under the terms specified in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron-userland%2Felectron-installer-debian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron-userland%2Felectron-installer-debian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron-userland%2Felectron-installer-debian/lists"}