Files
desktop-plugin/windows/installer.iss
T

58 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
; 资安信插件助手 Windows 安装包(Inno Setup 脚本)
; 构建:先在 Windows 上执行 flutter build windows --release,再用 Inno Setup 编译本脚本
; iscc windows\installer.iss
; 产物:dist\资安信插件助手-windows-setup.exe
#define AppName "资安信插件助手"
#define AppVersion "1.0.0"
#define AppExeName "desktop_plugin.exe"
[Setup]
AppId={{8C5B7A42-1F2D-4E6B-9A71-9D3A0F2C7E51}
AppName={#AppName}
AppVersion={#AppVersion}
AppPublisher=zax
DefaultDirName={autopf}\{#AppName}
DefaultGroupName={#AppName}
UninstallDisplayIcon={app}\{#AppExeName}
OutputDir=..\dist
OutputBaseFilename=资安信插件助手-windows-setup
; x64compatible 需 Inno 6.3+;x64 全系 6.x 兼容
; x64compatible 为 Inno 6.3+ 推荐写法(6.7 上用 x64 会报 deprecation 警告)
ArchitecturesInstallIn64BitMode=x64compatible
ArchitecturesAllowed=x64compatible
Compression=lzma2/max
SolidCompression=yes
WizardStyle=modern
PrivilegesRequired=lowest
; HiTi PavoApi SDK(PavoApiW_x64.dll 等)由 CMake 构建后自动拷在 Release 目录,随 Files 段一并打包
; 中文向导需要 Inno 安装时勾选语言组件(Languages\ChineseSimplified.isl)。
; 未装该组件的机器上编译会报 "Couldn't open include file"——此时注释掉下面
; 两行即可用默认英文向导出包;Tasks 等自定义文案仍为中文。
; [Languages]
; Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
[Tasks]
Name: "desktopicon"; Description: "创建桌面快捷方式"; GroupDescription: "附加任务:"
Name: "autostart"; Description: "开机自动启动"; GroupDescription: "附加任务:"; Flags: checkedonce
[Files]
Source: "..\build\windows\x64\runner\Release\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs
[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"
Name: "{group}\卸载 {#AppName}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
[Registry]
; zaxprint:// URL scheme(HKCU 用户级,随卸载清理;应用启动时也会幂等注册)
Root: HKCU; Subkey: "Software\Classes\zaxprint"; ValueType: string; ValueData: "URL:资安信插件助手唤起"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Classes\zaxprint"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""
Root: HKCU; Subkey: "Software\Classes\zaxprint\shell\open\command"; ValueType: string; ValueData: """{app}\{#AppExeName}"" ""%1"""; Flags: uninsdeletekey
; 开机自启(Tasks 勾选时写入)
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "ZaxDesktopPlugin"; ValueData: """{app}\{#AppExeName}"""; Tasks: autostart; Flags: uninsdeletevalue
[Run]
Filename: "{app}\{#AppExeName}"; Description: "立即运行 {#AppName}"; Flags: nowait postinstall skipifsilent