选择要在 Inno Setup 中创建的桌面快捷方式图标
Make a selection which desktop shortcut icons to create in Inno Setup
我想在我的 Inno Setup 中创建一个部分,用户可以在其中选择要创建的桌面快捷方式。因为我计划有 4 个快捷方式,但它们并不是都需要工作。我希望用户选择将要创建的桌面快捷方式。这是我当前的脚本:
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; \
GroupDescription: "{cm:AdditionalIcons}"
[Files]
Source: "C:\Users\hwkru\Documents\WinUEFI\{#MyAppExeName}"; \
DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\hwkru\Documents\WinUEFI\WinUEFI-console.exe"; \
DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\hwkru\Documents\WinUEFI\WinUEFI-x86.exe"; \
DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\hwkru\Documents\WinUEFI\WinUEFI-x86-console.exe"; \
DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{autodesktop}\{#MyAppName}"; \
Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{autodesktop}\WinUEFI Console"; \
Filename: "{app}\WinUEFI-console.exe"; Tasks: desktopicon
Name: "{autodesktop}\WinUEFI (32-bit)"; \
Filename: "{app}\WinUEFI-x86.exe"; Tasks: desktopicon
Name: "{autodesktop}\WinUEFI (32-bit) Console"; \
Filename: "{app}\WinUEFI-x86-console.exe"; Tasks: desktopicon
那么人们就不需要创建所有这 4 个快捷方式,因为有 32 位和 64 位版本。
为每个快捷方式创建单独的任务,而不是一个 desktopicon
任务:
[Tasks]
Name: "appdesktopicon"; Description: "Application icon"; \
GroupDescription: "{cm:AdditionalIcons}"
Name: "ueficondesktopicon"; Description: "WinUEFI Console icon"; \
GroupDescription: "{cm:AdditionalIcons}"
Name: "uefi32desktopicon"; Description: "WinUEFI (32-bit) icon"; \
GroupDescription: "{cm:AdditionalIcons}"
Name: "uefi32condesktopicon"; Description: "WinUEFI (32-bit) Console icon"; \
GroupDescription: "{cm:AdditionalIcons}"
[Icons]
Name: "{autodesktop}\{#MyAppName}"; \
Filename: "{app}\{#MyAppExeName}"; Tasks: appdesktopicon
Name: "{autodesktop}\WinUEFI Console"; \
Filename: "{app}\WinUEFI-console.exe"; Tasks: ueficondesktopicon
Name: "{autodesktop}\WinUEFI (32-bit)"; \
Filename: "{app}\WinUEFI-x86.exe"; Tasks: uefi32desktopicon
Name: "{autodesktop}\WinUEFI (32-bit) Console"; \
Filename: "{app}\WinUEFI-x86-console.exe"; Tasks: uefi32condesktopicon
我想在我的 Inno Setup 中创建一个部分,用户可以在其中选择要创建的桌面快捷方式。因为我计划有 4 个快捷方式,但它们并不是都需要工作。我希望用户选择将要创建的桌面快捷方式。这是我当前的脚本:
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; \
GroupDescription: "{cm:AdditionalIcons}"
[Files]
Source: "C:\Users\hwkru\Documents\WinUEFI\{#MyAppExeName}"; \
DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\hwkru\Documents\WinUEFI\WinUEFI-console.exe"; \
DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\hwkru\Documents\WinUEFI\WinUEFI-x86.exe"; \
DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\hwkru\Documents\WinUEFI\WinUEFI-x86-console.exe"; \
DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{autodesktop}\{#MyAppName}"; \
Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{autodesktop}\WinUEFI Console"; \
Filename: "{app}\WinUEFI-console.exe"; Tasks: desktopicon
Name: "{autodesktop}\WinUEFI (32-bit)"; \
Filename: "{app}\WinUEFI-x86.exe"; Tasks: desktopicon
Name: "{autodesktop}\WinUEFI (32-bit) Console"; \
Filename: "{app}\WinUEFI-x86-console.exe"; Tasks: desktopicon
那么人们就不需要创建所有这 4 个快捷方式,因为有 32 位和 64 位版本。
为每个快捷方式创建单独的任务,而不是一个 desktopicon
任务:
[Tasks]
Name: "appdesktopicon"; Description: "Application icon"; \
GroupDescription: "{cm:AdditionalIcons}"
Name: "ueficondesktopicon"; Description: "WinUEFI Console icon"; \
GroupDescription: "{cm:AdditionalIcons}"
Name: "uefi32desktopicon"; Description: "WinUEFI (32-bit) icon"; \
GroupDescription: "{cm:AdditionalIcons}"
Name: "uefi32condesktopicon"; Description: "WinUEFI (32-bit) Console icon"; \
GroupDescription: "{cm:AdditionalIcons}"
[Icons]
Name: "{autodesktop}\{#MyAppName}"; \
Filename: "{app}\{#MyAppExeName}"; Tasks: appdesktopicon
Name: "{autodesktop}\WinUEFI Console"; \
Filename: "{app}\WinUEFI-console.exe"; Tasks: ueficondesktopicon
Name: "{autodesktop}\WinUEFI (32-bit)"; \
Filename: "{app}\WinUEFI-x86.exe"; Tasks: uefi32desktopicon
Name: "{autodesktop}\WinUEFI (32-bit) Console"; \
Filename: "{app}\WinUEFI-x86-console.exe"; Tasks: uefi32condesktopicon