[asterisk-scf-commits] asterisk-scf/integration/ice.git branch "zeroc/zeroc-java-windows-auto-path" created.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Feb 13 11:33:18 CST 2012
branch "zeroc/zeroc-java-windows-auto-path" has been created
at ef3ca9695a15b1d528119a2e439eecb70e5e403d (commit)
- Log -----------------------------------------------------------------
commit ef3ca9695a15b1d528119a2e439eecb70e5e403d
Author: David M. Lee <dlee at digium.com>
Date: Thu Feb 9 15:16:47 2012 -0600
ZeroC's patch to detect paths on Windows
diff --git a/java/config/build.properties b/java/config/build.properties
index 6d53b7b..ce5950d 100644
--- a/java/config/build.properties
+++ b/java/config/build.properties
@@ -8,14 +8,31 @@
# **********************************************************************
ice.version = 3.4.2
+
+#
+# Oracle Berkeley DB version, only needed if you want to build
+# Freeze.
+#
db.version = 4.8.30
#
+# Version of Jgoodies components to use, only needed if you want
+# to build IceGrid GUI
+#
+
+jgoodies-common.version = 1.2.0
+jgoodies-forms.version = 1.4.1
+jgoodies-looks.version = 2.4.1
+
+#
# Select an installation base directory. The directory will be created
-# if it does not exist.
+# if it does not exist. If this property is not set the default will be
+# used. Default values are:
+# - Windows: %SystemDrive%\Ice-${ice.version}
+# - Non Windows /opt/Ice-${ice.version}
#
-prefix = /opt/Ice-${ice.version}
-#prefix = C:/Ice-${ice.version}
+#prefix = /opt/Ice-${ice.version}
+#prefix = C:\Ice-${ice.version}
#
# Define debug as on if you want to build with debug information.
@@ -28,12 +45,20 @@ debug = on
lint = unchecked,deprecation
#
-# These properties only need to be set if you want to build the
-# standalone jar for the IceGrid GUI.
+# These properties (jgoodies.common, jgoodies.forms and jgoodies.looks)
+# only need to be set if you want to build the IceGrid GUI.
+#
+# If jgoodies is installed in default location you don't need to set this property
+#
+#
+# Windows default locations:
+#
+#jgoodies.common = C:\Program Files\ZeroC\Ice-${ice.version}-ThirdParty\lib\jgoodies-common-${jgoodies-common.version}.jar
+#jgoodies.forms = C:\Program Files\ZeroC\Ice-${ice.version}-ThirdParty\lib\jgoodies-forms-${jgoodies-forms.version}.jar
+#jgoodies.looks = C:\Program Files\ZeroC\Ice-${ice.version}-ThirdParty\lib\jgoodies-looks-${jgoodies-looks.version}.jar
+#
+# Non Windows default locations
#
-jgoodies.common = /usr/share/java/jgoodies-common-1.2.0.jar
-jgoodies.forms = /usr/share/java/jgoodies-forms-1.4.1.jar
-jgoodies.looks = /usr/share/java/jgoodies-looks-2.4.1.jar
-#jgoodies.common = C:/Program\ Files/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-common-1.2.0.jar
-#jgoodies.forms = C:/Program\ Files/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-forms-1.4.1.jar
-#jgoodies.looks = C:/Program\ Files/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-looks-2.4.1.jar
+#jgoodies.common = /usr/share/java/jgoodies-common-${jgoodies-common.version}.jar
+#jgoodies.forms = /usr/share/java/jgoodies-forms-${jgoodies-forms.version}.jar
+#jgoodies.looks = /usr/share/java/jgoodies-looks-${jgoodies-looks.version}.jar
diff --git a/java/config/common.xml b/java/config/common.xml
index 2fc5a23..e989684 100644
--- a/java/config/common.xml
+++ b/java/config/common.xml
@@ -18,9 +18,43 @@
<!-- Create the time stamp -->
<tstamp/>
</target>
-
+
<!-- Load build configuration properties -->
<property file="${top.dir}/config/build.properties"/>
+
+ <condition property="ProgramFiles32" value="${env.ProgramFiles}">
+ <!-- We can't check for PROCESSOR_ARCHITECTURE because it's set to x86 by ant even on AMD64 platforms. -->
+ <and>
+ <os family="Windows"/>
+ <not><isset property="ProgramFiles32"/></not>
+ <available file="${env.ProgramFiles}\ZeroC\Ice-${ice.version}-ThirdParty\lib\db.jar"/>
+ </and>
+ </condition>
+
+ <condition property="ProgramFiles32" value="${env.ProgramFiles(x86)}">
+ <!-- We can't check for PROCESSOR_ARCHITECTURE because it's set to x86 by ant even on AMD64 platforms. -->
+ <and>
+ <os family="Windows"/>
+ <not><isset property="ProgramFiles32"/></not>
+ <available file="${env.ProgramFiles(x86)}\ZeroC\Ice-${ice.version}-ThirdParty\lib\db.jar"/>
+ </and>
+ </condition>
+
+
+ <!-- Set default prefix directory, just if prefix is not set -->
+ <condition property="prefix" value="${env.SystemDrive}\Ice-${ice.version}">
+ <and>
+ <os family="windows"/>
+ <not><isset property="prefix"/></not>
+ </and>
+ </condition>
+
+ <condition property="prefix" value="/opt/Ice-${ice.version}">
+ <and>
+ <not><os family="windows"/></not>
+ <not><isset property="prefix"/></not>
+ </and>
+ </condition>
<!-- Use -Xlint when requested -->
<condition property="javac.lint" value="-Xlint:${lint}" else="-Xlint:none">
@@ -43,7 +77,7 @@
<pathconvert property="ice.top.dir">
<path location="${top.dir}"/>
</pathconvert>
-
+
<condition property="slice.translator" value="slice2java.exe" else="slice2java">
<os family="windows"/>
</condition>
@@ -147,19 +181,10 @@
<available file="/usr/bin/${slice.translator}"/>
</and>
</condition>
- <condition property="ice.dir" value="C:\Program Files\ZeroC\Ice-${ice.version}">
- <and>
- <os family="windows"/>
- <not><isset property="ice.dir"/></not>
- <available file="C:\Program Files\ZeroC\Ice-${ice.version}\bin\${slice.translator}"/>
- </and>
- </condition>
- <condition property="ice.dir" value="C:\Program Files (x86)\ZeroC\Ice-${ice.version}">
+ <condition property="ice.dir" value="${ProgramFiles32}\ZeroC\Ice-${ice.version}">
<and>
- <!-- We can't check for PROCESSOR_ARCHITECTURE because it's set to x86 by ant even on AMD64 platforms. -->
<os family="windows"/>
<not><isset property="ice.dir"/></not>
- <available file="C:\Program Files (x86)\ZeroC\Ice-${ice.version}\bin\${slice.translator}"/>
</and>
</condition>
<condition property="ice.dir" value="/opt/Ice-${ice.version}">
@@ -208,10 +233,85 @@
<available file="/opt/Ice-${ice.version}/lib/db.jar"/>
</and>
</condition>
-
+ <condition property="db.jar.file" value="/opt/db-${db.version}/lib/db.jar">
+ <and>
+ <not><os family="windows"/></not>
+ <not><isset property="db.jar.file"/></not>
+ <not><available classname="com.sleepycat.db.Database"/></not>
+ <available file="/opt/db-${db.version}/lib/db.jar"/>
+ </and>
+ </condition>
+ <condition property="db.jar.file" value="/opt/db/lib/db.jar">
+ <and>
+ <not><os family="windows"/></not>
+ <not><isset property="db.jar.file"/></not>
+ <not><available classname="com.sleepycat.db.Database"/></not>
+ <available file="/opt/db/lib/db.jar"/>
+ </and>
+ </condition>
+ <condition property="db.jar.file" value="${ProgramFiles32}/ZeroC/Ice-${ice.version}-ThirdParty/lib/db.jar">
+ <and>
+ <os family="windows"/>
+ <not><isset property="db.jar.file"/></not>
+ <not><available classname="com.sleepycat.db.Database"/></not>
+ <available file="${ProgramFiles32}/ZeroC/Ice-${ice.version}-ThirdParty/lib/db.jar"/>
+ </and>
+ </condition>
+
<path id="db.classpath">
<pathelement location="${db.jar.file}"/>
</path>
+
+ <!-- Set jgoodies.common.file to the path name of the Jgoodies Common JAR file -->
+ <condition property="jgoodies.common" value="/usr/share/java/jgoodies-common-${jgoodies-common.version}.jar">
+ <and>
+ <not><os family="windows"/></not>
+ <not><isset property="jgoodies.common"/></not>
+ <available file="/usr/share/java/jgoodies-common-${jgoodies-common.version}.jar"/>
+ </and>
+ </condition>
+ <condition property="jgoodies.common"
+ value="${ProgramFiles32}/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-common-${jgoodies-common.version}.jar">
+ <and>
+ <os family="windows"/>
+ <not><isset property="jgoodies.common"/></not>
+ <available file="${ProgramFiles32}/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-common-${jgoodies-common.version}.jar"/>
+ </and>
+ </condition>
+
+ <!-- Set jgoodies.forms.file to the path name of the Jgoodies Common JAR file -->
+ <condition property="jgoodies.forms" value="/usr/share/java/jgoodies-forms-${jgoodies-forms.version}.jar">
+ <and>
+ <not><os family="windows"/></not>
+ <not><isset property="jgoodies.forms"/></not>
+ <available file="/usr/share/java/jgoodies-forms-${jgoodies-forms.version}.jar"/>
+ </and>
+ </condition>
+ <condition property="jgoodies.forms"
+ value="${ProgramFiles32}/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-forms-${jgoodies-forms.version}.jar">
+ <and>
+ <os family="windows"/>
+ <not><isset property="jgoodies.forms"/></not>
+ <available file="${ProgramFiles32}/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-forms-${jgoodies-forms.version}.jar"/>
+ </and>
+ </condition>
+
+ <!-- Set jgoodies.looks.file to the path name of the Jgoodies Common JAR file -->
+ <condition property="jgoodies.looks" value="/usr/share/java/jgoodies-looks-${jgoodies-looks.version}.jar">
+ <and>
+ <not><os family="windows"/></not>
+ <not><isset property="jgoodies.looks"/></not>
+ <available file="/usr/share/java/jgoodies-looks-${jgoodies-looks.version}.jar"/>
+ </and>
+ </condition>
+ <condition property="jgoodies.looks"
+ value="${ProgramFiles32}/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-looks-${jgoodies-looks.version}.jar">
+ <and>
+ <os family="windows"/>
+ <not><isset property="jgoodies.looks"/></not>
+ <available file="${ProgramFiles32}/ZeroC/Ice-${ice.version}-ThirdParty/lib/jgoodies-looks-${jgoodies-looks.version}.jar"/>
+ </and>
+ </condition>
<target name="config-init-warn" if="ice.warn.duplicate.translator">
<echo message="Found ${slice.translator} in both ${ice.cpp.dir}/bin and ${ice.dir}/cpp/bin, ${ice.cpp.dir}/bin/${slice.translator} will be used!" level="warning"/>
-----------------------------------------------------------------------
--
asterisk-scf/integration/ice.git
More information about the asterisk-scf-commits
mailing list