Skip to content

Commit

Permalink
add licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Nov 15, 2021
1 parent 76f3263 commit 7c6a160
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
16 changes: 16 additions & 0 deletions developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,19 @@ For per-platform build/signing setup, see https://blog.mifi.no/2020/03/31/automa
- Release draft at github
- Bump [snap version](https://snapcraft.io/losslesscut/listing)
- `npm run scan-i18n` to get the newest Englist strings and push so weblate gets them

## Licenses

### Generate summary

```
npx license-checker --summary
```

### Regenerate licenses file

```
npm run generate-licenses
#cp licenses.txt mifi.no/public/losslesscut/
```
Then deploy.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"postinstall": "patch-package && electron-builder install-app-deps",
"pack-linux": "electron-builder --linux",
"prepack-linux": "yarn build",
"scan-i18n": "i18next-scanner --config i18next-scanner.config.js"
"scan-i18n": "i18next-scanner --config i18next-scanner.config.js",
"generate-licenses": "yarn licenses generate-disclaimer > licenses.txt && echo '\n\nffmpeg is licensed under GPL v2+:\n\nhttp://www.gnu.org/licenses/old-licenses/gpl-2.0.html' >> licenses.txt"
},
"author": {
"name": "Mikael Finstad",
Expand Down
2 changes: 2 additions & 0 deletions public/constants.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const homepage = 'https://mifi.no/losslesscut/';
const githubLink = 'https://github.com/mifi/lossless-cut/';
const releasesPage = 'https://github.com/mifi/lossless-cut/releases';
const licensesPage = 'https://mifi.no/losslesscut/licenses.txt';

module.exports = {
homepage,
releasesPage,
githubLink,
licensesPage,
};
6 changes: 5 additions & 1 deletion public/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const i18n = require('i18next');
const { Menu } = electron;
const { dialog } = electron;

const { homepage, releasesPage } = require('./constants');
const { homepage, releasesPage, licensesPage } = require('./constants');

module.exports = (app, mainWindow, newVersion) => {
const menu = [
Expand Down Expand Up @@ -273,6 +273,10 @@ module.exports = (app, mainWindow, newVersion) => {
mainWindow.webContents.send('openAbout');
},
},
{
label: i18n.t('Licenses'),
click() { electron.shell.openExternal(licensesPage); },
},
{
label: i18n.t('Learn More'),
click() { electron.shell.openExternal(homepage); },
Expand Down

0 comments on commit 7c6a160

Please sign in to comment.