@@ -23,7 +23,9 @@ Use Corepack so the workspace stays on the pinned `pnpm` version.
-`corepack pnpm smoke:installer`: run the packaged installer smoke test.
## macOS Packaging Notes
Customer releases should be distributed as a compressed `.dmg`, not as a zipped DMG and not as an uncompressed DMG. The desktop electron-builder config must keep `compression: maximum`; using `compression: store` produces an uncompressed APFS DMG around 1.95 GB for the bundled runtime payload.
Current unsigned and unnotarized handoff builds should be packaged as the larger uncompressed DMG first. The reason is: 因为现在没有公证和签名,先打包成比较大的 dmg. Use `compression: store` / `dmg.format=UDRO` for that temporary handoff path.
After signing and notarization are ready, customer releases should be distributed as a compressed `.dmg`, not as a zipped DMG and not as an uncompressed DMG. The desktop electron-builder config normally keeps `compression: maximum`; using `compression: store` produces an uncompressed APFS DMG around 1.95 GB for the bundled runtime payload.
Run `corepack pnpm run package:mac` first so the runtime is materialized and `dist/installer/mac-arm64/千匠问天.app` is rebuilt from the latest code. If electron-builder finishes the `.app` but fails while creating the DMG with `hdiutil create`, do not ship a quick `UDZO` fallback. Create a bzip2-compressed DMG and then rewrite it with `hdiutil convert` so wasted image bytes are removed:
Before handing off a DMG, run `hdiutil imageinfo <dmg>` and confirm `Format: UDBZ`, `Compressed: true`, and `CUDIFEncoding-bytes-wasted: 0`, then run `hdiutil verify <dmg>` and `corepack pnpm run smoke:mac:package`. A larger DMG does not automatically mean extra app content; compare mounted `.app` size and file counts if needed.
Before handing off a temporary unsigned/unnotarized DMG, run `hdiutil imageinfo <dmg>` and confirm `Format: UDRO` and `Compressed: false`. Before handing off a compressed release DMG, confirm `Format: UDBZ`, `Compressed: true`, and `CUDIFEncoding-bytes-wasted: 0`. For either path, run `hdiutil verify <dmg>` and `corepack pnpm run smoke:mac:package`. A larger DMG does not automatically mean extra app content; compare mounted `.app` size and file counts if needed.
## Coding Style & Naming Conventions
The codebase uses strict TypeScript, ESM modules, and 2-space indentation. Prefer double quotes and trailing semicolon-free style, matching existing files.