有没有类似的事件/函数CurInstallProgressChanged
对于进度条CurProgress
and MaxProgress
Inno Setup 中卸载表单中的值?
对此没有本机支持。
您可以做的是设置一个计时器并观察时间的变化UninstallProgressForm.ProgressBar.Position
.
代码可能是这样的:
[Code]
procedure TimerProc(
h: LongWord; AMsg: LongWord; IdEvent: LongWord; dwTime: LongWord);
begin
Log(Format(
'Uninstall progress: %d/%d', [
UninstallProgressForm.ProgressBar.Position,
UninstallProgressForm.ProgressBar.Max]));
end;
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord;
lpTimerFunc: LongWord): LongWord;
external '[email protected] /cdn-cgi/l/email-protection stdcall';
procedure InitializeUninstallProgressForm();
begin
SetTimer(0, 0, 100, CreateCallback(@TimerProc)); // every 100 ms
end;
For CreateCallback功能 https://jrsoftware.org/ishelp/index.php?topic=isxfunc_createcallback,您需要 Inno Setup 6。
如果您无法使用 Inno Setup 5,您可以使用WrapCallback
函数来自InnoTools InnoCallback http://www.sherlocksoftware.org/page.php?id=54库(代码需要 Inno Setup 5 的 Unicode 版本)。但使用卸载程序中的外部 DLL 库很棘手,并且有其缺点。看看(你的)在 Inno Setup 中加载用于卸载过程的外部 DLL https://stackoverflow.com/q/36940506/850848。对于另一种解决方案(更好但实现起来更复杂),请参阅如何将卸载文件保留在卸载程序中? https://stackoverflow.com/q/14847218/850848#38336841
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)