Skip to content

Let's use AI to Earn!

feat: 删除弃用的文件

yikaJasonMic8086179a97e9
diff --git a/electron-builder.json b/electron-builder.json
index 513e6c34..6c29fb7d 100644
--- a/electron-builder.json
+++ b/electron-builder.json
@@ -8,7 +8,6 @@
"output": "release/${version}"
},
"files": ["dist-electron", "dist"],
- "beforePack": "scripts/cleanup-ffmpeg.cjs",
"mac": {
"identity": null,
"artifactName": "${productName}-${version}-${arch}.${ext}",
diff --git a/scripts/cleanup-ffmpeg.cjs b/scripts/cleanup-ffmpeg.cjs
deleted file mode 100644
index 204814da..00000000
--- a/scripts/cleanup-ffmpeg.cjs
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * @Author: nevin
- * @Date: 2025-02-23 17:22:25
- * @LastEditTime: 2025-02-23 20:16:13
- * @LastEditors: nevin
- * @Description: ff 组件复制脚本
- */
-const fs = require('fs');
-const path = require('path');
-const { platform, arch } = process; // 获取当前构建平台
-// 获取当前的CPU架构
-
-function getFFmpegPath() {
- const res = {
- ffmpegPath: '',
- ffprobePath: '',
- };
-
- res.ffmpegPath = path.join(
- __dirname,
- './file',
- `ff/${platform}/${arch}/ffmpeg`,
- );
- res.ffprobePath = path.join(
- __dirname,
- './file',
- `ff/${platform}/${arch}/ffprobe`,
- );
-
- return res;
-}
-
-exports.default = async function (context) {
- const binPath = path.join(__dirname, '../public/bin');
-
- const pathInfo = getFFmpegPath();
-
- const fileNameEnd = platform === 'win32' ? '.exe' : '';
-
- // 复制ffmpeg
- fs.copyFileSync(
- pathInfo.ffmpegPath + fileNameEnd,
- path.join(binPath, `ffmpeg${fileNameEnd}`),
- );
-
- fs.copyFileSync(
- pathInfo.ffprobePath + fileNameEnd,
- path.join(binPath, `ffprobe${fileNameEnd}`),
- );
-};
diff --git a/scripts/file/ff/darwin/arm64/ffmpeg b/scripts/file/ff/darwin/arm64/ffmpeg
deleted file mode 100644
index 202a3f85..00000000
Binary files a/scripts/file/ff/darwin/arm64/ffmpeg and /dev/null differ
diff --git a/scripts/file/ff/darwin/arm64/ffprobe b/scripts/file/ff/darwin/arm64/ffprobe
deleted file mode 100644
index 2c213a87..00000000
Binary files a/scripts/file/ff/darwin/arm64/ffprobe and /dev/null differ
diff --git a/scripts/file/ff/darwin/x64/ffmpeg b/scripts/file/ff/darwin/x64/ffmpeg
deleted file mode 100644
index 779b629c..00000000
Binary files a/scripts/file/ff/darwin/x64/ffmpeg and /dev/null differ
diff --git a/scripts/file/ff/darwin/x64/ffprobe b/scripts/file/ff/darwin/x64/ffprobe
deleted file mode 100644
index c0a07932..00000000
Binary files a/scripts/file/ff/darwin/x64/ffprobe and /dev/null differ
diff --git a/src/views/test/index.tsx b/src/views/test/index.tsx
index 446eeced..2a981f45 100644
--- a/src/views/test/index.tsx
+++ b/src/views/test/index.tsx
@@ -1,7 +1,7 @@
/*
* @Author: nevin
* @Date: 2025-02-10 22:20:15
- * @LastEditTime: 2025-04-01 16:33:01
+ * @LastEditTime: 2025-04-01 17:00:45
* @LastEditors: nevin
* @Description: 测试页面
*/
@@ -15,7 +15,10 @@ export default function Text() {
const [fileInfo, setFileInfo] = useState('');
function addVideos(videoFiles: IVideoFile[]) {
+ console.log('---- videoFiles ----', videoFiles);
+
const theVideoPath = videoFiles[0].videoPath;
+ console.log('---- theVideoPath ----', theVideoPath);
setVideoPath(theVideoPath);
}