From 96ab4bc72672d4c7187543785846ce2471ce8035 Mon Sep 17 00:00:00 2001 From: zsyg <3872006562@qq.com> Date: Sun, 29 Jun 2025 08:01:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0innosetup=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inno/innosetup_x64.iss | 64 ++++++++++++++++++++++++++++++++++++++++++ inno/innosetup_x86.iss | 56 ++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 inno/innosetup_x64.iss create mode 100644 inno/innosetup_x86.iss diff --git a/inno/innosetup_x64.iss b/inno/innosetup_x64.iss new file mode 100644 index 0000000..c593adc --- /dev/null +++ b/inno/innosetup_x64.iss @@ -0,0 +1,64 @@ +; 脚本由 Inno Setup 脚本向导生成。 +; 有关创建 Inno Setup 脚本文件的详细信息,请参阅帮助文档! + +#define MyAppName "kortapp-z" +#define MyAppVersion "1.0.7" +#define MyAppPublisher "zsyg" +#define MyAppURL "https://github.com/zs-yg/kortapp-z" +#define MyAppExeName "kortapp.exe" +#define MyAppAssocName MyAppName + "" +#define MyAppAssocExt ".exe" +#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt + +[Setup] +; 注意:AppId 的值唯一标识此应用程序。不要在其他应用程序的安装程序中使用相同的 AppId 值。 +; (若要生成新的 GUID,请在 IDE 中单击 "工具|生成 GUID"。) +AppId={{8020EC01-6133-40BB-8B8B-0EB71E49696C} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +UninstallDisplayIcon={app}\{#MyAppExeName} +; "ArchitecturesAllowed=x64compatible" 指定安装程序无法运行 +; 除 Arm 上的 x64 和 Windows 11 之外的任何平台上。 +ArchitecturesAllowed=x64compatible +; "ArchitecturesInstallIn64BitMode=x64compatible" 要求 +; 安装可以在 x64 或 Arm 上的 Windows 11 上以“64 位模式”完成, +; 这意味着它应该使用本机 64 位 Program Files 目录和 +; 注册表的 64 位视图。 +ArchitecturesInstallIn64BitMode=x64compatible +ChangesAssociations=yes +DisableProgramGroupPage=yes +LicenseFile=C:\Users\Administrator\Downloads\LICENSE.txt +; 取消注释以下行以在非管理安装模式下运行 (仅为当前用户安装)。 +;PrivilegesRequired=lowest +OutputDir=D:\C#\kortapp-z_Release\setup +OutputBaseFilename=kortapp-z_setup_x64 +SolidCompression=yes +WizardStyle=modern + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "D:\C#\kortapp-z_Release\x64_inno\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\C#\kortapp-z_Release\x64_inno\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +; 注意:不要在任何共享系统文件上使用 "Flags: ignoreversion" + +[Registry] +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0" +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + diff --git a/inno/innosetup_x86.iss b/inno/innosetup_x86.iss new file mode 100644 index 0000000..538ab92 --- /dev/null +++ b/inno/innosetup_x86.iss @@ -0,0 +1,56 @@ +; 脚本由 Inno Setup 脚本向导生成。 +; 有关创建 Inno Setup 脚本文件的详细信息,请参阅帮助文档! + +#define MyAppName "kortapp-z" +#define MyAppVersion "1.0.7" +#define MyAppPublisher "zsyg" +#define MyAppURL "https://github.com/zs-yg/kortapp-z" +#define MyAppExeName "kortapp.exe" +#define MyAppAssocName MyAppName + "" +#define MyAppAssocExt ".exe" +#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt + +[Setup] +; 注意:AppId 的值唯一标识此应用程序。不要在其他应用程序的安装程序中使用相同的 AppId 值。 +; (若要生成新的 GUID,请在 IDE 中单击 "工具|生成 GUID"。) +AppId={{BF1944C3-CD0C-4119-A340-49C54961D48B} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +UninstallDisplayIcon={app}\{#MyAppExeName} +ChangesAssociations=yes +DisableProgramGroupPage=yes +LicenseFile=C:\Users\Administrator\Downloads\LICENSE.txt +; 取消注释以下行以在非管理安装模式下运行 (仅为当前用户安装)。 +;PrivilegesRequired=lowest +OutputDir=D:\C#\kortapp-z_Release\setup +OutputBaseFilename=kortapp-z_setup_x86 +SolidCompression=yes +WizardStyle=modern + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "D:\C#\kortapp-z_Release\x86_inno\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\C#\kortapp-z_Release\x86_inno\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +; 注意:不要在任何共享系统文件上使用 "Flags: ignoreversion" + +[Registry] +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0" +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent +