如何使用 ant 确定构建架构(32 位/64 位)? [英] How to determine build architecture (32bit / 64bit) with ant?

查看:31
本文介绍了如何使用 ant 确定构建架构(32 位/64 位)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们继承了一个 ant 构建文件,但现在需要部署到 32 位和 64 位系统.

We have inherited an ant build file but now need to deploy to both 32bit and 64bit systems.

非 Java 位是用 GNUMakefiles 完成的,我们只需调用uname"来获取信息.有没有类似甚至更简单的方法来用 ant 模仿这个?

The non-Java bits are done with GNUMakefiles where we just call "uname" to get the info. Is there a similar or even easier way to mimic this with ant?

推荐答案

你可以在java系统属性(http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperties()) 来自 ant 和 ${os.arch}.其他感兴趣的属性可能是 os.name、os.version、sun.cpu.endian 和 sun.arch.data.model.

you can get at the java system properties (http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperties()) from ant with ${os.arch}. other properties of interest might be os.name, os.version, sun.cpu.endian, and sun.arch.data.model.

这篇关于如何使用 ant 确定构建架构(32 位/64 位)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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