1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 18:32:34 +01:00
lossless-cut/developer-notes.md
2023-02-16 23:22:27 +08:00

3.4 KiB

Development

This app is built using Electron. Make sure you have at least Node v14. The app uses ffmpeg from PATH when developing.

npm install -g yarn
git clone https://github.com/mifi/lossless-cut.git
cd lossless-cut
yarn

Note: yarn may take some time to complete.

Installing ffmpeg

Run one of the below commands:

npm run download-ffmpeg-darwin-x64
npm run download-ffmpeg-darwin-arm64
npm run download-ffmpeg-linux-x64
npm run download-ffmpeg-win32-x64

Running

npm start

Building for production

See:

Building mas-dev (Mac App Store) build locally

This will sign using the development provisioning profile:

npm run pack-mas-dev

MAS builds have some restrictions, see isMasBuild variable in code. In particular, any file cannot be read without the user's consent.

NOTE: when MAS (dev) build, Application Support will instead be here:

~/Library/Containers/no.mifi.losslesscut-mac/Data/Library/Application Support

Starting over fresh

rm -rf ~/Library/Containers/no.mifi.losslesscut-mac

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.

Releasing

For per-platform build/signing setup, see this article.

Release new version

  • Commit changes
  • npm version ...
  • git push && git push --tags
  • Wait for build and draft in Github actions
  • Release draft at github
  • Bump snap version
  • npm run scan-i18n to get the newest Englist strings and push so weblate gets them

Minimum OS version

Minimum supported OS versions for Electron. As of electron 22:

  • MacOS High Sierra 10.13
  • Windows 10

MacOS LSMinimumSystemVersion

How to check the value:

npm run pack-mas-dev
cat dist/mas-dev-arm64/LosslessCut.app/Contents/Info.plist
<key>LSMinimumSystemVersion</key>
<string>10.13</string>

LSMinimumSystemVersion can be overridden in electron-builder by mac.minimumSystemVersion

See also MACOS_MIN in ffmpeg-build-script.

Links:

Maintainence chores

Keep dependencies up to date

  • ffmpeg
  • electron
  • package.json

i18n

npm run scan-i18n

Licenses

Generate summary

npx license-checker --summary

Regenerate licenses file

npm run generate-licenses
#cp licenses.txt losslesscut.mifi.no/public/

Then deploy.