summaryrefslogtreecommitdiff
path: root/java/makedist.py
diff options
context:
space:
mode:
authorBrent Eagles <brent@zeroc.com>2006-11-08 12:49:42 +0000
committerBrent Eagles <brent@zeroc.com>2006-11-08 12:49:42 +0000
commita3e40bc5ff66bf986da3ec9a2e3833e8cf0abf2a (patch)
tree5f3b246d39f167b6924d7cf5a04183905e2a2659 /java/makedist.py
parent64 bit error. (diff)
downloadice-a3e40bc5ff66bf986da3ec9a2e3833e8cf0abf2a.tar.bz2
ice-a3e40bc5ff66bf986da3ec9a2e3833e8cf0abf2a.tar.xz
ice-a3e40bc5ff66bf986da3ec9a2e3833e8cf0abf2a.zip
Adding precondition checks to make sure that IceGridGUI has a chance of
building correctly for distribution
Diffstat (limited to 'java/makedist.py')
-rwxr-xr-xjava/makedist.py45
1 files changed, 42 insertions, 3 deletions
diff --git a/java/makedist.py b/java/makedist.py
index 62e4fb4daa0..387bd6b3433 100755
--- a/java/makedist.py
+++ b/java/makedist.py
@@ -135,6 +135,45 @@ os.system("cvs " + quiet + " -d cvs.zeroc.com:/home/cvsroot export " + tag +
" icej ice/bin ice/config ice/doc ice/include ice/lib ice/slice ice/src")
#
+# Check known preconditions for proper distribution building. Failed
+# checks do not result in immediate failure. Error messages are
+# displayed and the precondition checks continue to aide in identifying
+# other problems. If any of the precondition checks fail, the script
+# terminates.
+#
+f = file(os.path.join("icej", "config", "build.properties"))
+buildProperties = f.readlines();
+f.close()
+
+errorOut = False
+for p in buildProperties:
+ checkFilename = None
+ d = p.split("=")
+ if d[0].strip() in ["jgoodies.looks", "jgoodies.forms", "berkeleydb.jar"]:
+ if not os.path.exists(d[1].strip()):
+ print "ERROR: %s is not in configured location. IceGridGUI.jar will not build correctly!" % d[1].strip()
+ errorOut = True
+
+if not os.environ.has_key("CLASSPATH"):
+ print "ERROR: No CLASSPATH, unable to find ProGuard jar file."
+ errorOut = True
+else:
+ classpath = os.environ["CLASSPATH"]
+ found = False
+ for e in classpath.split(os.pathsep):
+ if e.find("proguard.jar") != -1:
+ if os.path.exists(e):
+ found = True
+ break
+ if not found:
+ print "ERROR: Unable to find ProGuard in CLASSPATH"
+ errorOut = True
+
+if errorOut:
+ print "Failed precondition checks! See above messages."
+ sys.exit(1)
+
+#
# Copy Slice directories.
#
print "Copying Slice directories..."
@@ -226,14 +265,14 @@ filesToRemove.extend(find("icej", ".dummy"))
for x in filesToRemove:
os.remove(x)
+cwd = os.getcwd()
+os.chdir("icej")
+
#
# Build sources.
#
print "Compiling Java sources..."
-cwd = os.getcwd()
-os.chdir("icej")
-
if verbose:
quiet = ""
else: