Inno-Setup: SetupIconFile: 系统找不到指定的路径

Inno-Setup: SetupIconFile: The system cannot find the path specified

我正在尝试使用 Inno-Setup 创建安装 Setup.exe 文件,如下所示:

[Setup]
AppName=Muwassa
AppVersion=1.0
AppVerName=Muwassa 1.0
DefaultDirName={pf}\Muwassa
DefaultGroupName=Muwassa
Compression=zip
SolidCompression=yes
OutputDir=.
SetupIconFile={app}\muwassa.ico
UninstallDisplayIcon={app}\muwassa.ico
AllowCancelDuringInstall=no
DisableDirPage =yes
AppContact=info@DevSuda.com
AppPublisher=DevSuda Ltd.
SetupLogging=yes

[Files]
Source: "Muwassa.exe"; DestDir: "{app}"
Source: "README.txt"; DestDir: "{app}"; Flags: isreadme
Source: "*.*"; DestDir: "{app}"; Flags: replacesameversion recursesubdirs

[Icons]
Name: "{group}\Muwassa"; Filename: "{app}\Muwassa.exe"
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
Name: {commondesktop}\Muwassa; Filename: {app}\Muwassa.exe; WorkingDir: {app}; IconFilename: {app}\muwassa.ico; Comment: "Muwassa"

[Run]
Filename: "{app}\Muwassa.exe"

但是在第 10 行:

SetupIconFile={app}\muwassa.ico

出现此错误消息:

Line 10:

The system cannot find the path specified.

尽管我对卸载图标使用了类似的语法:

UninstallDisplayIcon={app}\muwassa.ico

我做错了什么?

{app} 常量包含

The application directory, which the user selects on the Select Destination Location page of the wizard.

Documentation

所以这个值是在运行时间期间设置的。在编译时 期间需要知道安装程序的图标文件。这就是找不到文件的原因。