bd0cead00e
leo 2026-08-04 看過 v0.16.0 畫面後:
「功能都有了,但美感非常糟糕⋯⋯跟 CIS 完全無關,每個功能都開一個小小的 popup 視窗,
非常缺乏整體感,這要理解的是原始的技術選擇是否出錯?」
「我的要求是符合 CIS,在風格上跟 portal 一樣」
「CIS 已經提供規範,你做的連 Logo 都沒放上去,這跟美不美有關係嗎?
要求放進 CIS 是硬要求,你做為檢查有嗎?沒有怎麼交貨?」
## 我的兩個錯
1. **動工前沒提醒做不到**——decisions-summary.md:314 的 D-daemon-UI
是我 07-27 自己寫的調研(結論:fyne 全自繪、CSS 套不進去),寫完就沒再看。
今天動工前該查它卻直接開寫,浪費 leo 的時間與 token。
2. **沒做 CIS 檢查就交貨**——連 logo 都沒放。
## 換 Wails(WebView 殼)
前端就是 HTML/CSS ⇒ 可以直接用 portal 那份色票與 lockup。
- style.css 的色票/字體/紙張紋理**逐字取自** portal 的 :root
(matrix/arcrun:console-ui/public/portal/index.html),不自創任何顏色
- CIS lockup 官方 PNG,淺色 ink 版/深色 paper 版,切換規則同 portal
(避開 08-01 作廢的自產 SVG——字腔缺失)
- 對話框改**內嵌覆蓋層**,不再每個功能開一個小 popup
- 原生資料夾選擇器(macOS powerbox 會自動授予該資料夾存取權,
fyne 自繪 picker 拿不到;未來上 Mac App Store 是硬需求)
- 同步中的圓點會呼吸 ⇒ 看得出來在動(issue #17)
- 無帳號時是 onboarding 引導,不是空白面板
## 連線邏輯逐字沿用,不重寫
connect.go 的 normalizePortalURL/fetchConfigByLogin 取自 arcrun-tray/main.go,
含 t86 個資外洩事故的防線(不同實例=新增帳號,絕不覆蓋舊帳號的資料夾)。
今天已犯過一次「重寫別人修好的東西還修得更差」,不再犯第二次。
## 新增 check-cis.sh(交貨前必跑)
機械檢查六類:官方色票逐個到齊/**不准出現非 CIS 色**/logo 真的放進去/
不可用作廢 SVG/深色模式/字體與紙張紋理同 portal/app icon。
實跑 14 項全過。以後「沒跑過就不准交」。
⚠️ 未驗:實際畫面要 leo 開來看(我開不了視窗)。
123 lines
5.0 KiB
NSIS
123 lines
5.0 KiB
NSIS
Unicode true
|
|
|
|
####
|
|
## Please note: Template replacements don't work in this file. They are provided with default defines like
|
|
## mentioned underneath.
|
|
## If the keyword is not defined, "wails_tools.nsh" will populate them with the values from ProjectInfo.
|
|
## If they are defined here, "wails_tools.nsh" will not touch them. This allows to use this project.nsi manually
|
|
## from outside of Wails for debugging and development of the installer.
|
|
##
|
|
## For development first make a wails nsis build to populate the "wails_tools.nsh":
|
|
## > wails build --target windows/amd64 --nsis
|
|
## Then you can call makensis on this file with specifying the path to your binary:
|
|
## For a AMD64 only installer:
|
|
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app.exe
|
|
## For a ARM64 only installer:
|
|
## > makensis -DARG_WAILS_ARM64_BINARY=..\..\bin\app.exe
|
|
## For a installer with both architectures:
|
|
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\..\bin\app-arm64.exe
|
|
####
|
|
## The following information is taken from the ProjectInfo file, but they can be overwritten here.
|
|
####
|
|
## !define INFO_PROJECTNAME "MyProject" # Default "{{.Name}}"
|
|
## !define INFO_COMPANYNAME "MyCompany" # Default "{{.Info.CompanyName}}"
|
|
## !define INFO_PRODUCTNAME "MyProduct" # Default "{{.Info.ProductName}}"
|
|
## !define INFO_PRODUCTVERSION "1.0.0" # Default "{{.Info.ProductVersion}}"
|
|
## !define INFO_COPYRIGHT "Copyright" # Default "{{.Info.Copyright}}"
|
|
###
|
|
## !define PRODUCT_EXECUTABLE "Application.exe" # Default "${INFO_PROJECTNAME}.exe"
|
|
## !define UNINST_KEY_NAME "UninstKeyInRegistry" # Default "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
|
|
####
|
|
## !define REQUEST_EXECUTION_LEVEL "admin" # Default "admin" see also https://nsis.sourceforge.io/Docs/Chapter4.html
|
|
####
|
|
## Include the wails tools
|
|
####
|
|
!include "wails_tools.nsh"
|
|
|
|
# The version information for this two must consist of 4 parts
|
|
VIProductVersion "${INFO_PRODUCTVERSION}.0"
|
|
VIFileVersion "${INFO_PRODUCTVERSION}.0"
|
|
|
|
VIAddVersionKey "CompanyName" "${INFO_COMPANYNAME}"
|
|
VIAddVersionKey "FileDescription" "${INFO_PRODUCTNAME} Installer"
|
|
VIAddVersionKey "ProductVersion" "${INFO_PRODUCTVERSION}"
|
|
VIAddVersionKey "FileVersion" "${INFO_PRODUCTVERSION}"
|
|
VIAddVersionKey "LegalCopyright" "${INFO_COPYRIGHT}"
|
|
VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}"
|
|
|
|
# Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware
|
|
ManifestDPIAware true
|
|
|
|
!include "MUI.nsh"
|
|
|
|
!define MUI_ICON "..\icon.ico"
|
|
!define MUI_UNICON "..\icon.ico"
|
|
# !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\leftimage.bmp" #Include this to add a bitmap on the left side of the Welcome Page. Must be a size of 164x314
|
|
!define MUI_FINISHPAGE_NOAUTOCLOSE # Wait on the INSTFILES page so the user can take a look into the details of the installation steps
|
|
!define MUI_ABORTWARNING # This will warn the user if they exit from the installer.
|
|
|
|
!insertmacro MUI_PAGE_WELCOME # Welcome to the installer page.
|
|
# !insertmacro MUI_PAGE_LICENSE "resources\eula.txt" # Adds a EULA page to the installer
|
|
!insertmacro MUI_PAGE_DIRECTORY # In which folder install page.
|
|
!insertmacro MUI_PAGE_INSTFILES # Installing page.
|
|
!insertmacro MUI_PAGE_FINISH # Finished installation page.
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES # Uinstalling page
|
|
|
|
!insertmacro MUI_LANGUAGE "English" # Set the Language of the installer
|
|
|
|
## The following two statements can be used to sign the installer and the uninstaller. The path to the binaries are provided in %1
|
|
#!uninstfinalize 'signtool --file "%1"'
|
|
#!finalize 'signtool --file "%1"'
|
|
|
|
Name "${INFO_PRODUCTNAME}"
|
|
OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file.
|
|
!ifdef WAILS_INSTALL_SCOPE
|
|
!if "${WAILS_INSTALL_SCOPE}" == "user"
|
|
InstallDir "$LOCALAPPDATA\Programs\${INFO_PRODUCTNAME}"
|
|
!else
|
|
InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}"
|
|
!endif
|
|
!else
|
|
InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}"
|
|
!endif # Default installing folder ($PROGRAMFILES is Program Files folder).
|
|
ShowInstDetails show # This will always show the installation details.
|
|
|
|
Function .onInit
|
|
!insertmacro wails.checkArchitecture
|
|
FunctionEnd
|
|
|
|
Section
|
|
!insertmacro wails.setShellContext
|
|
|
|
!insertmacro wails.webview2runtime
|
|
|
|
SetOutPath $INSTDIR
|
|
|
|
!insertmacro wails.files
|
|
|
|
CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
|
|
CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
|
|
|
|
!insertmacro wails.associateFiles
|
|
!insertmacro wails.associateCustomProtocols
|
|
|
|
!insertmacro wails.writeUninstaller
|
|
SectionEnd
|
|
|
|
Section "uninstall"
|
|
!insertmacro wails.setShellContext
|
|
|
|
RMDir /r "$AppData\${PRODUCT_EXECUTABLE}" # Remove the WebView2 DataPath
|
|
|
|
RMDir /r $INSTDIR
|
|
|
|
Delete "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk"
|
|
Delete "$DESKTOP\${INFO_PRODUCTNAME}.lnk"
|
|
|
|
!insertmacro wails.unassociateFiles
|
|
!insertmacro wails.unassociateCustomProtocols
|
|
|
|
!insertmacro wails.deleteUninstaller
|
|
SectionEnd
|