1

有没有办法动态填充 Inno Setup 脚本的[Dirs]and[Files]部分?

这是我正在尝试做的事情:

  1. 在安装过程中,用户将选择foofoo匹配从我们的 SCM 获取的存储库)

  2. 安装程序将运行批处理以从我们的 SCM中签出foo

  3. 那么foo的内容必须添加到脚本的[Dirs]and[Files]部分

除了最后一步,一切正常。我四处搜索,找不到有关如何执行此操作的解释。我觉得我的脚本应该嵌入我们 SCM 的所有存储库,然后才能仅将选定的存储库复制到目标目录。

谢谢你的帮助!

问候,

4

1 回答 1

2

有关外部文件位置,请参阅Inno Setup Prompt 。

并添加recursesubdirs标志

您可能还需要该createallsubdirs标志(假设您参考了该[Dirs]部分)。

[Files]
Source: "{code:GetScmPath}"; DestDir: "{app}"; \
    Flags: external recursesubdirs createallsubdirs
[Code]

function GetScmPath(Param: string): string;
begin
  Result := { make it return path to the checked out files }
end;
于 2017-03-09T15:45:13.360 回答