Repository navigation
Expand file tree
/
Copy pathbuild.os.xml
More file actions
80 lines (76 loc) · 2.33 KB
/
Copy pathbuild.os.xml
File metadata and controls
80 lines (76 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
This ant script provides system dependent information.
To be imported to other project builds a <import file="build.os.xml"/>
and used by calling the target `osinfo`.
Defined properties:
osname = linux or windoes
bits = 32 or 64
j3d = path to the Java3D distribution for given system
(define appropriate paths in build.properties)
Defined conditions:
windows_32
windows_64
linux_32
linux_64
-->
<project basedir="." default="osinfo" name="osinfo">
<property file="./build.properties"/>
<target name="getos" >
<condition property="windows_64">
<and>
<os family="windows"/>
<contains string="${os.arch}" substring="amd64" />
</and>
</condition>
<condition property="windows_32">
<and>
<os family="windows"/>
<not>
<contains string="${os.arch}" substring="amd64" />
</not>
</and>
</condition>
<condition property="linux_64">
<and>
<os family="unix"/>
<contains string="${os.arch}" substring="amd64" />
</and>
</condition>
<condition property="linux_32">
<and>
<os family="unix"/>
<not>
<contains string="${os.arch}" substring="amd64" />
</not>
</and>
</condition>
</target>
<target name="win32" depends="getos" if="windows_32" >
<property name="osname" value="windows" />
<property name="bits" value="32" />
<property name="j3d" value="${java3d}"/>
</target>
<target name="win64" depends="getos" if="windows_64" >
<property name="osname" value="windows" />
<property name="bits" value="64" />
<property name="j3d" value="${java3d}"/>
</target>
<target name="lin32" depends="getos" if="linux_32" >
<property name="osname" value="linux" />
<property name="bits" value="32" />
<property name="j3d" value="${java3d}"/>
</target>
<target name="lin64" depends="getos" if="linux_64" >
<property name="osname" value="linux" />
<property name="bits" value="64" />
<property name="j3d" value="${java3d}"/>
</target>
<target name="osinfo" depends="win32,win64,lin32,lin64">
<echo message="OS Target: ${osname}-${bits}bit" />
<echo message="OS Name is: ${os.name}" />
<echo message="OS Architecture is: ${os.arch}" />
<echo message="OS Version is: ${os.version}" />
<echo message="J3D path is: ${j3d}" />
</target>
</project>