Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Add .desktop file and a script to regenerate it
Browse files Browse the repository at this point in the history
  • Loading branch information
jwheare committed Feb 12, 2020
1 parent 0b74a4c commit 4fdfd08
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
10 changes: 10 additions & 0 deletions build/irccloud.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Name=IRCCloud
Exec=/opt/IRCCloud/irccloud --no-sandbox %U
Terminal=false
Type=Application
Icon=irccloud
StartupWMClass=IRCCloud
Comment=IRCCloud Desktop Client
MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;
Categories=Network;IRCClient;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"snyk": "snyk test",
"test": "eslint app",
"snyk-protect": "snyk protect",
"prepare": "yarn run snyk-protect"
"prepare": "yarn run snyk-protect",
"desktop-file": "node ./scripts/desktop-file.js"
},
"irccloud": {},
"devDependencies": {
Expand Down
13 changes: 13 additions & 0 deletions scripts/desktop-file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const b = require('electron-builder');
const LinuxTargetHelper = require("app-builder-lib/out/targets/LinuxTargetHelper");

const config = require('../electron-builder.json');
const pkg = require('../package.json');

let p = new b.Packager({linux: ['deb']});
p._configuration = config;
p._metadata = pkg;

let h = p.createHelper(b.Platform.LINUX);
let lth = new LinuxTargetHelper.LinuxTargetHelper(h);
lth.writeDesktopEntry(config.linux, null, `./build/${config.linux.executableName}.desktop`);

0 comments on commit 4fdfd08

Please sign in to comment.