mirror of
https://github.com/YILS-LIN/short-video-factory.git
synced 2025-11-25 03:15:03 +08:00
优化 MAC 构建配置
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
All significant changes to this project will be recorded in this file.
|
||||
此项目的所有显著更改都将记录在此文件中。
|
||||
|
||||
## [v1.1.9] - 2025-10-22
|
||||
## [v1.1.10] - 2025-10-22
|
||||
### Added
|
||||
- Add MAC embedding FFmpeg support
|
||||
### Fixed
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "short-video-factory",
|
||||
"description": "短视频工厂,一键生成产品营销与泛内容短视频,AI批量自动剪辑",
|
||||
"version": "1.1.9",
|
||||
"version": "1.1.10",
|
||||
"author": {
|
||||
"name": "YILS",
|
||||
"developer": "YILS",
|
||||
|
||||
@@ -25,10 +25,16 @@ function run(cmd, opts = {}) {
|
||||
const archs = ['x64', 'arm64']
|
||||
const ffmpegStaticDir = path.join(__dirname, '..', 'node_modules', 'ffmpeg-static')
|
||||
|
||||
// rebuild 两次
|
||||
// 移除原来的二进制文件
|
||||
run('rm -f ffmpeg', { cwd: ffmpegStaticDir })
|
||||
|
||||
// 获取两种架构的二进制文件
|
||||
archs.forEach((arch) => {
|
||||
run(
|
||||
`pnpm cross-env FFMPEG_BINARIES_URL=${FFMPEG_BINARIES_URL} npm --arch=${arch} rebuild -f ffmpeg-static`,
|
||||
`pnpm cross-env FFMPEG_BINARIES_URL=${FFMPEG_BINARIES_URL} npm_config_arch=${arch} npm run install`,
|
||||
{
|
||||
cwd: ffmpegStaticDir,
|
||||
},
|
||||
)
|
||||
run(`mv ${ffmpegStaticDir}/ffmpeg ${ffmpegStaticDir}/ffmpeg-${arch}`)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user