我是 InnoSetup 的初学者。
我有两个图标"iconnew_small.ico"
和 "iconnew_smallUninstall.ico"
,最后一个用于 Unistall 选项。所有文件都在目录中C:\mysoftware
我正在关注此示例,但安装后卸载图标为空白(空)
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\C:\mysoftware\iconnew_smallUninstall.ico"
这都是 innoSetup 代码:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Segmentation Accuracy Tool"
#define MyAppVersion "0.2 Beta"
#define MyAppPublisher "Gianni"
#define MyAppExeName "SegmentationAccuracy.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{B4DD3F33-F6B3-4409-AF7A-D158FC099D39}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=Segmentation Accuracy Tool
AllowNoIcons=yes
OutputBaseFilename=Segmentation Accuracy Tool
SetupIconFile=C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\iconnew_small.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
[Files]
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\_ctypes.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\_hashlib.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\_multiprocessing.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\_socket.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\_ssl.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\_tkinter.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\bz2.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\cfitsio.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\gdal19.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\geos_c.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\hdf5_hldll.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\hdf5dll.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\hdfdll.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\libiomp5md.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\library.zip"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\mfhdfdll.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\netcdf.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.core._dotblas.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.core._sort.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.core.multiarray.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.core.scalarmath.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.core.umath.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.fft.fftpack_lite.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.lib._compiled_base.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.linalg.lapack_lite.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\numpy.random.mtrand.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\osgeo._gdal.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\osgeo._gdal_array.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\osgeo._gdalconst.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\osgeo._ogr.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\osgeo._osr.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\pyexpat.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\python27.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\SegmentationAccuracy.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\select.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\sz.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\tcl85.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\tk85.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\unicodedata.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\xdrdll.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\xerces-c_2_8.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\PythonScript\Script_fun\Segmentatin_Accuracy\SegmentationAccuracy_executable_project\dist\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
; Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\iconnew_smallUninstall.ico"
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent