You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lossless-cut/CONTRIBUTING.md

6.0 KiB

Contributing

Translations / i18n

Development environment setup

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

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

Note: yarn may take some time to complete.

Installing ffmpeg

Run one of the below commands:

yarn download-ffmpeg-darwin-x64
yarn download-ffmpeg-darwin-arm64
yarn download-ffmpeg-linux-x64
yarn download-ffmpeg-win32-x64
yarn download-ffmpeg-win32-arm64

For Windows, you may have to install 7z, and then put the 7z folder in your PATH.

Run app in development mode

yarn dev

Run all code checks and tests

Run linting, code style, types, tests etc with the following command:

yarn check

Most of these checks are automatically run in GitHub Actions.

Other scripts

See package.json "scripts" section.

Contributing code

To contribute code, use pull requests. If you would like to contribute a lot of code, please first create an issue to check the viability of your change - the larger the PR you submit, the less likely that it will be merged.

mas-dev (Mac App Store) local build

This will sign using the development provisioning profile:

yarn 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 located here:

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

Starting over fresh

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

Windows Store notes

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

Before releasing, consider Maintainence chores first.

Prepare and build new version

  • git checkout master
  • git merge stores (in case there's an old unmerged stores hotfix)
  • Manually prepare release notes from commit history (use node script/getCommits.ts to assist)
  • Create a new file versions/x.y.z.md and write the most important highlights from the release notes, but remove github issue #references
  • node script/generateVersions.ts && git add versions/*.md src/renderer/src/versions.json && git commit -m 'Update change log'
  • If Store-only hotfix release
    • git checkout stores
    • npm version patch
  • If normal GitHub-first release
    • npm version minor && git --no-pager show
  • git push --follow-tags
  • Wait for build and draft in Github actions

Release built version

  • Open draft in github and add the prepared release notes
  • If GitHub release
    • Release the draft
  • If Store-only hotfix release
    • Remove all other artifacts and release the draft as pre-release

After releasing in GitHub

  • If Stores-only hotfix release
    • git checkout master
    • git merge stores
  • Bump snap version
  • Copy paste release notes and post to discord & twitter and re-tweet

After releasing existing GitHub version in Stores

  • git checkout stores
  • Find the tag just released in the Stores
  • Merge this tag (from master) into stores: git merge vX.Y.Z
  • git push
  • git checkout master

More info

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

Minimum OS version

See requirements.

MacOS LSMinimumSystemVersion

How to check the value:

yarn pack-mas-dev
cat dist/mas-dev-arm64/LosslessCut.app/Contents/Info.plist

Look for the key LSMinimumSystemVersion.

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

See also MACOSX_DEPLOYMENT_TARGET in ffmpeg-build-script.

Links:

Maintainence chores

Upgrade FFmpeg

Upgrade Electron

Keep dependencies up to date

yarn upgrade-interactive

i18n strings / Weblate

Run yarn scan-i18n to get the newest English strings and push so Weblate gets them.

Find the latest PR from Weblate and rebase+merge it.

Warning: Do not squash and merge (see here why)!

Regenerate licenses file

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

Then deploy.

Dependabot

https://github.com/mifi/lossless-cut/security/dependabot

FFmpeg builds

Other