是否可以使用ant自动创建一个inno安装包? [英] Is it possible to automate the creation of a inno setup package with ant?

查看:114
本文介绍了是否可以使用ant自动创建一个inno安装包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建Eclipse RCP应用程序。

I am creating an Eclipse RCP application.

我在以下文章Daily Builds are your friend中关注Joel的建议:

I am following Joel's advice in the following article "Daily Builds are your friend":

http://www.joelonsoftware.com/articles/fog0000000023。 html

所以,我写了一个漂亮的构建脚本,创建一个Eclipse RCP产品,并在代码上运行单元测试。然后将所有结果分发给开发人员的列表(在一些抱怨之后)。现在我的下一步,我希望它创建一个安装程序包,我通常使用inno安装程序编译器手动创建。

So, I've written a nice build script that creates an Eclipse RCP product and that runs unit tests on the code. All results are then distributed to the developer's list (after some grumbling). Now my next step, I want it to create the setup package that I normally create manually using the inno setup compiler.

问题是,我如何围绕创建这个自动包装?我想我可以从蚂蚁自动生成inno安装文件,然后从命令行调用编译器,但是我不知道这是否可行。

The question is, how would I get around creating this package automatically? I guess I can generate the inno setup file automatically from ant, and then invoke the compiler from the command line, but I don't know if this is possible.

任何这个任务的提示?也许任何其他可以从ant使用的设置应用程序?

Any tips for this task? Maybe any other setup application that can be used from ant?

推荐答案

确定它的简单,Inno项目是一个纯文本文件,所以你甚至可以通过蚂蚁轻松地编辑安装程序脚本,但是我建议您通过脚本创建一个单独的小型包含文件。您可以在这里存储变量,例如您在安装开始时显示的版本+内部版本号。

sure its easy, Inno project is a plain text file so you can even edit setupper script easily by ant, however I would recommend creating a separate small include file by your script. You can have store there "variables" such as version+build number that you show in begin of setup.

将此行放置到您的安装程序中:

put this line to your setupper:

#include "settings.txt"

并使settings.txt有这样的东西

and make settings.txt have something like this

#define myver=xxx.xxx
#define tags

现在,您不需要从构建脚本触摸实际的安装程序代码。

now you don't need to touch the actual setupper code from build script.

下面是我的构建脚本的代码段,用于编译安装程序。
你需要从蚂蚁这样执行批处理文件:

below is a snippet from my build script to compile the setupper. you need to execute batch file from ant like this:

<exec dir="." executable="cmd" os="Windows NT">
  <arg line="/c build.bat"/>
</exec>

样品批量build.bat:

sample batch build.bat:

set isxpath="c:\program files\inno setup 5"
set isx=%isxpath%\iscc.exe
set iwz=myproj.iss
if not exist %isx% set errormsg=%isx% not found && goto errorhandler
%isx% "%iwz%" /O"%buildpath%" /F"MySetupper.exe" >>%logfile%
goto :eof

这篇关于是否可以使用ant自动创建一个inno安装包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆