我曾在Inno Setup工作过。全部安装完美,但桌面上的图标未显示 - 图标的白色。
#define MyAppName "My Program"
#define MyAppVersion "3.2.0"
#define MyAppVersionName "My Program 3 (64-bit)"
#define MyAppExeName "myprogram.exe"
..................
[Setup]
SetupIconFile=C:\Users\path_to_my_program\myprogram_Icon.ico
................
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppVersionName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
如果我写了[图标]部分:
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
然后我在安装后完美地在桌面上获得了图标。
我该如何解决它?
非常感谢。
答案 0 :(得分:1)
如果EXE
没有默认的应用程序图标,那么您应该复制/安装Icon File
以及EXE
并使用IconFileName
参数[Icons]
1}}部分指定它的路径:
[Files]
Source: "C:\Users\path_to_my_program\myprogram_Icon.ico"; DestDir: "{app}"
[Icons]
Name: "{commondesktop}\{#MyAppVersionName}"; Filename: "{app}\{#MyAppExeName}";
IconFileName: "{app}\myprogram_Icon.ico"; Tasks: desktopicon