Inno setup Inno安装组件的详细说明

Inno setup Inno安装组件的详细说明,inno-setup,Inno Setup,我正在使用Inno安装程序构建一个安装,并使用components部分允许最终用户选择要安装的可选项目 其中一些项目需要更长的描述,以便用户有足够的信息智能地选择它们 有没有办法在某个地方添加更深入的描述?使用(下载链接在下面的某个地方) 它支持比标准编译器更多的类和事件。您可以访问属性“OnItemMouseMove”。使用此选项,可以存储标签显示的每个项目的说明。以下是一个例子: var CompLabel: TLabel; procedure OnItemMouseMove(Sender

我正在使用Inno安装程序构建一个安装,并使用components部分允许最终用户选择要安装的可选项目

其中一些项目需要更长的描述,以便用户有足够的信息智能地选择它们

有没有办法在某个地方添加更深入的描述?

使用(下载链接在下面的某个地方)

它支持比标准编译器更多的类和事件。您可以访问属性“OnItemMouseMove”。使用此选项,可以存储标签显示的每个项目的说明。以下是一个例子:

var
CompLabel: TLabel;

procedure OnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea);
begin
  case Index of
    0: CompLabel.Caption := 'This is the description of Component 1';
    1: CompLabel.Caption := 'This is the description of Component 2';
    2: CompLabel.Caption := 'This is the description of Component 3';
    3: CompLabel.Caption := 'This is the description of Component 4'
  else
    CompLabel.Caption := 'Move your mouse over a component to see its description.';
  end;
end;

procedure OnMouseLeave(Sender: TObject);
begin
  CompLabel.Caption := 'Move your mouse over a component to see its description.';
end;

procedure InitializeWizard();
begin
  CompLabel := TLabel.Create(WizardForm);
  CompLabel.Parent := WizardForm.SelectComponentsPage;
  CompLabel.SetBounds(WizardForm.ComponentsList.Left,180,WizardForm.ComponentsList.Width,200);
  CompLabel.Caption := 'Move your mouse over a component to see its description.';
  WizardForm.ComponentsList.OnItemMouseMove := @OnItemMouseMove;
  WizardForm.ComponentsList.OnMouseLeave := @OnMouseLeave;
  WizardForm.ComponentsList.Height := WizardForm.ComponentsList.Height - 40;
end;

此解决方案仅使用Inno安装程序(而不是来源可疑的Inno安装程序的过时第三方版本)

解决方案部分基于我对问题的回答

根据需要调整
HoverComponentChanged
过程

[代码]
变量
最后一只鼠标:TPoint;
普拉贝尔:特拉贝尔;
函数GetCursorPos(var lpPoint:TPoint):BOOL;
外部的GetCursorPos@user32.dllstdcall';
函数设置计时器(
hWnd:longword;nIDEvent,uElapse:longword;lpTimerFunc:longword):longword;
外部的SetTimer@user32.dllstdcall';
函数ScreenToClient(hWnd:hWnd;var lpPoint:TPoint):BOOL;
外部的ScreenToClient@user32.dllstdcall';
功能客户端到屏幕(hWnd:hWnd;变量lpPoint:TPoint):BOOL;
外部的ClientToScreen@user32.dllstdcall';
函数列表框\u GetItemRect(
常量hWnd:hWnd;常量Msg:Integer;索引:LongInt;变量Rect:TRect):LongInt;
外部的SendMessageW@user32.dllstdcall';
常数
LB_GETITEMRECT=$0198;
LB_GETTOPINDEX=$018E;
函数FindControl(父级:TWinControl;P:TPoint):TControl;
变量
控制:t控制;
WinControl:双控;
I:整数;
P2:TPoint;
开始
对于I:=0到Parent.ControlCount-1 do
开始
控件:=父控件[I];
如果控制。可见和
(Control.Left WizardForm.ClientHeight)然后
开始
控制:=零;
结束
其他的
开始
控件:=FindControl(WizardForm,P);
结束;
指数:=-1;
如果(Control=WizardForm.ComponentList)和
(不是WizardForm.TypesCombo.DroppedDown)然后
开始
P:=最后一只老鼠;
ScreenToClient(WizardForm.ComponentsList.Handle,P);
索引:=ListBoxItemAtPos(WizardForm.ComponentsList,P);
结束;
变更的组件(索引);
结束;
结束;
过程初始化Wizard();
开始
SetTimer(0,0,50,CreateCallback(@HoverTimerProc));
平面标签:=TLabel.Create(WizardForm);
父项:=WizardForm.SelectComponentsPage;
plambel.Left:=WizardForm.ComponentsList.Left;
平面标签宽度:=WizardForm.ComponentList.Width;
平面高度:=ScaleY(32);
上图:=
WizardForm.ComponentsList.Top+WizardForm.ComponentsList.Height-平面图高度;
supplbel.AutoSize:=False;
splambel.WordWrap:=真;
WizardForm.Components列表高度:=
WizardForm.ComponentsList.Height-平面图高度-缩放(8);
结束;


对于,您需要Inno设置6。如果您坚持使用Inno Setup 5,则可以使用库中的
WrapCallback
函数。使用Inno Setup 5的Unicode版本。

在Inno中不是本机的,而是查看脚本。这应该可以修改以显示
[组件]
说明。