我正在尝试为我的安装程序添加 VCL 样式(Inno Setup 5.5.6 (a))。在安装过程中正确加载样式,但是当我尝试卸载时出现错误
运行时错误(at-1:0):无法导入 dll:VclStylesInno.dll。
而且我无法卸载我的程序。
有谁知道我能做什么?
谢谢您的帮助
#define VCLStylesSkinPath "{localappdata}\VCLStylesSkin"
[Files]
;Install
Source: "VclStylesinno.dll"; DestDir: "{app}"; Flags: dontcopy
Source: "Styles\Auric.vsf"; DestDir: "{app}"; Flags: dontcopy
;Uninstall
Source: "VclStylesinno.dll"; DestDir: "{#VCLStylesSkinPath}"; \
Flags: uninsneveruninstall
Source: "Styles\Auric.vsf"; DestDir: "{#VCLStylesSkinPath}"; \
Flags: uninsneveruninstall
[Code]
{ Import the LoadVCLStyle function from VclStylesInno.DLL }
procedure LoadVCLStyle(VClStyleFile: String);
external 'LoadVCLStyleA@files:VclStylesInno.dll stdcall setuponly';
procedure LoadVCLStyle_UnInstall(VClStyleFile: String);
external 'LoadVCLStyleA@VclStylesInno.dll stdcall uninstallonly';
{ Import the UnLoadVCLStyles function from VclStylesInno.DLL }
procedure UnLoadVCLStyles;
external 'UnLoadVCLStyles@files:VclStylesInno.dll stdcall setuponly';
procedure UnLoadVCLStyles_UnInstall;
external 'UnLoadVCLStyles@VclStylesInno.dll stdcall uninstallonly';
function InitializeUninstall: Boolean;
begin
Result := True;
LoadVCLStyle_UnInstall(ExpandConstant('Styles\Auric.vsf'));
end;
procedure DeinitializeUninstall();
begin
UnLoadVCLStyles_UnInstall;
end;