Skip to content

Commit 5764b87

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 5764b87

2 files changed

Lines changed: 44 additions & 62 deletions

File tree

electron/build/uninstaller.nsh

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,40 @@
1-
; AutoNote NSIS uninstaller customization
2-
; Shows a dialog asking the user what to retain when uninstalling.
1+
; AutoNote NSIS uninstaller customization.
2+
;
3+
; Three Yes/No prompts at uninstall start let the user choose what to keep.
4+
; Uses MessageBox (no custom pages) to avoid electron-builder's multi-pass
5+
; NSIS warnings that CI escalates to errors.
36

4-
!include "MUI2.nsh"
7+
!pragma warning disable 6010
8+
!pragma warning disable 6020
9+
!pragma warning disable 8000
510

611
Var KeepNotes
712
Var KeepSettings
813
Var KeepVenv
914

10-
; ── Custom uninstall page ──────────────────────────────────────────────────────
11-
Function un.customUninstallPage
12-
nsDialogs::Create 1018
13-
Pop $0
14-
15-
${NSD_CreateLabel} 0 0 100% 24u "Choose what to keep after uninstalling AutoNote:"
16-
Pop $0
17-
18-
${NSD_CreateCheckBox} 16u 32u 100% 14u "Keep generated notes and downloaded files (~AutoNote folder)"
19-
Pop $KeepNotes
20-
${NSD_Check} $KeepNotes
21-
22-
${NSD_CreateCheckBox} 16u 52u 100% 14u "Keep settings and API keys (~/.auto_note/config)"
23-
Pop $KeepSettings
24-
${NSD_Check} $KeepSettings
25-
26-
${NSD_CreateCheckBox} 16u 72u 100% 14u "Keep ML environment (~/.auto_note/venv, ~2 GB)"
27-
Pop $KeepVenv
28-
29-
${NSD_CreateLabel} 16u 100u 100% 24u "Unchecked items will be permanently deleted."
30-
Pop $0
31-
32-
nsDialogs::Show
33-
FunctionEnd
34-
35-
Function un.customUninstallPageLeave
36-
${NSD_GetState} $KeepNotes $KeepNotes
37-
${NSD_GetState} $KeepSettings $KeepSettings
38-
${NSD_GetState} $KeepVenv $KeepVenv
39-
FunctionEnd
40-
41-
; ── Register the custom page ──────────────────────────────────────────────────
42-
!macro customUnInstallPage
43-
UninstPage custom un.customUninstallPage un.customUninstallPageLeave
15+
!macro customUnInit
16+
StrCpy $KeepNotes "0"
17+
MessageBox MB_YESNO|MB_ICONQUESTION "Keep generated notes and downloaded course files in %USERPROFILE%\AutoNote?$\n$\nYes = keep them, No = delete" /SD IDNO IDNO autonote_skip_notes
18+
StrCpy $KeepNotes "1"
19+
autonote_skip_notes:
20+
21+
StrCpy $KeepSettings "0"
22+
MessageBox MB_YESNO|MB_ICONQUESTION "Keep settings and API keys in %USERPROFILE%\.auto_note?$\n$\nYes = keep them, No = delete" /SD IDNO IDNO autonote_skip_settings
23+
StrCpy $KeepSettings "1"
24+
autonote_skip_settings:
25+
26+
StrCpy $KeepVenv "0"
27+
MessageBox MB_YESNO|MB_ICONQUESTION "Keep ML environment (~2 GB) in %USERPROFILE%\.auto_note\venv?$\n$\nYes = keep it, No = delete" /SD IDNO IDNO autonote_skip_venv
28+
StrCpy $KeepVenv "1"
29+
autonote_skip_venv:
4430
!macroend
4531

46-
; ── Cleanup after standard uninstall ──────────────────────────────────────────
4732
!macro customUnInstall
48-
; Delete ML venv if user chose not to keep it
49-
${If} $KeepVenv != ${BST_CHECKED}
33+
${If} $KeepVenv != "1"
5034
RMDir /r "$PROFILE\.auto_note\venv"
5135
${EndIf}
5236

53-
; Delete settings if user chose not to keep them
54-
${If} $KeepSettings != ${BST_CHECKED}
55-
; Remove config, credentials, scripts — but keep venv if retained above
37+
${If} $KeepSettings != "1"
5638
Delete "$PROFILE\.auto_note\config.json"
5739
Delete "$PROFILE\.auto_note\canvas_token.txt"
5840
Delete "$PROFILE\.auto_note\openai_api.txt"
@@ -63,12 +45,10 @@ FunctionEnd
6345
Delete "$PROFILE\.auto_note\mistral_api.txt"
6446
Delete "$PROFILE\.auto_note\manifest.json"
6547
RMDir /r "$PROFILE\.auto_note\scripts"
66-
; Only remove the dir if it's empty (venv might still be there)
6748
RMDir "$PROFILE\.auto_note"
6849
${EndIf}
6950

70-
; Delete generated content if user chose not to keep it
71-
${If} $KeepNotes != ${BST_CHECKED}
51+
${If} $KeepNotes != "1"
7252
RMDir /r "$PROFILE\AutoNote"
7353
${EndIf}
7454
!macroend

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)