Skip to content

Commit e1e5f25

Browse files
committed
Fix CI builds for Windows and macOS
- Drop Windows appx target: requires MS Store signing creds CI lacks, causing the release workflow to fail. - Clean up macOS DMG signing: set identity:null, hardenedRuntime:false, gatekeeperAssess:false, dmg.sign:false. Prevents the quarantine "AutoNote.app is damaged and can't be opened" error on install. - Fix mac.target to use array form (was a bare object). - Bump version 0.11.0 → 0.12.0 to match release tag.
1 parent bfd4f04 commit e1e5f25

2 files changed

Lines changed: 32 additions & 21 deletions

File tree

electron/build/uninstaller.nsh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
; AutoNote NSIS uninstaller customization
22
; Shows a dialog asking the user what to retain when uninstalling.
33

4+
; electron-builder compiles in multiple passes (installer + standalone
5+
; uninstaller). Our un.* functions and UninstPage directives live in code
6+
; that each pass sees partially, which triggers these warnings. They are
7+
; harmless — the uninstaller is correctly assembled in the main pass.
8+
!pragma warning disable 6010 ; "un.* function not referenced"
9+
!pragma warning disable 6020 ; "uninstaller script code but no WriteUninstaller"
10+
411
!include "MUI2.nsh"
512

613
Var KeepNotes
714
Var KeepSettings
815
Var KeepVenv
916

17+
; ── Register the custom uninstall page at script top-level ────────────────────
18+
; electron-builder expands this macro outside all functions, which is the only
19+
; context where UninstPage directives are valid.
20+
!macro customHeader
21+
UninstPage custom un.customUninstallPage un.customUninstallPageLeave
22+
!macroend
23+
1024
; ── Custom uninstall page ──────────────────────────────────────────────────────
1125
Function un.customUninstallPage
1226
nsDialogs::Create 1018
@@ -38,11 +52,6 @@ Function un.customUninstallPageLeave
3852
${NSD_GetState} $KeepVenv $KeepVenv
3953
FunctionEnd
4054

41-
; ── Register the custom page ──────────────────────────────────────────────────
42-
!macro customUnInstallPage
43-
UninstPage custom un.customUninstallPage un.customUninstallPageLeave
44-
!macroend
45-
4655
; ── Cleanup after standard uninstall ──────────────────────────────────────────
4756
!macro customUnInstall
4857
; Delete ML venv if user chose not to keep it

electron/package.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "auto-note",
3-
"version": "0.11.0",
3+
"version": "0.12.0",
44
"description": "AutoNote — lecture notes generator from Canvas recordings",
55
"homepage": "https://github.com/nodeeeeee/Auto-Note",
66
"author": {
@@ -44,29 +44,31 @@
4444
}
4545
},
4646
"win": {
47-
"target": ["nsis", "appx"],
48-
"icon": "../assets/icon.ico"
47+
"target": ["nsis"],
48+
"icon": "../assets/icon.ico",
49+
"signAndEditExecutable": false
4950
},
5051
"nsis": {
5152
"createDesktopShortcut": true,
5253
"createStartMenuShortcut": true,
5354
"shortcutName": "AutoNote",
5455
"include": "build/uninstaller.nsh"
5556
},
56-
"appx": {
57-
"displayName": "AutoNote",
58-
"identityName": "AutoNote",
59-
"publisher": "CN=nodeeeeee",
60-
"publisherDisplayName": "nodeeeeee",
61-
"applicationId": "AutoNote",
62-
"languages": ["en-US", "zh-CN"]
63-
},
6457
"mac": {
65-
"target": {
66-
"target": "dmg",
67-
"arch": ["x64", "arm64"]
68-
},
69-
"icon": "../assets/icon.icns"
58+
"target": [
59+
{
60+
"target": "dmg",
61+
"arch": ["x64", "arm64"]
62+
}
63+
],
64+
"icon": "../assets/icon.icns",
65+
"identity": null,
66+
"hardenedRuntime": false,
67+
"gatekeeperAssess": false
68+
},
69+
"dmg": {
70+
"writeUpdateInfo": false,
71+
"sign": false
7072
},
7173
"extraResources": [
7274
{

0 commit comments

Comments
 (0)