From bd6a4bf298bdeabc9b4af71aff47d54c49953221 Mon Sep 17 00:00:00 2001 From: doudou0720 <98651603+doudou0720@users.noreply.github.com> Date: Tue, 24 Feb 2026 17:54:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(Inno=20Setup)=20=E6=B7=BB=E5=8A=A0.NET=20F?= =?UTF-8?q?ramework=204.7.2=E5=AE=89=E8=A3=85=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在安装脚本中添加初始化检查,确保系统已安装.NET Framework 4.7.2或兼容版本。如果未安装,则显示错误提示信息。 Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com> --- build/InkCanvasForClass CE.iss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/InkCanvasForClass CE.iss b/build/InkCanvasForClass CE.iss index 576b9a34..ab308f3d 100644 --- a/build/InkCanvasForClass CE.iss +++ b/build/InkCanvasForClass CE.iss @@ -59,5 +59,13 @@ Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +[Code] +function InitializeSetup: Boolean; +begin + Result := True; // Always allow setup to continue + if not IsDotNetInstalled(net472, 0) then // Check if .NET Framework version 4.7.2 or compatible is installed + SuppressibleMsgBox('警告:未检测到 .NET Framework 4.7.2 或更高版本。应用程序可能无法正常运行。', mbWarning, MB_OK, IDOK); +end; + [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent \ No newline at end of file