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

try to support apple silicon

This commit is contained in:
Mikael Finstad 2022-11-23 11:43:58 +08:00
parent 2f79332fdb
commit 15f7a0026d
3 changed files with 21 additions and 14 deletions

View File

@ -55,15 +55,17 @@ jobs:
- name: Download ffmpeg for Mac - name: Download ffmpeg for Mac
if: startsWith(matrix.os, 'macos') if: startsWith(matrix.os, 'macos')
run: yarn download-ffmpeg-mac run: |
yarn download-ffmpeg-darwin-x64
yarn download-ffmpeg-darwin-arm64
- name: Download ffmpeg for Windows - name: Download ffmpeg for Windows
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
run: yarn download-ffmpeg-windows run: yarn download-ffmpeg-win32-x64
- name: Download ffmpeg for Linux - name: Download ffmpeg for Linux
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')
run: yarn download-ffmpeg-linux run: yarn download-ffmpeg-linux-x64
- name: Build/release Electron app - name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1 uses: samuelmeuli/action-electron-builder@v1
@ -92,4 +94,4 @@ jobs:
- name: Upload to Mac App Store - name: Upload to Mac App Store
if: startsWith(matrix.os, 'macos') && env.is_tag == 'true' if: startsWith(matrix.os, 'macos') && env.is_tag == 'true'
run: | run: |
node script/xcrun-wrapper.mjs dist/mas/LosslessCut-mac-x64.pkg ${{ secrets.api_key_id }} ${{ secrets.api_key_issuer_id }} 1505323402 no.mifi.losslesscut-mac node script/xcrun-wrapper.mjs dist/mas/LosslessCut-mac-universal.pkg ${{ secrets.api_key_id }} ${{ secrets.api_key_issuer_id }} 1505323402 no.mifi.losslesscut-mac

View File

@ -18,9 +18,10 @@ Note: `yarn` may take some time to complete.
Run one of the below commands: Run one of the below commands:
```bash ```bash
npm run download-ffmpeg-mac npm run download-ffmpeg-darwin-x64
npm run download-ffmpeg-linux npm run download-ffmpeg-darwin-arm64
npm run download-ffmpeg-windows npm run download-ffmpeg-linux-x64
npm run download-ffmpeg-win32-x64
``` ```
### Running ### Running

View File

@ -11,9 +11,10 @@
"start:frontend": "cross-env BROWSER=none PORT=3001 DISABLE_ESLINT_PLUGIN=true react-scripts start", "start:frontend": "cross-env BROWSER=none PORT=3001 DISABLE_ESLINT_PLUGIN=true react-scripts start",
"start:electron": "wait-on http://localhost:3001 && electron .", "start:electron": "wait-on http://localhost:3001 && electron .",
"icon-gen": "mkdirp icon-build build-resources/appx && node script/icon-gen.mjs", "icon-gen": "mkdirp icon-build build-resources/appx && node script/icon-gen.mjs",
"download-ffmpeg-mac": "mkdirp ffmpeg/darwin-x64 && cd ffmpeg/darwin-x64 && wget https://github.com/mifi/ffmpeg-build-script/releases/download/5.0.1/ffmpeg -O ffmpeg && wget https://github.com/mifi/ffmpeg-build-script/releases/download/5.0.1/ffprobe -O ffprobe && chmod +x ffmpeg && chmod +x ffprobe", "download-ffmpeg-darwin-x64": "mkdirp ffmpeg/darwin-x64 && cd ffmpeg/darwin-x64 && wget https://github.com/mifi/ffmpeg-build-script/releases/download/5.1.2/ffmpeg -O ffmpeg && wget https://github.com/mifi/ffmpeg-build-script/releases/download/5.1.2/ffprobe -O ffprobe && chmod +x ffmpeg && chmod +x ffprobe",
"download-ffmpeg-linux": "mkdirp ffmpeg/linux-x64 && cd ffmpeg/linux-x64 && wget https://github.com/mifi/ffmpeg-builds/releases/download/5.0.1/ffmpeg-release-amd64-static.tar.xz -O ffmpeg.xz && tar -xv --strip-components=1 -f ffmpeg.xz ffmpeg-5.0.1-amd64-static/ffmpeg ffmpeg-5.0.1-amd64-static/ffprobe", "download-ffmpeg-darwin-arm64": "mkdirp ffmpeg/darwin-arm64 && cd ffmpeg/darwin-arm64 && wget https://github.com/mifi/ffmpeg-builds/releases/download/5.1.2/ffmpeg-darwin-arm64-v5.1.2 -O ffmpeg && wget https://github.com/mifi/ffmpeg-builds/releases/download/5.1.2/ffprobe-darwin-arm64-v5.1.2 -O ffprobe && chmod +x ffmpeg && chmod +x ffprobe",
"download-ffmpeg-windows": "mkdirp ffmpeg/win32-x64 && cd ffmpeg/win32-x64 && npx download-cli https://github.com/mifi/ffmpeg-builds/releases/download/5.0.1/ffmpeg-5.0.1-essentials_build.7z --out . --filename ffmpeg.7z && 7z x ffmpeg.7z && npx shx mv ffmpeg-5.0.1-essentials_build/bin/ffmpeg.exe ./ && npx shx mv ffmpeg-5.0.1-essentials_build/bin/ffprobe.exe ./", "download-ffmpeg-linux-x64": "mkdirp ffmpeg/linux-x64 && cd ffmpeg/linux-x64 && wget https://github.com/mifi/ffmpeg-builds/releases/download/5.1.2/linux-x64-v5.1.1.tar.xz -O ffmpeg-ffprobe.xz && tar -xv --strip-components=1 -f ffmpeg-ffprobe.xz ffmpeg-5.1.1-amd64-static/ffmpeg ffmpeg-5.1.1-amd64-static/ffprobe",
"download-ffmpeg-win32-x64": "mkdirp ffmpeg/win32-x64 && cd ffmpeg/win32-x64 && npx download-cli https://github.com/mifi/ffmpeg-builds/releases/download/5.1.2/win32-x64-v5.1.2.7z --out . --filename ffmpeg-ffprobe.7z && 7z x ffmpeg-ffprobe.7z && npx shx mv ffmpeg-5.1.2-essentials_build/bin/ffmpeg.exe ./ && npx shx mv ffmpeg-5.1.2-essentials_build/bin/ffprobe.exe ./",
"build": "yarn icon-gen && react-scripts build", "build": "yarn icon-gen && react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject", "eject": "react-scripts eject",
@ -144,10 +145,13 @@
"hardenedRuntime": true, "hardenedRuntime": true,
"appId": "no.mifi.losslesscut-mac", "appId": "no.mifi.losslesscut-mac",
"category": "public.app-category.productivity", "category": "public.app-category.productivity",
"target": [ "target": {
"mas", "target": [
"dmg" "mas",
], "dmg"
],
"arch": "universal"
},
"electronLanguages": [ "electronLanguages": [
"en" "en"
], ],