有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Inno安装程序编译目录

这是我第一次使用Inno设置。我在ANT脚本中包含Inno设置:

<target name="generate-installer-exe" depends="generate-exe">
  <exec executable="C:/Program Files (x86)/Inno Setup 5/ISCC.exe">
    <arg value="${etc.dir}/innoSetup_config.iss"/>
    <arg value="/dMySourcePath=${deployment.dir}"/>
  </exec>
</target> 

它创建输出和设置。exe在${etc.dir}中,因为这是我的。iss文件是,但我希望它编译为${deployment.dir}。是否通过传递参数来动态更改编译目录,还是需要通过ANT移动文件


共 (1) 个答案

  1. # 1 楼答案

    根据文档,O/O参数可以满足您的需要

    "/O" to specify an output path (overriding any OutputDir setting in the script), "/F" to specify an output filename (overriding any OutputBaseFilename setting in the script)

    因此,如果只想传递输出目录的/O,可能需要以下内容:

    <target name="generate-installer-exe" depends="generate-exe">
      <exec executable="C:/Program Files (x86)/Inno Setup 5/ISCC.exe">
        <arg value="${etc.dir}/innoSetup_config.iss"/>
        <arg value="/dMySourcePath=${deployment.dir}"/>
        <arg value="/O${deployment.dir}"/>
      </exec>
    </target>