1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 02:12:30 +01:00

add licenses

This commit is contained in:
Mikael Finstad 2021-11-15 14:32:27 +07:00
parent 76f3263c9e
commit 7c6a1607c1
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26
4 changed files with 25 additions and 2 deletions

View File

@ -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.

View File

@ -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",

View File

@ -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,
};

View File

@ -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 = [
@ -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); },