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: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ npm run package:appx:dev
- `package.json > build.appx`:集中定义 `identityName`、`applicationId`、`publisherDisplayName`、`publisher` 等 AppX 元数据;当前允许本地验证占位值,正式发布前必须替换。
- `package.json > build.toolsets.winCodeSign`:固定为 `1.1.0`,让 `electron-builder` 在 Windows 上使用现代签名工具链并补齐 SHA256 摘要参数。
- AppX 资源位于 `main/assets/appx/`,由现有 `main/assets/focusflow-icon.png` 派生生成。
- `package-win.mjs` 会预热 `output/cache/electron-builder/`,为 legacy `winCodeSign-2.6.0` cache 提前放入现代 `rcedit`,默认无参数打 `nsis portable`,显式传 `appx` 时只打 `appx`。
- `package-win.mjs` 会预热 `output/cache/electron-builder/`,为 legacy `winCodeSign-2.6.0` cache 提前放入现代 `rcedit`,默认无参数打 `nsis portable`,显式传 `appx` 时只打 `appx`;调用 electron-builder 时固定传入 `--publish never`,防止 CI push 隐式触发发布。
- 兼容层目标是稳定 exe 图标与版本资源写入;这是项目级 workaround,不是系统权限修复。
- 开发证书脚本位于 `tools/appx/prepare-dev-cert.ps1` 和 `tools/appx/package-dev.ps1`,不要放回被忽略的 `scripts/`。
- 本地开发证书私钥创建在 `CurrentUser\My`,但 AppX 安装信任要导入 `LocalMachine\TrustedPeople`;脚本会优先复用已有机器级信任,缺失时拉起管理员 PowerShell 完成导入。
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FocusFlow

[![CI](https://github.com/gis2all/focus-flow/actions/workflows/ci.yml/badge.svg)](https://github.com/gis2all/focus-flow/actions/workflows/ci.yml)
[![CI](https://github.com/gis2all/focus-flow/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/gis2all/focus-flow/actions/workflows/ci.yml?query=branch%3Amain)
[![Release](https://img.shields.io/github/v/release/gis2all/focus-flow)](https://github.com/gis2all/focus-flow/releases/latest)
[![License](https://img.shields.io/github/license/gis2all/focus-flow)](LICENSE)

Expand Down
7 changes: 7 additions & 0 deletions main/packageConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const packageJsonPath = resolve(process.cwd(), 'package.json')
const packageHelperPath = resolve(process.cwd(), 'package-win.mjs')
const appxAssetPath = resolve(process.cwd(), 'main', 'assets', 'appx')
const packageConfig = JSON.parse(readFileSync(packageJsonPath, 'utf-8')) as BuildConfig
const packageHelper = readFileSync(packageHelperPath, 'utf-8')

describe('package.json build config', () => {
test('keeps the default Windows packaging flow on nsis and portable', () => {
Expand All @@ -69,6 +70,12 @@ describe('package.json build config', () => {
expect(packageConfig.build.portable.artifactName).toBe('focusflow-single.${ext}')
})

test('disables electron-builder implicit publishing in CI', () => {
expect(packageHelper).toContain(
"const windowsPackagingArgs = ['--win', ...requestedWindowsTargets, '--publish', 'never']"
)
})

test('keeps appx packaging on a single signed development entrypoint', () => {
expect(packageConfig.scripts['package:appx:dev']).toBe(
'powershell -NoProfile -ExecutionPolicy Bypass -File .\\tools\\appx\\package-dev.ps1'
Expand Down
2 changes: 1 addition & 1 deletion package-win.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function prepareWinCodeSignCompatibilityCache() {
async function runWindowsPackaging() {
const cliPath = resolve(projectRoot, 'node_modules', 'electron-builder', 'cli.js')
// Keep the default release flow on nsis + portable unless the caller asks for another allowed target set.
const windowsPackagingArgs = ['--win', ...requestedWindowsTargets]
const windowsPackagingArgs = ['--win', ...requestedWindowsTargets, '--publish', 'never']

await new Promise((resolvePromise, rejectPromise) => {
const child = spawn(process.execPath, [cliPath, ...windowsPackagingArgs], {
Expand Down
Loading