🎬 火宝短剧 - 基于AI的一站式短剧生成平台 《一句话生成完整短剧,从剧本到成片全自动化》 Huobao Drama - An AI-Powered End-to-End Short Drama Generator "One Sentence to Complete Drama: Fully Automated from Script to Final Video"
TypeScript
feat(release): dmg 内置「修复已损坏」双击脚本 + curl 免隔离安装指引
Connor67d573ac19f2
diff --git a/README.ja.md b/README.ja.mdindex 835a29a..4274bfc 100644--- a/README.ja.md+++ b/README.ja.md@@ -294,6 +294,15 @@ cd backend && npx tsx scripts/import-mysql-to-sqlite.ts> 中国本土では GitHub が不安定なため、Tencent COS ミラーをご利用ください。アプリ内アップデーターも COS を優先し、GitHub にフォールバックします。+**コマンドラインインストール(推奨・修復不要)**:curl でのダウンロードは macOS の隔離属性が付かないため、「壊れている」警告なしでそのまま起動できます(Apple Silicon は `-arm64.dmg`、Intel は無印の dmg):++```bash+curl -L -o /tmp/HuobaoDrama.dmg https://installer.chatfire.site/huobao-drama/v4.0.0/HuobaoDrama-4.0.0-arm64.dmg \+ && hdiutil attach -nobrowse /tmp/HuobaoDrama.dmg \+ && cp -R /Volumes/HuobaoDrama*/HuobaoDrama.app /Applications/ \+ && hdiutil detach /Volumes/HuobaoDrama*+```+ビルド不要 —— dmg/exe をダウンロードしてそのままインストールできます。インストール済みクライアントは内蔵アップデーターで自動更新されます。(ソースから自分でパッケージングする場合は以下のコマンドを参照。)ダブルクリックでインストール、すぐに使えるデスクトップ版(macOS + Windows)。データベース(SQLite)、生成メディア、Agent スキルはすべてユーザーデータディレクトリに保存され、アプリをアンインストールしてもデータに影響しません。@@ -311,7 +320,11 @@ npm run dist:win # Windows NSIS インストーラー(win-x64、macOS 上インストール時の注意:-- macOS 未署名パッケージは初回起動時に右クリック → 開く、または `xattr -cr /Applications/HuobaoDrama.app` を実行+- macOS 未署名パッケージは初回起動時に「Appが壊れているため開けません」と表示される場合があります(Apple Silicon で多発)。これは Gatekeeper の隔離属性によるもので、ファイルは壊れていません。修復方法は 2 つあります:+ 1. **dmg に修復スクリプトを同梱**:アプリを「アプリケーション」にドラッグした後、dmg ウィンドウ下部の「如提示已损坏请双击我.command」をダブルクリックすれば自動で修復されます;+ 2. またはターミナルで `sudo xattr -cr /Applications/HuobaoDrama.app` を実行。++ 修復は初回の 1 回だけ。その後は普通に起動でき、アプリ内自動更新にも影響しません。- Windows 未署名パッケージは SmartScreen で「詳細情報 → 実行」を選択- ユーザーデータディレクトリ:`~/Library/Application Support/HuobaoDrama/`(データベース、生成メディア、オンライン編集したスキルのコピー)- FFmpeg/FFprobe バイナリ内蔵。システムへのインストール不要diff --git a/README.ko.md b/README.ko.mdindex 8b12297..37098b9 100644--- a/README.ko.md+++ b/README.ko.md@@ -294,6 +294,15 @@ cd backend && npx tsx scripts/import-mysql-to-sqlite.ts> 중국 본토에서는 GitHub이 불안정하므로 Tencent COS 미러를 이용하세요. 앱 내 업데이터도 COS를 우선하고 GitHub으로 폴백합니다.+**커맨드라인 설치(권장, 복구 불필요)**: curl로 다운로드하면 macOS 격리 속성이 붙지 않아 "손상됨" 경고 없이 바로 실행됩니다(Apple Silicon은 `-arm64.dmg`, Intel은 일반 dmg 사용):++```bash+curl -L -o /tmp/HuobaoDrama.dmg https://installer.chatfire.site/huobao-drama/v4.0.0/HuobaoDrama-4.0.0-arm64.dmg \+ && hdiutil attach -nobrowse /tmp/HuobaoDrama.dmg \+ && cp -R /Volumes/HuobaoDrama*/HuobaoDrama.app /Applications/ \+ && hdiutil detach /Volumes/HuobaoDrama*+```+빌드 불필요 — dmg/exe를 다운로드해 바로 설치하면 됩니다. 설치된 클라이언트는 내장 업데이터로 자동 업데이트됩니다. (소스에서 직접 패키징하려면 아래 명령을 참조하세요.)더블클릭 설치로 바로 사용할 수 있는 데스크톱 버전(macOS + Windows). 데이터베이스(SQLite), 생성된 미디어 파일, Agent 스킬은 모두 사용자 데이터 디렉터리에 저장되며 앱을 삭제필필도 데이터에 영향이 없습니다.@@ -311,7 +320,11 @@ npm run dist:win # Windows NSIS 설치 프로그램(win-x64, macOS에서 크설치 안내:-- macOS 미서명 패키지는 첫 실행 시 우클릭 → 열기, 또는 `xattr -cr /Applications/HuobaoDrama.app` 실행+- macOS 미서명 패키지는 첫 실행 시 "App이 손상되어 열 수 없습니다"라는 메시지가 뜰 수 있습니다(Apple Silicon에서 흔함). 이는 Gatekeeper 격리 속성 때문이며 파일이 실제로 손상된 것은 아닙니다. 복구 방법은 두 가지입니다:+ 1. **dmg에 복구 스크립트 포함**: 앱을 "응용 프로그램"으로 드래그한 후 dmg 창 하단의 "如提示已损坏请双击我.command"를 더블클릭하면 자동으로 복구됩니다;+ 2. 또는 터미널에서 `sudo xattr -cr /Applications/HuobaoDrama.app` 실행.++ 복구는 처음 한 번만 필요하며, 이후에는 정상 실행되고 앱 내 자동 업데이트에도 영향이 없습니다.- Windows 미서명 패키지는 SmartScreen에서 「추가 정보 → 실행」 선택- 사용자 데이터 디렉터리: `~/Library/Application Support/HuobaoDrama/`(데이터베이스, 생성된 미디어, 온라인 편집한 스킬 복사본)- FFmpeg/FFprobe 바이너리 내장, 시스템 설치 불필요diff --git a/README.md b/README.mdindex 2c4118e..f138dfe 100644--- a/README.md+++ b/README.md@@ -294,6 +294,15 @@ The episode list shows the production status of every episode — click "Enter S> China users: use the COS mirror above (GitHub is slow/unreachable in mainland China). The in-app updater also checks the COS mirror first, then falls back to GitHub.+**Command-line install (recommended, no Gatekeeper fix needed)**: downloading via curl never sets macOS's quarantine attribute, so the app opens cleanly with no "damaged" prompt (use the `-arm64.dmg` for Apple Silicon, the plain dmg for Intel):++```bash+curl -L -o /tmp/HuobaoDrama.dmg https://installer.chatfire.site/huobao-drama/v4.0.0/HuobaoDrama-4.0.0-arm64.dmg \+ && hdiutil attach -nobrowse /tmp/HuobaoDrama.dmg \+ && cp -R /Volumes/HuobaoDrama*/HuobaoDrama.app /Applications/ \+ && hdiutil detach /Volumes/HuobaoDrama*+```+No build required — download the dmg/exe and install. Installed clients auto-update via the built-in updater. (To package from source instead, see the commands below.)Double-click to install, works out of the box (macOS + Windows): the SQLite database, generated media, and Agent skills all live in the user-data directory — uninstalling the app does not affect your data.@@ -311,7 +320,11 @@ npm run dist:win # Windows NSIS installer (win-x64, cross-buildable on macOS)Installation notes:-- The macOS build is unsigned — on first launch, right-click → Open, or run `xattr -cr /Applications/HuobaoDrama.app`+- The macOS build is unsigned — on first launch you may see "App is damaged and can't be opened" (common on Apple Silicon). This is Gatekeeper's quarantine attribute, not actual file damage. Two ways to fix it:+ 1. **The dmg bundles a fix script**: after dragging the app into Applications, double-click the "如提示已损坏请双击我.command" script at the bottom of the dmg window — it removes the quarantine attribute automatically;+ 2. Or run `sudo xattr -cr /Applications/HuobaoDrama.app` in Terminal.++ The fix is one-time only — the app then launches normally, and in-app auto-updates are not affected.- The Windows build is unsigned — SmartScreen will prompt "More info → Run anyway"- User-data directory: `~/Library/Application Support/HuobaoDrama/` (database, generated media, writable copies of online-edited skills)- FFmpeg/FFprobe binaries are bundled — no system install neededdiff --git a/README.zh-CN.md b/README.zh-CN.mdindex 60941d5..fa25a71 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -295,6 +295,15 @@ cd backend && npx tsx scripts/import-mysql-to-sqlite.ts> 国内用户请用腾讯云镜像直链下载(GitHub 在国内访问不稳定)。应用内更新器同样国内源优先、GitHub 兜底。+**命令行安装(推荐,免修复)**:用 curl 下载不会触发 macOS 隔离属性,安装后双击即开,不会遇到「已损坏」提示(Apple Silicon 把 `arm64` 文件名换成对应版本,Intel 用无后缀 dmg):++```bash+curl -L -o /tmp/HuobaoDrama.dmg https://installer.chatfire.site/huobao-drama/v4.0.0/HuobaoDrama-4.0.0-arm64.dmg \+ && hdiutil attach -nobrowse /tmp/HuobaoDrama.dmg \+ && cp -R /Volumes/HuobaoDrama*/HuobaoDrama.app /Applications/ \+ && hdiutil detach /Volumes/HuobaoDrama*+```+无需构建 —— 下载 dmg/exe 直接安装即可,已安装客户端会通过内置更新器自动升级。(如需从源码自行打包,见下方命令。)双击安装、开箱即用的桌面版(macOS + Windows):数据库(SQLite)、生成的媒体文件、Agent 技能全部存放在用户数据目录,卸载应用不影响数据。@@ -312,7 +321,11 @@ npm run dist:win # Windows NSIS 安装器(win-x64,可在 macOS 上交叉安装说明:-- macOS 未签名包首次打开需右键 → 打开,或执行 `xattr -cr /Applications/HuobaoDrama.app`+- macOS 未签名包首次打开可能提示「App 已损坏,无法打开」(Apple Silicon 常见),这是 Gatekeeper 隔离属性导致,并非文件损坏。两种修复方式任选:+ 1. **dmg 内自带修复脚本**:把 app 拖入「应用程序」后,双击 dmg 窗口底部的「如提示已损坏请双击我.command」,自动完成修复;+ 2. 或终端执行 `sudo xattr -cr /Applications/HuobaoDrama.app`。++ 修复只需一次,之后双击图标即可启动,应用内自动更新也不受影响。- Windows 未签名包 SmartScreen 会提示「更多信息 → 仍要运行」- 用户数据目录:`~/Library/Application Support/HuobaoDrama/`(数据库、生成的媒体、技能在线编辑的副本)- 内置 FFmpeg/FFprobe 二进制,无需系统安装diff --git "a/desktop/assets/\345\246\202\346\217\220\347\244\272\345\267\262\346\215\237\345\235\217\350\257\267\345\217\214\345\207\273\346\210\221.command" "b/desktop/assets/\345\246\202\346\217\220\347\244\272\345\267\262\346\215\237\345\235\217\350\257\267\345\217\214\345\207\273\346\210\221.command"new file mode 100755index 0000000..1838f34--- /dev/null+++ "b/desktop/assets/\345\246\202\346\217\220\347\244\272\345\267\262\346\215\237\345\235\217\350\257\267\345\217\214\345\207\273\346\210\221.command"@@ -0,0 +1,32 @@+#!/bin/bash+# HuobaoDrama 首次打开修复脚本+# 未签名 app 从浏览器下载后带 quarantine 属性,Gatekeeper 会误报"已损坏",+# 本脚本移除该属性。仅首次安装需要运行一次,后续应用内自动更新不受影响。++APP_PATH="/Applications/HuobaoDrama.app"++echo "======================================"+echo " HuobaoDrama 修复「App 已损坏」提示"+echo "======================================"+echo ""++if [ ! -d "$APP_PATH" ]; then+ echo "❌ 未找到 $APP_PATH"+ echo " 请先将 HuobaoDrama.app 拖入「应用程序」文件夹,再运行本脚本。"+ echo ""+ read -n 1 -s -r -p "按任意键退出..."+ exit 1+fi++xattr -cr "$APP_PATH"++if [ $? -eq 0 ]; then+ echo "✅ 修复完成!现在可以正常打开 HuobaoDrama 了。"+ echo " (本操作只需执行一次,以后双击图标即可启动)"+else+ echo "❌ 修复失败,请尝试在终端手动执行:"+ echo " sudo xattr -cr $APP_PATH"+fi++echo ""+read -n 1 -s -r -p "按任意键退出..."diff --git a/desktop/electron-builder.yml b/desktop/electron-builder.ymlindex 5cce0e4..8195ac4 100644--- a/desktop/electron-builder.yml+++ b/desktop/electron-builder.yml@@ -35,6 +35,16 @@ mac:# 先出未签名包:正式分发需 Apple Developer 签名 + notarize(配置位已留)identity: nullicon: assets/icon.icns+# dmg 窗口内置「修复已损坏」双击脚本:未签名包被浏览器打上 quarantine 后+# Gatekeeper 误报"已损坏",用户拖完 app 双击该脚本即自动 xattr -cr+dmg:+ window:+ width: 540+ height: 400+ contents:+ - { x: 130, y: 180, type: file }+ - { x: 410, y: 180, type: link, path: /Applications }+ - { x: 270, y: 330, type: file, path: assets/如提示已损坏请双击我.command }win:target:- target: nsis