从Windows下ANT脚本创建RPM软件包 [英] Create RPM package from ANT script under Windows

查看:210
本文介绍了从Windows下ANT脚本创建RPM软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从Windows计算机上运行Ant脚本创建RPM包。此包必须包含从构建再加上一些其他的,额外的资源,结果类。

I need to create an RPM package from an ANT script that runs on a Windows computer. This package must contain the result classes from the build plus some other, additional resources.

我想应该有一些程序的地方,可以从命令行调用创建此包。

I guess there should be some program somewhere that can be invoked from the command line to create this package.

为什么我要做到这一点,Windows下的原因是,我们有建造安装了几个不同的平台的脚本,一切都已经配置了Windows,所以我想避免迁移一切Linux的痛苦。

The reason why I want to do this under windows is that we have a script that builds installers for several different platforms, and everything is already configured for windows so I want to avoid the pain of migrating everything to linux.

你知道如何才能实现这一目标?

Do you know how could this be achieved?

编辑:
我用一个单独的Linux机器做到这一点。我复制使用SCP任务中的所有文件,然后远程使用ssh任务执行rpm命令。如果这个任务返回成功code,我复制与SCP导致转回来了。

I've used a separate Linux machine to do this. I copy all files using the scp task, then execute the rpm command remotely using the ssh task. If this task returns a success code, I copy the resulting rpm back with scp.

推荐答案

我不知道任何软件包要做到这一点,但是这可能只是我的无知说。

I'm not aware of any packages to do this, but that could just be my ignorance speaking.

两点建议:

设置一台Linux机器(单独的PC或虚​​拟机)及配套的rpm通过远程脚本(请参见 SSH / SCP / 桑巴)。这令我可避免全力打造环境迁移的一种安全的方法。

Set up a Linux machine (separate PC or virtual machine) and kit the rpm remotely via scripts (see ssh/scp/samba). This strikes me as a safe approach that avoids full build environment migration.

一个更冒险的方法是使用Java编写自己的RPM文件。 <一href=\"http://www.google.co.uk/search?hl=en&client=firefox-a&rls=org.mozilla:en-GB:official&hs=qg7&q=+site:rpm.org+rpm+file+format\"相对=nofollow>该RPM文件格式的似乎是一个标头后面的一些标准的压缩格式中的一个。将需要的存档内容进行一些分析,因此这种方法可能在短期内消费(虽然它可能会导致更快的版本)相当的时间。

A more adventurous approach would be to write your own RPM files using Java. The RPM file format seems to be a header followed by one of a number of standard archive formats. Some analysis of the archive contents would be needed, so this approach might be quite time consuming in the short term (though it would probably result in faster builds).

这篇关于从Windows下ANT脚本创建RPM软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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