Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ macOS / Linux 向けビルドでは `assets/icon.icns` と `assets/icon.png` が

Electron Builder の設定 (`package.json` の `build` フィールド) により、アプリ ID や配布ターゲット、アイコンなどが制御されます。

依存ライブラリのライセンス一覧は `npm run build:licenses`(`npm run build` 内で自動実行)で `build/licenses/THIRD_PARTY_LICENSES.txt` に生成され、ルートの `LICENSE` と共にインストーラへ同梱されます。依存パッケージを更新した際はこのスクリプトを再実行してください。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

This documentation states that npm run build:licenses is automatically executed within npm run build, but the scripts in package.json have not been updated to reflect this.

The build:licenses script needs to be defined and called from the build script. Without this change, THIRD_PARTY_LICENSES.txt will not be generated, causing electron-builder to fail during the npm run package command.

Please update package.json to integrate the license generation. For example:

"scripts": {
  ...
  "build": "npm run build:licenses && npm run build:vite && npm run build:electron",
  "build:licenses": "node scripts/generate-licenses.js",
  ...
}


## 必要環境
- Node.js 20 以上推奨(Electron 36 ベース)
- npm
Expand Down
2 changes: 2 additions & 0 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ On macOS / Linux builds, make sure the following assets exist (replace with your

Electron Builder uses the configuration defined in `package.json` (`build` field) for app ID, product name, and targets.

Dependency licenses are generated via `npm run build:licenses` (automatically executed inside `npm run build`) into `build/licenses/THIRD_PARTY_LICENSES.txt`, and Electron Builder bundles that file together with the root `LICENSE` in the installers. Re-run the script after dependency changes to refresh the list.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

This documentation states that npm run build:licenses is "automatically executed inside npm run build". However, the scripts in package.json have not been updated to implement this.

The build:licenses script is missing, and the main build script does not call it. This will cause the npm run package command to fail because electron-builder will not be able to find the THIRD_PARTY_LICENSES.txt file.

Please update package.json to add the build:licenses script and integrate it into the build script. For example:

"scripts": {
  ...
  "build": "npm run build:licenses && npm run build:vite && npm run build:electron",
  "build:licenses": "node scripts/generate-licenses.js",
  ...
}


## Project Structure (Overview)
- `src/main/` – Electron main process. Exposes IPC handlers for SwitchBot API and manages `electron-store` for settings and credentials.
- `src/preload/` – Preload scripts that bridge the main process and renderer (e.g., `electronStore`, `switchBotBridge`).
Expand Down
Loading