Showing with 29,693 additions and 16,884 deletions.
  1. +2 −1 .eslintignore
  2. +0 −31 .eslintrc
  3. +37 −0 .eslintrc.cjs
  4. +4 −4 .github/ISSUE_TEMPLATE/{file-issue.yml → 1-file-issue.yml}
  5. +9 −6 .github/ISSUE_TEMPLATE/{bug.yml → 2-bug.yml}
  6. +2 −2 .github/ISSUE_TEMPLATE/{feature.yml → 3-feature.yml}
  7. +23 −23 .github/workflows/build.yml
  8. +0 −19 .github/workflows/pr.yml
  9. +29 −0 .github/workflows/test.yml
  10. +2 −1 .gitignore
  11. +1 −1 .vscode/settings.json
  12. +60 −0 .yarn/patches/app-builder-lib-npm-24.8.0-51e1f5cd3f.patch
  13. +8 −8 .yarn/plugins/@yarnpkg/plugin-licenses.cjs
  14. +0 −807 .yarn/releases/yarn-3.3.0.cjs
  15. +893 −0 .yarn/releases/yarn-4.0.2.cjs
  16. +6 −3 .yarnrc.yml
  17. +23 −20 README.md
  18. +48 −0 api.md
  19. +42 −5 cli.md
  20. +27 −57 developer-notes.md
  21. +37 −0 electron.vite.config.js
  22. +2 −0 entitlements.mas.plist
  23. +11 −0 expressions.md
  24. +785 −0 ffprobe.ts
  25. +4 −3 i18next-parser.config.mjs
  26. +15 −9 import-export.md
  27. +94 −33 issues.md
  28. +203 −92 {public → }/locales/cs/translation.json
  29. +168 −48 {public → }/locales/de/translation.json
  30. +99 −31 {public → }/locales/en/translation.json
  31. 0 {public → }/locales/es/translation.json
  32. 0 {public → }/locales/et/translation.json
  33. 0 {public → }/locales/fa/translation.json
  34. +59 −47 {public → }/locales/fi/translation.json
  35. +757 −0 locales/fr/translation.json
  36. 0 {public → }/locales/he/translation.json
  37. +41 −0 locales/hu/translation.json
  38. 0 {public/locales/hu → locales/id}/translation.json
  39. +217 −106 {public → }/locales/it/translation.json
  40. +167 −56 {public → }/locales/ja/translation.json
  41. +314 −64 {public → }/locales/ko/translation.json
  42. 0 {public → }/locales/lt/translation.json
  43. 0 {public → }/locales/nb_NO/translation.json
  44. +63 −17 {public → }/locales/nl/translation.json
  45. +5 −5 {public → }/locales/nn/translation.json
  46. +743 −0 locales/pl/translation.json
  47. 0 {public → }/locales/pt/translation.json
  48. +205 −51 {public → }/locales/pt_BR/translation.json
  49. 0 {public → }/locales/ro/translation.json
  50. +852 −0 locales/ru/translation.json
  51. +12 −0 locales/si/translation.json
  52. +686 −0 locales/sk/translation.json
  53. +680 −0 locales/sl/translation.json
  54. 0 {public/locales/id → locales/sr}/translation.json
  55. 0 {public → }/locales/sv/translation.json
  56. +340 −129 {public → }/locales/tr/translation.json
  57. +705 −0 locales/uk/translation.json
  58. +2 −1 {public → }/locales/vi/translation.json
  59. +147 −36 {public → }/locales/zh_Hans/translation.json
  60. +800 −0 locales/zh_Hant/translation.json
  61. BIN main_screenshot.jpg
  62. +12 −0 no.mifi.losslesscut.appdata.xml
  63. +91 −77 package.json
  64. +0 −11 public/constants.js
  65. +0 −380 public/locales/fr/translation.json
  66. +0 −253 public/locales/pl/translation.json
  67. +0 −609 public/locales/ru/translation.json
  68. +0 −1 public/locales/sr/translation.json
  69. +0 −3 public/locales/uk/translation.json
  70. +0 −506 public/locales/zh_Hant/translation.json
  71. +0 −33 public/logger.js
  72. +0 −5 public/util.js
  73. +8 −0 requirements.md
  74. +0 −22 script/icon-gen.mjs
  75. +32 −0 script/icon-gen.mts
  76. +4 −4 script/{postversion.mjs → postversion.mts}
  77. +12 −8 script/{xcrun-wrapper.mjs → xcrun-wrapper.mts}
  78. +0 −2,437 src/App.jsx
  79. +0 −55 src/Canvas.jsx
  80. +0 −109 src/CanvasPlayer.js
  81. +0 −47 src/NoFileLoaded.jsx
  82. +0 −323 src/SegmentList.jsx
  83. +0 −489 src/StreamsSelector.jsx
  84. +0 −235 src/components/ConcatDialog.jsx
  85. +0 −10 src/components/HighlightedText.jsx
  86. +0 −617 src/components/KeyboardShortcuts.jsx
  87. +0 −118 src/components/OutSegTemplateEditor.jsx
  88. +0 −44 src/components/OutputFormatSelect.jsx
  89. +0 −25 src/components/SegmentCutpointButton.jsx
  90. +0 −10 src/components/Select.jsx
  91. +0 −18 src/components/Select.module.css
  92. +0 −27 src/components/Sheet.jsx
  93. +0 −55 src/components/SubtitleControl.jsx
  94. +0 −12 src/components/Switch.jsx
  95. +0 −30 src/components/ValueTuner.jsx
  96. +0 −45 src/components/Working.jsx
  97. +0 −3 src/contexts/UserSettingsContext.js
  98. +0 −67 src/dialogs/html5ify.jsx
  99. +0 −80 src/dialogs/parameters.jsx
  100. +0 −246 src/edlFormats.js
  101. +0 −209 src/edlFormats.test.js
  102. +0 −135 src/edlStore.js
  103. +0 −1,113 src/ffmpeg.js
  104. +0 −527 src/hooks/useFfmpegOperations.js
  105. +0 −35 src/hooks/useKeyboard.js
  106. +0 −5 src/hooks/useUserSettings.js
  107. +0 −61 src/hooks/useWaveform.js
  108. +0 −42 src/index.jsx
  109. +106 −0 src/main/compatPlayer.ts
  110. +72 −37 public/configStore.js → src/main/configStore.ts
  111. +4 −0 src/main/constants.ts
  112. +31 −0 src/main/contextMenu.ts
  113. +659 −0 src/main/ffmpeg.ts
  114. +56 −0 src/main/httpServer.ts
  115. +4 −6 public/i18n.js → src/main/i18n.ts
  116. +15 −23 public/i18n-common.js → src/main/i18nCommon.ts
  117. +153 −49 public/electron.js → src/main/index.ts
  118. +2 −0 src/main/isDev.ts
  119. +38 −0 src/main/logger.ts
  120. +170 −101 public/menu.js → src/main/menu.ts
  121. +50 −0 src/main/pathToFileURL.test.ts
  122. +20 −11 public/update-checker.js → src/main/updateChecker.ts
  123. +8 −0 src/main/util.ts
  124. +2 −0 src/preload/index.ts
  125. +1 −1 { → src/renderer}/index.html
  126. 0 src/{ → renderer/src}/7077-magic-flow.json
  127. +2,821 −0 src/renderer/src/App.tsx
  128. +5 −4 src/{BetweenSegments.jsx → renderer/src/BetweenSegments.tsx}
  129. +162 −71 src/{BottomBar.jsx → renderer/src/BottomBar.tsx}
  130. +9 −5 src/{ErrorBoundary.jsx → renderer/src/ErrorBoundary.tsx}
  131. +8 −5 src/{LastCommandsSheet.jsx → renderer/src/LastCommandsSheet.tsx}
  132. +369 −0 src/renderer/src/MediaSourcePlayer.tsx
  133. +53 −0 src/renderer/src/NoFileLoaded.tsx
  134. +508 −0 src/renderer/src/SegmentList.tsx
  135. +512 −0 src/renderer/src/StreamsSelector.tsx
  136. +127 −59 src/{Timeline.jsx → renderer/src/Timeline.tsx}
  137. +32 −16 src/{TimelineSeg.jsx → renderer/src/TimelineSeg.tsx}
  138. +53 −24 src/{TopMenu.jsx → renderer/src/TopMenu.tsx}
  139. +256 −1 src/{__snapshots__/edlFormats.test.js.snap → renderer/src/__snapshots__/edlFormats.test.ts.snap}
  140. +1 −1 src/{__snapshots__/segments.test.js.snap → renderer/src/__snapshots__/segments.test.ts.snap}
  141. 0 src/{animations.js → renderer/src/animations.ts}
  142. +2 −2 src/{colors.js → renderer/src/colors.ts}
  143. +4 −4 src/{components/AutoExportToggler.jsx → renderer/src/components/AutoExportToggler.tsx}
  144. +7 −5 src/{components/BatchFile.jsx → renderer/src/components/BatchFile.tsx}
  145. +6 −6 src/{components/BatchFilesList.jsx → renderer/src/components/BatchFilesList.tsx}
  146. +134 −0 src/renderer/src/components/BigWaveform.tsx
  147. +13 −0 src/renderer/src/components/Button.module.css
  148. +12 −0 src/renderer/src/components/Button.tsx
  149. +7 −6 src/{components/CaptureFormatButton.jsx → renderer/src/components/CaptureFormatButton.tsx}
  150. +33 −0 src/renderer/src/components/Checkbox.module.css
  151. +25 −0 src/renderer/src/components/Checkbox.tsx
  152. +242 −0 src/renderer/src/components/ConcatDialog.tsx
  153. +5 −6 src/{components/CopyClipboardButton.jsx → renderer/src/components/CopyClipboardButton.tsx}
  154. +7 −4 src/{components/ExportButton.jsx → renderer/src/components/ExportButton.tsx}
  155. +5 −5 src/{ → renderer/src}/components/ExportConfirm.module.css
  156. +252 −61 src/{components/ExportConfirm.jsx → renderer/src/components/ExportConfirm.tsx}
  157. +15 −11 src/{components/ExportModeButton.jsx → renderer/src/components/ExportModeButton.tsx}
  158. +12 −0 src/renderer/src/components/HighlightedText.tsx
  159. +803 −0 src/renderer/src/components/KeyboardShortcuts.tsx
  160. +14 −0 src/renderer/src/components/MergedOutFileName.tsx
  161. +4 −4 src/{components/MovFastStartButton.jsx → renderer/src/components/MovFastStartButton.tsx}
  162. +190 −0 src/renderer/src/components/OutSegTemplateEditor.tsx
  163. +54 −0 src/renderer/src/components/OutputFormatSelect.tsx
  164. +110 −0 src/renderer/src/components/PlaybackStreamSelector.tsx
  165. +4 −4 src/{components/PreserveMovDataButton.jsx → renderer/src/components/PreserveMovDataButton.tsx}
  166. +29 −0 src/renderer/src/components/SegmentCutpointButton.tsx
  167. +22 −0 src/renderer/src/components/Select.module.css
  168. +13 −0 src/renderer/src/components/Select.tsx
  169. +5 −2 src/{components/SetCutpointButton.jsx → renderer/src/components/SetCutpointButton.tsx}
  170. 0 src/{ → renderer/src}/components/Settings.module.css
  171. +250 −158 src/{components/Settings.jsx → renderer/src/components/Settings.tsx}
  172. +0 −2 src/{ → renderer/src}/components/Sheet.module.css
  173. +36 −0 src/renderer/src/components/Sheet.tsx
  174. +4 −4 src/{components/SimpleModeButton.jsx → renderer/src/components/SimpleModeButton.tsx}
  175. 0 src/{ → renderer/src}/components/Switch.module.css
  176. +14 −0 src/renderer/src/components/Switch.tsx
  177. +139 −0 src/renderer/src/components/TagEditor.tsx
  178. +12 −0 src/renderer/src/components/TextInput.tsx
  179. +4 −4 src/{components/ToggleExportConfirm.jsx → renderer/src/components/ToggleExportConfirm.tsx}
  180. +54 −0 src/renderer/src/components/ValueTuner.tsx
  181. +28 −8 src/{components/ValueTuners.jsx → renderer/src/components/ValueTuners.tsx}
  182. +10 −11 src/{components/VolumeControl.jsx → renderer/src/components/VolumeControl.tsx}
  183. +49 −0 src/renderer/src/components/Working.tsx
  184. +32 −0 src/renderer/src/contexts.ts
  185. +8 −8 src/{dialogs/extractFrames.jsx → renderer/src/dialogs/extractFrames.tsx}
  186. +81 −0 src/renderer/src/dialogs/html5ify.tsx
  187. +224 −116 src/{dialogs/index.jsx → renderer/src/dialogs/index.tsx}
  188. +96 −0 src/renderer/src/dialogs/parameters.tsx
  189. +319 −0 src/renderer/src/edlFormats.test.ts
  190. +420 −0 src/renderer/src/edlFormats.ts
  191. +180 −0 src/renderer/src/edlStore.ts
  192. +1 −0 src/{ffmpeg-parameters.js → renderer/src/ffmpeg-parameters.ts}
  193. +724 −0 src/renderer/src/ffmpeg.ts
  194. +5 −3 src/{ffprobe.js → renderer/src/ffprobe.ts}
  195. +47 −0 src/renderer/src/fixtures/DV Analyzer Summary.txt
  196. 0 src/{ → renderer/src}/fixtures/FCPXML_1_9.fcpxml
  197. 0 src/{ → renderer/src}/fixtures/Final Cut Pro XMEML 2.xml
  198. 0 src/{ → renderer/src}/fixtures/Final Cut Pro XMEML 3.xml
  199. 0 src/{ → renderer/src}/fixtures/Final Cut Pro XMEML.xml
  200. 0 src/{ → renderer/src}/fixtures/mplayer.edl
  201. BIN src/{ → renderer/src}/fixtures/potplayer bookmark format utf16le issue 867.pbf
  202. +8 −0 src/renderer/src/fixtures/sample.srt
  203. 0 src/{ → renderer/src}/fixtures/test1.csv
  204. BIN src/{ → renderer/src}/fixtures/test1.pbf
  205. 0 src/{ → renderer/src}/fixtures/test2.csv
  206. BIN src/{ → renderer/src}/fixtures/test2.pbf
  207. 0 src/{ → renderer/src}/fixtures/test3.csv
  208. BIN src/{ → renderer/src}/fixtures/test3.pbf
  209. +23 −21 src/{hooks/normalizeWheel.js → renderer/src/hooks/normalizeWheel.ts}
  210. +6 −5 src/{hooks/useContextMenu.js → renderer/src/hooks/useContextMenu.ts}
  211. +12 −6 src/{hooks/useDirectoryAccess.js → renderer/src/hooks/useDirectoryAccess.ts}
  212. +587 −0 src/renderer/src/hooks/useFfmpegOperations.ts
  213. +2 −2 src/{hooks/useFileFormatState.js → renderer/src/hooks/useFileFormatState.ts}
  214. +36 −27 src/{hooks/useFrameCapture.js → renderer/src/hooks/useFrameCapture.ts}
  215. +45 −0 src/renderer/src/hooks/useKeyboard.ts
  216. +12 −9 src/{hooks/useKeyframes.js → renderer/src/hooks/useKeyframes.ts}
  217. +7 −4 src/{hooks/useNativeMenu.js → renderer/src/hooks/useNativeMenu.ts}
  218. +179 −82 src/{hooks/useSegments.js → renderer/src/hooks/useSegments.ts}
  219. +11 −7 src/{hooks/useTimelineScroll.js → renderer/src/hooks/useTimelineScroll.ts}
  220. +10 −0 src/renderer/src/hooks/useUserSettings.ts
  221. +41 −14 src/{hooks/useUserSettingsRoot.js → renderer/src/hooks/useUserSettingsRoot.ts}
  222. +107 −0 src/renderer/src/hooks/useWaveform.ts
  223. +29 −0 src/renderer/src/hooks/useWhatChanged.ts
  224. +10 −4 src/{i18n.js → renderer/src/i18n.ts}
  225. +25 −0 src/renderer/src/icon-mac.svg
  226. 0 src/{ → renderer/src}/icon.svg
  227. +73 −0 src/renderer/src/index.tsx
  228. +1 −1 src/{isDev.js → renderer/src/isDev.ts}
  229. +30 −1 src/{ → renderer/src}/main.css
  230. +2 −2 src/{mifi.js → renderer/src/mifi.ts}
  231. 0 src/{outFormats.js → renderer/src/outFormats.ts}
  232. +73 −0 src/renderer/src/reporting.tsx
  233. +12 −4 src/{segments.test.js → renderer/src/segments.test.ts}
  234. +267 −0 src/renderer/src/segments.ts
  235. +24 −10 src/{smartcut.js → renderer/src/smartcut.ts}
  236. +9 −7 src/{swal.js → renderer/src/swal.ts}
  237. +46 −0 src/renderer/src/swal2.scss
  238. +82 −0 src/renderer/src/theme.ts
  239. +130 −0 src/renderer/src/types.ts
  240. +450 −0 src/renderer/src/util.ts
  241. +9 −6 src/{util/colors.js → renderer/src/util/colors.ts}
  242. +9 −0 src/renderer/src/util/constants.ts
  243. +28 −2 src/{util/duration.test.js → renderer/src/util/duration.test.ts}
  244. +74 −0 src/renderer/src/util/duration.ts
  245. +191 −0 src/renderer/src/util/outputNameTemplate.ts
  246. +1 −0 src/{util/rate-calculator.test.js → renderer/src/util/rate-calculator.test.ts}
  247. +5 −4 src/{util/rate-calculator.js → renderer/src/util/rate-calculator.ts}
  248. +66 −14 src/{util/streams.test.js → renderer/src/util/streams.test.ts}
  249. +100 −28 src/{util/streams.js → renderer/src/util/streams.ts}
  250. +51 −0 src/renderer/src/worker/eval.ts
  251. +138 −0 src/renderer/src/worker/evalWorker.ts
  252. +0 −64 src/reporting.jsx
  253. +0 −214 src/segments.js
  254. +0 −49 src/theme.js
  255. +0 −362 src/util.js
  256. +0 −36 src/util/constants.js
  257. +0 −56 src/util/duration.js
  258. +0 −59 src/util/outputNameTemplate.js
  259. +64 −0 translation.md
  260. +8 −0 tsconfig.json
  261. +18 −0 tsconfig.main.json
  262. +9 −0 tsconfig.node.json
  263. +15 −0 tsconfig.web.json
  264. +125 −0 types.ts
  265. +0 −12 vite.config.js
  266. +5,772 −4,067 yarn.lock
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/dist
/vite-dist
/out
/ts-dist
31 changes: 0 additions & 31 deletions .eslintrc

This file was deleted.

37 changes: 37 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {
extends: ['mifi'],
rules: {
'no-console': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/interactive-supports-focus': 0,
'jsx-a11y/control-has-associated-label': 0,
},

overrides: [
{
files: ['./src/renderer/**/*.{js,cjs,mjs,jsx,ts,tsx,mts}'],
env: {
node: false,
browser: true,
},
rules: {
'import/no-extraneous-dependencies': 0,
},
},
{
files: ['./src/preload/**/*.{js,cjs,jsx,ts,tsx}'],
env: {
browser: true,
},
},
{
files: ['./script/**/*.{js,cjs,mjs,jsx,ts,tsx,mts}', 'electron.vite.config.js'],
rules: {
'import/no-extraneous-dependencies': ['error', {
devDependencies: true,
optionalDependencies: false,
}],
},
},
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
- type: checkboxes
id: initial-checklist
attributes:
label: I have a lot of issues to go through, so in order to make it easier for me to help you, I ask that you please try these things first
label: The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first
options:
- label: Try with a different kind of file to confirm that the problem is related to just this file.
required: true
Expand All @@ -22,7 +22,7 @@ body:
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: How would I reproduce the problem? Please describe step-by-step what you're doing from starting up LosslessCut until the problem occurs. You can attach screenshots if needed.
description: How would I reproduce the problem? Please describe step-by-step what you're doing from starting up LosslessCut until the problem occurs. You can attach screenshots or screencasts if needed.
validations:
required: true
- type: textarea
Expand Down Expand Up @@ -56,7 +56,7 @@ body:
- type: textarea
id: share-log
attributes:
label: Share log
description: 'Please open developer tools after starting LosslessCut and before doing the failing operation. Then share any relevant output from the javascript Console. (Menu: Tools > Toggle Developer Tools)'
label: Share log from developer tools
description: 'Please open developer tools after starting LosslessCut and before performing the relevant operation. Then share any relevant output from the javascript Console. (Menu: Tools > Toggle Developer Tools)'
validations:
required: false
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
name: 🐛 Bug report
description: Describe a problem or bug with LosslessCut
description: Describe a bug in LosslessCut (not related to a specific file or file type).
body:
- type: checkboxes
id: initial-checklist
attributes:
label: I have a lot of issues to go through, so in order to make it easier for me to help you, I ask that you please try these things first
label: The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first
options:
- label: Try with the [newest version from GitHub](https://github.com/mifi/lossless-cut/releases/latest)
- label: Try with the [newest version from GitHub](https://github.com/mifi/lossless-cut/releases/latest) (also it might have already been fixed in latest [nightly build](https://github.com/mifi/lossless-cut#nightly-builds-))
required: true
- label: Read the [documentation](https://github.com/mifi/lossless-cut) and [FAQ, Known issues, Troubleshooting](https://github.com/mifi/lossless-cut/blob/master/issues.md)
required: true
- label: Search for your problem under [Issues](https://github.com/mifi/lossless-cut/issues) or [Discussions](https://github.com/mifi/lossless-cut/discussions)
required: true
- label: If you have an issue only with one particular file, [use this form instead](https://github.com/mifi/lossless-cut/issues/new?assignees=&labels=&template=file-issue.yml)
- label: If you have a problem only with a particular file (or file type), [use this form instead](https://github.com/mifi/lossless-cut/issues/new?assignees=&labels=&template=file-issue.yml)
required: true
- label: Windows 7, 8 and 8.1 are [no longer supported](https://github.com/mifi/lossless-cut/discussions/1476). **This is not a question about Windows 8.1 or older.**
required: true
- type: dropdown
id: operating-system
attributes:
label: Operating System
description: Which operating system are you running?
options:
- I don't want to say
- MacOS 13
- MacOS 12
- MacOS 11
Expand All @@ -38,7 +41,7 @@ body:
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: How would I reproduce the problem? Please describe step-by-step what you're doing from starting up LosslessCut until the problem occurs. You can attach screenshots if needed.
description: How would I reproduce the problem? Please describe step-by-step what you're doing from starting up LosslessCut until the problem occurs. You can attach screenshots or screencasts if needed.
validations:
required: true
- type: textarea
Expand All @@ -58,7 +61,7 @@ body:
- type: textarea
id: share-log
attributes:
label: Share log
label: Share log from developer tools
description: 'If you have a problem or an unexpected bug or crash, please open developer tools after starting LosslessCut and before doing the failing operation. Then share the output from the javascript Console. (Menu: Tools > Toggle Developer Tools)'
validations:
required: false
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ body:
- type: checkboxes
id: initial-checklist
attributes:
label: I have a lot of issues to go through, so in order to make it easier for me to help you, I ask that you please try these things first
label: The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first
options:
- label: Check out all the menus and keyboard shortcuts. Maybe the feature already exists?
required: true
Expand All @@ -18,6 +18,6 @@ body:
id: feature-description
attributes:
label: Description
description: A clear and concise description of what you want you would like to be added or improved in LosslessCut. You can attach screenshots if needed.
description: A clear and concise description of what you want you would like to be added or improved in LosslessCut. You can attach screenshots or screencasts if needed.
validations:
required: true
46 changes: 23 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ on:
jobs:
release:
runs-on: ${{ matrix.os }}
timeout-minutes: 60

env:
is_tag: ${{ startsWith(github.ref, 'refs/tags/v') }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}

strategy:
matrix:
Expand All @@ -31,18 +33,15 @@ jobs:
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'yarn'

# Because of timeout issue https://github.com/yarnpkg/yarn/issues/4890
- run: yarn install --network-timeout 1000000
- run: yarn install --immutable --network-timeout 1000000

- name: Install and login to Snapcraft
uses: samuelmeuli/action-snapcraft@v1
- name: (Linux) Install and login to Snapcraft
uses: samuelmeuli/action-snapcraft@v2
if: startsWith(matrix.os, 'ubuntu')
with:
# Log in to Snap Store
snapcraft_token: ${{ secrets.snapcraft_token }}

- name: Save provisioning profile
if: startsWith(matrix.os, 'macos')
Expand All @@ -51,26 +50,24 @@ jobs:
run: |
echo -n "$PROVISIONING_PROFILE_BASE64" | base64 --decode > LosslessCut_Mac_App_Store_provisioning_profile.provisionprofile
- name: Prepare Apple API key
# Import Apple API key for app notarization on macOS and for uploading to Mac App Store
# 'altool --help': '--apiKey' will search the following directories in sequence for a private key file with the name of:
# 'AuthKey_<api_key>.p8': './private_keys', '~/private_keys', '~/.private_keys', and '~/.appstoreconnect/private_keys'.
- name: (MacOS) Prepare Apple API key
# Import Apple API key for uploading to Mac App Store and for notarization
if: startsWith(matrix.os, 'macos')
run: |
mkdir -p ~/.appstoreconnect/private_keys/
echo '${{ secrets.api_key }}' > ~/.appstoreconnect/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
- name: Download ffmpeg for Mac
- name: (MacOS) Download ffmpeg
if: startsWith(matrix.os, 'macos')
run: |
yarn download-ffmpeg-darwin-x64
yarn download-ffmpeg-darwin-arm64
- name: Download ffmpeg for Windows
- name: (Windows) Download ffmpeg
if: startsWith(matrix.os, 'windows')
run: yarn download-ffmpeg-win32-x64

- name: Download ffmpeg for Linux
- name: (Linux) Download ffmpeg
if: startsWith(matrix.os, 'ubuntu')
run: yarn download-ffmpeg-linux-x64

Expand All @@ -85,7 +82,7 @@ jobs:
# release the app after building
release: ${{ env.is_tag == 'true' }}

max_attempts: 2
max_attempts: 1

mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
Expand All @@ -94,31 +91,34 @@ jobs:
# windows_certs: ${{ secrets.windows_certs }}
# windows_certs_password: ${{ secrets.windows_certs_password }}
env:
# macOS notarization API key
API_KEY_ID: ${{ secrets.api_key_id }}
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }}
APPLE_API_KEY: ~/.appstoreconnect/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
APPLE_API_KEY_ID: ${{ secrets.api_key_id }}
APPLE_API_ISSUER: ${{ secrets.api_key_issuer_id }}

- name: Upload to Mac App Store
- name: (MacOS) Upload to Mac App Store
if: startsWith(matrix.os, 'macos') && env.is_tag == 'true'
run: |
node script/xcrun-wrapper.mjs dist/mas-universal/LosslessCut-mac-universal.pkg ${{ secrets.api_key_id }} ${{ secrets.api_key_issuer_id }} 1505323402 no.mifi.losslesscut-mac
npx tsx script/xcrun-wrapper.mts dist/mas-universal/LosslessCut-mac-universal.pkg ${{ secrets.api_key_id }} ${{ secrets.api_key_issuer_id }} 1505323402 no.mifi.losslesscut-mac
- uses: actions/upload-artifact@v3
- name: (MacOS) Upload artifacts
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'macos') && env.is_tag == 'false'
with:
name: MacOS
path: |
dist/LosslessCut-mac-arm64.dmg
dist/LosslessCut-mac-x64.dmg
- uses: actions/upload-artifact@v3
- name: (Windows) Upload artifacts
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'windows') && env.is_tag == 'false'
with:
name: Windows
path: |
dist/LosslessCut-win-x64.7z
- uses: actions/upload-artifact@v3
- name: (Linux) Upload artifacts
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu') && env.is_tag == 'false'
with:
name: Linux
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/pr.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 60

strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
# Windows fix. See https://github.com/actions/checkout/issues/226
- run: git config --global core.autocrlf false

- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 18
cache: 'yarn'

- run: yarn install --immutable
- run: yarn dedupe --check
- run: yarn test
- run: yarn tsc
- run: yarn lint
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ node_modules
!.yarn/versions

/dist
/vite-dist
/out
/icon-build
/build-resources
/doc
/ffmpeg
/app.log
/ts-dist
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"search.exclude": {
"/public/locales/**": true,
"/src/main/locales/**": true,
}
}
Loading