2
我是InnoSetup的初学者。在InnoSetup中添加卸载图标
我有两个图标"iconnew_small.ico"
和"iconnew_smallUninstall.ico"
,这是Unistall选项的最后一个。所有的文件都在目录C:\mysoftware
我下面这个example但在安装后卸载图标是空白(空)
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
只是最后的请求请。如果我想调用该exe文件作为“Mysoftware v 0.2 beta.exe”,我需要改变?你可以在你的答案中添加这个信息吗? – 2013-03-21 19:45:51
这取决于您何时以及如何执行它。当向导完成后(作为*运行我的程序*复选框)或其他东西? – TLama 2013-03-21 19:47:58
通常我改变自己。只需右键点击重命名,但我想知道更“优雅”的解决方案 – 2013-03-21 19:49:23