Skip to content

refactor: 原生模块构建脚本 - #50

Merged
imsyy merged 1 commit into
SPlayer-Dev:devfrom
MoYingJi:pr/scripts
Jun 25, 2026
Merged

imsyy merged 1 commit into
SPlayer-Dev:devfrom
MoYingJi:pr/scripts

Conversation

@MoYingJi

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 重构了原生模块构建脚本 scripts/build-native.ts,将原先基于 execSync 的调用改为 spawnSync 并补齐参数解析与错误处理,以支持更可控的构建流程与参数透传。

Changes:

  • 使用 spawnSync 替代 execSync,并对进程启动失败 / 信号终止 / 非 0 退出码做了显式判断与输出。
  • 新增 parseArgs():支持 --dev 与通过 -- 将额外参数透传给 napi build。
  • 调整原生模块列表定义位置,并按平台条件启用 Windows 专属模块构建。

Comment thread scripts/build-native.ts Resolved
Comment thread scripts/build-native.ts Resolved
Comment thread scripts/build-native.ts Resolved
Comment thread scripts/build-native.ts
Comment on lines +94 to +95
const buildType = options.isDev ? "debug" : "release";
console.log(`[BuildNative] 构建 ${mod.name} (${buildType})`);
@MoYingJi
MoYingJi force-pushed the pr/scripts branch 2 times, most recently from b9b5182 to 2fd8d66 Compare June 24, 2026 17:08
Copilot AI review requested due to automatic review settings June 24, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@imsyy
imsyy merged commit d6c0317 into SPlayer-Dev:dev Jun 25, 2026
1 check passed
@MoYingJi
MoYingJi deleted the pr/scripts branch June 26, 2026 13:02
roarrabbit pushed a commit to roarrabbit/SPlayer-Next that referenced this pull request Aug 27, 2026
refactor: 原生模块构建脚本
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants