2023-01-02 05:41:59 +01:00
## Development
2020-02-23 11:21:31 +01:00
2021-01-18 22:19:06 +01:00
This app is built using Electron.
2021-10-30 17:43:50 +02:00
Make sure you have at least Node v14. The app uses ffmpeg from PATH when developing.
2021-01-18 22:19:06 +01:00
```bash
npm install -g yarn
2020-02-23 11:21:31 +01:00
```
2021-01-18 22:19:06 +01:00
```bash
2020-02-23 11:21:31 +01:00
git clone https://github.com/mifi/lossless-cut.git
cd lossless-cut
2020-05-06 08:06:06 +02:00
yarn
2020-02-23 11:21:31 +01:00
```
2021-01-18 22:19:06 +01:00
Note: `yarn` may take some time to complete.
2020-02-23 11:21:31 +01:00
2023-01-02 05:41:59 +01:00
### Installing `ffmpeg`
2022-04-15 06:58:55 +02:00
Run one of the below commands:
2021-07-25 06:48:15 +02:00
```bash
2022-11-23 04:43:58 +01:00
npm run download-ffmpeg-darwin-x64
npm run download-ffmpeg-darwin-arm64
npm run download-ffmpeg-linux-x64
npm run download-ffmpeg-win32-x64
2022-04-15 06:58:55 +02:00
```
2020-05-06 08:06:06 +02:00
2022-04-15 06:58:55 +02:00
### Running
```bash
2020-02-23 11:21:31 +01:00
npm start
```
2023-01-02 05:41:59 +01:00
### Building for production
See:
- https://www.electron.build/
- https://github.com/mifi/lossless-cut/blob/master/.github/workflows/build.yml
## Building mas-dev (Mac App Store) build locally
2021-10-30 17:43:50 +02:00
This will sign using the development provisioning profile:
```
npm run pack-mas-dev
```
2023-01-02 05:41:59 +01:00
## Windows Store
Windows store version is built as a Desktop Bridge app (with `runFullTrust` capability). This means the app has access to essentially everything the user has access to, and even `internetClient` is redundant.
- https://learn.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations
- https://learn.microsoft.com/en-us/archive/blogs/appconsult/a-simpler-and-faster-way-to-publish-your-desktop-bridge-applications-on-the-microsoft-store
- https://stackoverflow.com/a/52921641/6519037
## Releasing
2018-05-22 23:32:54 +02:00
2023-01-02 05:41:59 +01:00
For per-platform build/signing setup, see [this article ](https://mifi.no/blog/automated-electron-build-with-release-to-mac-app-store-microsoft-store-snapcraft/ ).
2021-10-30 17:43:50 +02:00
2018-05-22 23:32:54 +02:00
### Release new version
2022-02-20 17:04:18 +01:00
- Commit changes
2020-02-10 08:24:30 +01:00
- `npm version ...`
- `git push && git push --tags`
- Wait for build and draft in Github actions
- Release draft at github
2021-08-25 11:04:32 +02:00
- Bump [snap version ](https://snapcraft.io/losslesscut/listing )
2021-08-28 17:14:15 +02:00
- `npm run scan-i18n` to get the newest Englist strings and push so weblate gets them
2021-11-15 08:32:27 +01:00
2022-01-18 08:09:14 +01:00
## Maintainence chores
2021-11-15 08:32:27 +01:00
2022-01-18 08:09:14 +01:00
### Keep dependencies up to date
- ffmpeg
- electron
- package.json
### i18n
`npm run scan-i18n`
### Licenses
#### Generate summary
2021-11-15 08:32:27 +01:00
```
npx license-checker --summary
```
2022-01-18 08:09:14 +01:00
#### Regenerate licenses file
2021-11-15 08:32:27 +01:00
```
npm run generate-licenses
2022-09-04 15:04:18 +02:00
#cp licenses.txt losslesscut.mifi.no/public//
2021-11-15 08:32:27 +01:00
```
2022-01-18 08:09:14 +01:00
Then deploy.