@@ -25,6 +25,15 @@ Use Corepack so the workspace stays on the pinned `pnpm` version.
...
@@ -25,6 +25,15 @@ Use Corepack so the workspace stays on the pinned `pnpm` version.
## macOS Packaging Notes
## 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.
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.
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.
## Coding Style & Naming Conventions
## 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.
The codebase uses strict TypeScript, ESM modules, and 2-space indentation. Prefer double quotes and trailing semicolon-free style, matching existing files.