查看完整版本: [-- 虎哥,识别 --]

汉化新世纪论坛 -> 安装与补丁 -> 虎哥,识别 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

syl1130 2016-06-07 13:14

虎哥,识别

虎哥,
您好。有一个问题不知道怎么弄?




gnatix 2016-06-08 04:25
[Code]
function NextButtonClick(CurPageID: Integer): Boolean;
var s: AnsiString;
begin
  Result := true;
  if CurPageID = wpSelectDir then
    begin
      Result:= false;
      if FileExists(ExpandConstant('{app}\123.txt')) then        // 检查文件 123.txt 是否存在
        if LoadStringFromFile(ExpandConstant('{app}\123.txt'), s) then    // 读取文件内容
          if Pos('123', s) > 0 then        // 检查文件里面是否包含字符串 "123"
            Result := true;
      if Result = false then
        begin
          MsgBox('安装条件不满足,将退出安装。', mbInformation, MB_OK);
          Application.Terminate;            // 不满足条件时退出安装
        end;
    end;
end;


查看完整版本: [-- 虎哥,识别 --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Time 0.012914 second(s),query:3 Gzip disabled