tmi*_*hty 3 inno-setup pascalscript
我已将以下代码添加到我的脚本中:
[Code]
function IsSomeAppInstalled: Boolean;
begin
Result := FileExists(ExpandConstant('{pf32}\SomeApp\Some.dll'));
end;
function InitializeSetup(): Boolean;
begin
Boolean bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)),
mbInformation, MB_OK);
Result := true;
end;
Run Code Online (Sandbox Code Playgroud)
线
Boolean bIsInstalled := IsSomeAppInstalled();
Run Code Online (Sandbox Code Playgroud)
引发错误
内部错误 (20)
这里可能是什么错误?
在 Pascal (Script) 中,您在实际代码之前使用var关键字声明变量:
function InitializeSetup(): Boolean;
var
bIsInstalled: Boolean;
begin
bIsInstalled := IsSomeAppInstalled();
MsgBox('IsSomeAppInstalled: ' + IntToStr(Integer(bIsInstalled)),
mbInformation, MB_OK);
Result := true;
end;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
305 次 |
| 最近记录: |