; ============================================================================ ; 小妈厨房 - Inno Setup 安装脚本 ; ============================================================================ ; 使用方法: ; 方式一(推荐,自动读取版本号): ; .\scripts\package_windows.ps1 ; 方式二(手动指定版本号): ; & "d:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DAppVer=1.0.0 installer.iss ; 方式三(flutter_distributor): ; $env:PATH = "E:\cache\pub\bin;" + $env:PATH ; flutter_distributor package --platform windows --target inno ; ; 前置条件: ; 1. 已安装 Inno Setup 6: https://jrsoftware.org/isdl.php ; 2. 已下载中文语言包到 Inno Setup Languages 目录 ; 3. 已构建 Flutter 应用: flutter build windows ; ============================================================================ ; ---- 动态版本号(通过 ISCC 命令行 /DAppVer=x.x.x 传入) ---- ; 由 package_windows.ps1 自动传递,无需手动设置 #ifndef AppVer #define AppVer "0.0.0" #endif [Setup] ; ---- 应用信息 ---- AppName=小妈厨房 AppVersion={#AppVer} AppPublisher=微风暴工作室 AppPublisherURL=https://www.wktyl.com AppSupportURL=https://www.wktyl.com ; ---- 安装路径 ---- DefaultDirName={autopf}\cuteKitchen DefaultGroupName=小妈厨房 UninstallDisplayName=小妈厨房 ; ---- 输出配置 ---- OutputDir=dist OutputBaseFilename=小妈厨房_Setup_{#AppVer} ; ---- 压缩配置 ---- Compression=lzma2/max SolidCompression=yes ; ---- 图标和权限 ---- SetupIconFile=windows\runner\resources\app_icon.ico PrivilegesRequired=lowest ArchitecturesAllowed=x64compatible ArchitecturesInstallIn64BitMode=x64compatible [Languages] Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl" [Tasks] Name: "desktopicon"; Description: "创建桌面快捷方式"; GroupDescription: "附加图标:"; Flags: unchecked [Files] Source: "build\windows\x64\runner\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs [Icons] Name: "{group}\小妈厨房"; Filename: "{app}\cute_kitchen.exe" Name: "{autodesktop}\小妈厨房"; Filename: "{app}\cute_kitchen.exe"; Tasks: desktopicon [Run] Filename: "{app}\cute_kitchen.exe"; Description: "启动小妈厨房"; Flags: nowait postinstall skipifsilent [Code] procedure CurStepChanged(CurStep: TSetupStep); var ResultCode: Integer; begin if CurStep = ssPostInstall then begin Exec('ie4uinit.exe', '-show', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); end; end;