代码之家  ›  专栏  ›  技术社区  ›  Marcello B.

Innosetup返回标志[重复]

  •  2
  • Marcello B.  · 技术社区  · 6 年前

    [run] 部分。

    我试图通过 [Code] [Run] 部分。

    [Code]
    function VerifyDir(DirName: String): Flag;
    begin
      {Check if directory exists, if it does then set the check flag to unchecked}
      if not DirExists(DirName) then
        Result := unchecked
      end;  
      {Directory Exists return a flag}
      Result := nowait
    end;
    

    然后在我的 [跑步] 第节,我尝试从函数传回标志,如下所示:

    [Run]
    Filename: C:\3S\LegacyAppFolder\Update.exe; Description: Blah Blah Blah; \
        Flags: VerifyDir('C:\3S\LegacyAppFolder')
    

    参数“Flags”包含未知标志。

    我假设这是因为要么我不能有一个内联函数,我需要用一种不同的方法来处理这个问题,要么这根本不可能。

    1 回复  |  直到 6 年前
        1
  •  2
  •   Andrew Truckle    6 年前

    你不想使用 flags 做测试的部分。

    here

    Check: xxxxxxx
    

    如果check函数返回true,则处理语句。