Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Inno安装程序编译目录_Java_Ant_Inno Setup - Fatal编程技术网

Java Inno安装程序编译目录

Java Inno安装程序编译目录,java,ant,inno-setup,Java,Ant,Inno Setup,这是我第一次使用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="

这是我第一次使用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> 


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

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

“/O”指定输出路径(覆盖中的任何OutputDir设置) 脚本),以“/F”指定输出文件名(覆盖任何 OutputBaseFilename(脚本中的设置)

因此,如果您只想传递输出目录的/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> 

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

“/O”指定输出路径(覆盖中的任何OutputDir设置) 脚本),以“/F”指定输出文件名(覆盖任何 OutputBaseFilename(脚本中的设置)

因此,如果您只想传递输出目录的/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>