summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xFixUtil.py400
-rw-r--r--config/Make.common.rules28
-rwxr-xr-xdistribution/bin/fixCopyright.py35
-rwxr-xr-xdistribution/bin/fixVersion.py (renamed from fixVersion.py)14
-rwxr-xr-xdistribution/bin/makevsplugindist.py (renamed from makevsplugindist.py)0
-rwxr-xr-xdistribution/lib/FixUtil.py213
-rwxr-xr-xdistribution/makedist.py (renamed from makedist.py)0
-rw-r--r--distribution/src/windows/vsplugin/LICENSE.txt2
-rwxr-xr-xfixCopyright.py63
-rw-r--r--java/config/common.xml9
-rw-r--r--vsplugin/LICENSE.txt2
-rw-r--r--vsplugin/Makefile.mak2
-rw-r--r--vsplugin/config/Make.rules.mak2
-rw-r--r--vsplugin/src/AssemblyInfo.cs4
-rw-r--r--vsplugin/src/Builder.cs2
-rw-r--r--vsplugin/src/Connect.cs2
-rw-r--r--vsplugin/src/FileTracker.cs2
-rw-r--r--vsplugin/src/IceCppConfigurationDialog.Designer.cs2
-rw-r--r--vsplugin/src/IceCppConfigurationDialog.cs2
-rw-r--r--vsplugin/src/IceCsharpConfigurationDialog.Designer.cs2
-rw-r--r--vsplugin/src/IceCsharpConfigurationDialog.cs2
-rw-r--r--vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs2
-rw-r--r--vsplugin/src/IceSilverlightConfigurationDialog.cs2
-rw-r--r--vsplugin/src/Makefile.mak2
-rw-r--r--vsplugin/src/Util.cs2
25 files changed, 314 insertions, 482 deletions
diff --git a/FixUtil.py b/FixUtil.py
deleted file mode 100755
index ffe97a91cac..00000000000
--- a/FixUtil.py
+++ /dev/null
@@ -1,400 +0,0 @@
-#!/usr/bin/env python
-
-import os, sys, shutil, fnmatch, re, glob, getopt
-from stat import *
-
-def copyright(commentMark, product, license):
- result = [ ]
- result.append(commentMark + " **********************************************************************\n")
- result.append(commentMark + "\n")
- result.append(commentMark + " Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\n")
- result.append(commentMark + "\n")
- line1 = commentMark + (" This copy of %s is licensed to you under the terms described in the") % product
- line2 = commentMark
- if len(line1) >= 72:
- line2 = commentMark + line1[line1.rfind(" ", 0, 72):]
- line1 = line1[:line1.rfind(" ", 0, 72)]
- line2 += (" %s file included in this distribution.") % license
- line3 = commentMark
- if len(line2) >= 72:
- line3 = commentMark + line2[line2.rfind(" ", 0, 72):]
- line2 = line2[:line2.rfind(" ", 0, 72)]
- result.append(line1 + "\n")
- result.append(line2 + "\n")
- if line3 != commentMark:
- result.append(line3 + "\n")
- result.append(commentMark + "\n")
- result.append(commentMark + " **********************************************************************\n")
- return result
-
-# **********************************************************************
-#
-# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-def replaceCopyright(file, commentMark, commentBegin, commentEnd, newCopyrightLines):
- oldFile = open(file, "r")
- oldLines = oldFile.readlines()
-
- done = 0
- commentFound = 0
- copyrightFound = 0
-
- beforeCopyrightLines = []
- oldCopyrightLines = []
- newLines = []
-
- justDone = 0
- isWindowsEOL = False
-
- if commentBegin == "":
- for x in oldLines:
- if not commentFound and (not x.startswith(commentMark) or x.startswith("#!/usr/bin/env")):
- beforeCopyrightLines.append(x)
- elif not done and x.startswith(commentMark):
- commentFound = 1
- if not copyrightFound and x.lower().find("copyright") != -1:
- copyrightFound = 1
- if x.endswith("\r\n"):
- isWindowsEOL = True
- # skip this comment line
- oldCopyrightLines.append(x)
- else:
- if not done:
- done = 1
- justDone = 1
-
- # Eliminate double blank lines after copyright (bug introduced by previous fixCopyright script)
- if justDone == 1:
- newLines.append(x)
- if x != "\n":
- justDone = 0
- else:
- justDone = 2
- elif justDone == 2:
- if x != "\n":
- newLines.append(x)
- justDone = 0
- else:
- newLines.append(x)
- else:
- for x in oldLines:
- if not done:
- if x.startswith(commentBegin):
- commentFound = 1
- if commentFound:
- if not copyrightFound and x.find("Copyright") != -1:
- copyrightFound = 1
- if x.endswith("\r\n"):
- isWindowsEOL = True
-
- # skip this comment line
- if x.find(commentEnd) != -1:
- done = 1
- justDone = 1
- else:
- beforeCopyrightLines.append(x)
- else:
- # Eliminate double blank lines after copyright (bug introduced by previous fixCopyright script)
- if justDone == 1:
- newLines.append(x)
- if x != "\n":
- justDone = 0
- else:
- justDone = 2
- elif justDone == 2:
- if x != "\n":
- newLines.append(x)
- justDone = 0
- else:
- newLines.append(x)
-
-
- oldFile.close()
-
- if copyrightFound and newCopyrightLines != oldCopyrightLines:
-
- mode = os.stat(file)[ST_MODE]
-
- #origFile = file + ".orig"
- #shutil.copy2(file, origFile)
-
- newFile = open(file, "w")
- newFile.writelines(beforeCopyrightLines)
- if isWindowsEOL:
- newFile.writelines([l.replace('\n', '\r\n') for l in newCopyrightLines])
- else:
- newFile.writelines(newCopyrightLines)
-
- #
- # Hack to keep the .err files
- #
- if fnmatch.fnmatch(file, "*test/Slice/errorDetection/*.ice") > 0:
- newFile.write("\n")
-
- newFile.writelines(newLines)
- newFile.close()
-
- os.chmod(file, S_IMODE(mode))
- print "------ Replaced copyright in " + file + " -------"
-
- return copyrightFound
-
-#
-# Replace alls copyrights
-#
-def replaceAllCopyrights(path, product, license, recursive):
-
- cppCopyright = copyright("//", product, license)
- mcCopyright = copyright("; //", product, license)
- makefileCopyright = copyright("#", product, license)
- vbCopyright = copyright("'", product, license)
- pythonCopyright = makefileCopyright
- rubyCopyright = makefileCopyright
- xmlCopyright = []
- xmlCopyright.append("<!--\n");
- xmlCopyright.extend(copyright("", product, license))
- xmlCopyright.append("-->\n");
-
- files = os.listdir(path)
- for x in files:
- fullpath = os.path.join(path, x);
- if os.path.isdir(fullpath) and not os.path.islink(fullpath):
- if recursive:
- replaceAllCopyrights(fullpath, product, license, True)
- else:
-
- commentMark = ""
- commentBegin = ""
- commentEnd = ""
- copyrightLines = []
- skip = 0
-
- if x == "config" or x == ".depend" or x == ".dummy" or fnmatch.fnmatch(x, "*.dsp") or fnmatch.fnmatch(x, "*.sln") or fnmatch.fnmatch(x, "*.vdproj") or fnmatch.fnmatch(x, "*.err") or fnmatch.fnmatch(x, "*.class") or fnmatch.fnmatch(x, "*.ico") or fnmatch.fnmatch(x, "*.gif") or fnmatch.fnmatch(x, "*.jpg") or fnmatch.fnmatch(x, "*.orig"):
- print "Skipping file " + fullpath + ": no copyright needed"
- skip = 1
- elif fnmatch.fnmatch(x, "Make*") or fnmatch.fnmatch(x, "*.properties"):
- commentMark = "#"
- copyrightLines = makefileCopyright
- elif fnmatch.fnmatch(x, "*.h") or fnmatch.fnmatch(x, "*.cpp") or fnmatch.fnmatch(x, "*.cs") or \
- fnmatch.fnmatch(x, "*.java") or fnmatch.fnmatch(x, "*.l") or fnmatch.fnmatch(x, "*.y") or \
- fnmatch.fnmatch(x, "*.m") or fnmatch.fnmatch(x, "*.mm"):
- commentMark = "//"
- copyrightLines = cppCopyright
- elif fnmatch.fnmatch(x, "*.ice") and not fnmatch.fnmatch(x, "IllegalIdentifier.ice"):
- commentMark = "//"
- copyrightLines = cppCopyright
- elif fnmatch.fnmatch(x, "*.py"):
- commentMark = "#"
- copyrightLines = pythonCopyright
- elif fnmatch.fnmatch(x, "*.def"):
- commentMark = "#"
- copyrightLines = pythonCopyright
- elif fnmatch.fnmatch(x, "*.cnf"):
- commentMark = "#"
- copyrightLines = pythonCopyright
- elif fnmatch.fnmatch(x, "*.rb"):
- commentMark = "#"
- copyrightLines = rubyCopyright
- elif fnmatch.fnmatch(x, "*.mc"):
- commentMark = "; //"
- copyrightLines = mcCopyright
- elif fnmatch.fnmatch(x, "*.vb"):
- commentMark = "'"
- copyrightLines = vbCopyright
- elif fnmatch.fnmatch(x, "*.xml") or fnmatch.fnmatch(x, "*.xaml"):
- commentBegin = "<!--"
- commentEnd = "-->"
- copyrightLines = xmlCopyright
- else:
- print "***** Skipping file " + fullpath + ": unknown type"
- skip = 1
-
- if not skip:
- if replaceCopyright(fullpath, commentMark, commentBegin, commentEnd, copyrightLines) == 0:
- print "***** WARNING: Did not find copyright in " + fullpath
-
-#
-# Version patterns
-#
-vpatCheck = "[0-9]+\.[0-9]+(\.[0-9]+|b[0-9]*)$"
-vpatParse = "([0-9]+)\.([0-9]+)(\.[0-9]+|b[0-9]*)"
-vpatMatch = "([0-9]+\.[0-9]+(\.[0-9]+|b[0-9]*))"
-
-def commaVersion(version):
- major = majorVersion(version)
- minor = minorVersion(version)
- patch = patchVersion(version)
- return ("%s,%s,%s" % (major, minor, patch))
-
-def intVersion(version):
- r = re.search(vpatParse, version)
- major = int(r.group(1))
- minor = int(r.group(2))
- gr3 = r.group(3)
- patch = -1
- if gr3.startswith("."):
- patch = int(gr3[1:])
- else:
- if len(gr3) > 1:
- patch = 50 + int(gr3[1:])
- else:
- patch = 51
- return ("%2d%02d%02d" % (major, minor, patch)).strip()
-
-def betaVersion(version):
- r = re.search(vpatParse, version)
- if r.group(3).startswith("b"):
- return "b"
- else:
- return ""
-
-def soVersion(version):
- r = re.search(vpatParse, version)
- major = int(r.group(1))
- minor = int(r.group(2))
- v = ("%d%d" % (major, minor)).strip()
- if r.group(3).startswith("b"):
- return v + "b"
- else:
- return v
-
-def majorVersion(version):
- r = re.search(vpatParse, version)
- major = int(r.group(1))
- return ("%d" % (major)).strip()
-
-def minorVersion(version):
- r = re.search(vpatParse, version)
- minor = int(r.group(2))
- return ("%d" % (minor)).strip()
-
-def shortVersion(version):
- r = re.search(vpatParse, version)
- major = int(r.group(1))
- minor = int(r.group(2))
- return ("%d.%d" % (major, minor)).strip()
-
-def patchVersion(version):
- r = re.search(vpatParse, version)
-
- gr3 = r.group(3)
- patch = -1
- if gr3.startswith("."):
- patch = int(gr3[1:])
- else:
- if len(gr3) > 1:
- patch = 50 + int(gr3[1:])
- else:
- patch = 51
-
- return ("%d" % (patch)).strip()
-
-#
-# Find files matching a pattern.
-#
-def find(path, patt):
- result = [ ]
- files = os.listdir(path)
- for x in files:
- fullpath = os.path.join(path, x);
- if os.path.isdir(fullpath) and not os.path.islink(fullpath):
- result.extend(find(fullpath, patt))
- elif fnmatch.fnmatch(x, patt):
- result.append(fullpath)
- return result
-
-
-#
-# Replace a string matched by the first group of regular expression.
-#
-# For example: the regular expression "ICE_STRING_VERSION \"([0-9]*\.[0-9]*\.[0-9]*)\""
-# will match the string version in "ICE_STRING_VERSION "2.1.0"" and will replace it with
-# the given version.
-#
-def fileMatchAndReplace(filename, matchAndReplaceExps, warn=True):
-
- mode = os.stat(filename).st_mode
- oldConfigFile = open(filename, "r")
- newConfigFile = open(filename + ".new", "w")
-
- #
- # Compile the regular expressions
- #
- regexps = [ ]
- for (regexp, replace) in matchAndReplaceExps:
- regexps.append((re.compile(regexp), replace))
-
- #
- # Search for the line with the given regular expressions and
- # replace the matching string
- #
- updated = False
- for line in oldConfigFile.readlines():
- for (regexp, replace) in regexps:
- match = regexp.search(line)
- if match != None:
- oldLine = line
- line = oldLine.replace(match.group(1), replace)
-# print oldLine + line
- updated = True
- break
- newConfigFile.write(line)
-
- newConfigFile.close()
- oldConfigFile.close()
-
- if updated:
- print "updated " + filename
- os.rename(filename + ".new", filename)
- os.chmod(filename, S_IMODE(mode))
- elif warn:
- print "warning: " + filename + " didn't contain any version"
- os.unlink(filename + ".new")
-
-#
-# Replace all occurences of a regular expression in a file
-#
-def fileMatchAllAndReplace(filename, matchAndReplaceExps):
-
- oldFile = open(filename, "r")
- newFile = open(filename + ".new", "w")
-
- #
- # Compile the regular expressions
- #
- regexps = [ ]
- for (regexp, replace) in matchAndReplaceExps:
- regexps.append((re.compile(regexp), replace))
-
- #
- # Search for all lines with the given regular expressions and
- # replace the matching string
- #
- updated = False
- for line in oldFile.readlines():
- for (regexp, replace) in regexps:
- match = regexp.search(line)
- if match != None:
- oldLine = line
- line = oldLine.replace(match.group(1), replace)
- updated = True
- newFile.write(line)
-
- newFile.close()
- oldFile.close()
-
- if updated:
- print "updated " + filename
- os.rename(filename + ".new", filename)
- else:
- print "warning: " + filename + " didn't contain any version"
- os.unlink(filename + ".new")
-
-def checkVersion(version):
- if not re.match(vpatCheck, version):
- print "invalid version number: " + version + " (it should have the form 3.2.1 or 3.2b or 3.2b2)"
- sys.exit(0)
diff --git a/config/Make.common.rules b/config/Make.common.rules
index 531d6e8f4b6..d64d80bcb39 100644
--- a/config/Make.common.rules
+++ b/config/Make.common.rules
@@ -119,6 +119,34 @@ $(warning Ignoring ICE_HOME environment variable to build current source tree.)
else
ice_cpp_dir = $(ice_dir)/cpp
endif
+
+ endif
+ ifeq ($(shell test -d $(top_srcdir)/ice/$(ice_language) && echo 0),0)
+ ice_dir = $(top_srcdir)/ice
+ ice_src_dist = 1
+
+ #
+ # When building a source distribution, if ICE_HOME is specified, it takes precedence over
+ # the source tree for building the language mappings. For example, this can be used to
+ # build the Python language mapping using the translators from the distribution specified
+ # by ICE_HOME.
+ #
+ ifneq ($(ICE_HOME),)
+ ifdef slice_translator
+ ifneq ($(shell test -f $(ICE_HOME)/$(binsubdir)/$(slice_translator) && echo 0), 0)
+$(error Unable to find $(slice_translator) in $(ICE_HOME)/$(binsubdir), please verify ICE_HOME is properly configured and Ice is correctly installed.)
+ endif
+ ifeq ($(shell test -f $(ice_dir)/cpp/bin/$(slice_translator) && echo 0), 0)
+$(warning Found $(slice_translator) in both ICE_HOME/bin and $(ice_dir)/cpp/bin, ICE_HOME/bin/$(slice_translator) will be used!)
+ endif
+ ice_cpp_dir = $(ICE_HOME)
+ else
+$(warning Ignoring ICE_HOME environment variable to build current source tree.)
+ ice_cpp_dir = $(ice_dir)/cpp
+ endif
+ else
+ ice_cpp_dir = $(ice_dir)/cpp
+ endif
endif
endif
diff --git a/distribution/bin/fixCopyright.py b/distribution/bin/fixCopyright.py
new file mode 100755
index 00000000000..fd3a8551e62
--- /dev/null
+++ b/distribution/bin/fixCopyright.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys
+sys.path.append(os.path.join(os.path.dirname(__file__), "..", "lib"))
+import FixUtil
+
+def usage():
+ print "Usage: " + sys.argv[0] + " [options]"
+ print
+ print "Options:"
+ print "-h Show this message."
+ print
+
+for x in sys.argv[1:]:
+ if x == "-h":
+ usage()
+ sys.exit(0)
+ elif x.startswith("-"):
+ print sys.argv[0] + ": unknown option `" + x + "'"
+ print
+ usage()
+ sys.exit(1)
+
+cpatMatch = "Copyright \\(c\\) 20[0-9][0-9]-(20[0-9][0-9]) ZeroC"
+copyright = "2009"
+for f in FixUtil.getTrackedFiles():
+ FixUtil.fileMatchAndReplace(f, [(cpatMatch, copyright)], False)
diff --git a/fixVersion.py b/distribution/bin/fixVersion.py
index ded90c8a4ba..6f53912df27 100755
--- a/fixVersion.py
+++ b/distribution/bin/fixVersion.py
@@ -1,6 +1,16 @@
#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
-import os, sys, getopt, FixUtil
+import os, sys, getopt
+sys.path.append(os.path.join(os.path.dirname(__file__), "..", "lib"))
+import FixUtil
def usage():
print "Usage: " + sys.argv[0] + " version"
@@ -27,7 +37,7 @@ if len(args) != 1:
sys.exit(1)
version = args[0]
-ice_dir = os.path.normpath(os.path.join(os.path.dirname(__file__)))
+ice_dir = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
FixUtil.checkVersion(version)
diff --git a/makevsplugindist.py b/distribution/bin/makevsplugindist.py
index e489e6a8f26..e489e6a8f26 100755
--- a/makevsplugindist.py
+++ b/distribution/bin/makevsplugindist.py
diff --git a/distribution/lib/FixUtil.py b/distribution/lib/FixUtil.py
new file mode 100755
index 00000000000..6071fcc9799
--- /dev/null
+++ b/distribution/lib/FixUtil.py
@@ -0,0 +1,213 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys, shutil, fnmatch, re, glob, getopt
+from stat import *
+
+def getTrackedFiles():
+ files = []
+ pipe = os.popen('git ls-files')
+ for line in pipe.readlines():
+ p = os.path.join('.', line.strip())
+ files.append(p)
+ return files
+
+def fnmatchlist(x, l):
+ for p in l:
+ if fnmatch.fnmatch(x, p):
+ return True
+ return False
+#
+# Version patterns
+#
+vpatCheck = "[0-9]+\.[0-9]+(\.[0-9]+|b[0-9]*)$"
+vpatParse = "([0-9]+)\.([0-9]+)(\.[0-9]+|b[0-9]*)"
+vpatMatch = "([0-9]+\.[0-9]+(\.[0-9]+|b[0-9]*))"
+
+def commaVersion(version):
+ major = majorVersion(version)
+ minor = minorVersion(version)
+ patch = patchVersion(version)
+ return ("%s,%s,%s" % (major, minor, patch))
+
+def intVersion(version):
+ r = re.search(vpatParse, version)
+ major = int(r.group(1))
+ minor = int(r.group(2))
+ gr3 = r.group(3)
+ patch = -1
+ if gr3.startswith("."):
+ patch = int(gr3[1:])
+ else:
+ if len(gr3) > 1:
+ patch = 50 + int(gr3[1:])
+ else:
+ patch = 51
+ return ("%2d%02d%02d" % (major, minor, patch)).strip()
+
+def betaVersion(version):
+ r = re.search(vpatParse, version)
+ if r.group(3).startswith("b"):
+ return "b"
+ else:
+ return ""
+
+def soVersion(version):
+ r = re.search(vpatParse, version)
+ major = int(r.group(1))
+ minor = int(r.group(2))
+ v = ("%d%d" % (major, minor)).strip()
+ if r.group(3).startswith("b"):
+ return v + "b"
+ else:
+ return v
+
+def majorVersion(version):
+ r = re.search(vpatParse, version)
+ major = int(r.group(1))
+ return ("%d" % (major)).strip()
+
+def minorVersion(version):
+ r = re.search(vpatParse, version)
+ minor = int(r.group(2))
+ return ("%d" % (minor)).strip()
+
+def shortVersion(version):
+ r = re.search(vpatParse, version)
+ major = int(r.group(1))
+ minor = int(r.group(2))
+ return ("%d.%d" % (major, minor)).strip()
+
+def patchVersion(version):
+ r = re.search(vpatParse, version)
+
+ gr3 = r.group(3)
+ patch = -1
+ if gr3.startswith("."):
+ patch = int(gr3[1:])
+ else:
+ if len(gr3) > 1:
+ patch = 50 + int(gr3[1:])
+ else:
+ patch = 51
+
+ return ("%d" % (patch)).strip()
+
+#
+# Find files matching a pattern.
+#
+def find(patt):
+ if type(patt) != type([]):
+ patt = [patt]
+ result = [ ]
+ for fullpath in getTrackedFiles():
+ x = os.path.basename(fullpath)
+ if os.path.isdir(fullpath):
+ continue;
+ for p in patt:
+ if fnmatch.fnmatch(x, p):
+ result.append(fullpath)
+ break
+ return result
+
+#
+# Replace a string matched by the first group of regular expression.
+#
+# For example: the regular expression "ICE_STRING_VERSION \"([0-9]*\.[0-9]*\.[0-9]*)\""
+# will match the string version in "ICE_STRING_VERSION "2.1.0"" and will replace it with
+# the given version.
+#
+def fileMatchAndReplace(filename, matchAndReplaceExps, warn=True):
+
+ if os.path.isdir(filename):
+ return
+
+ mode = os.stat(filename).st_mode
+ oldConfigFile = open(filename, "r")
+ newConfigFile = open(filename + ".new", "w")
+
+ #
+ # Compile the regular expressions
+ #
+ regexps = [ ]
+ for (regexp, replace) in matchAndReplaceExps:
+ regexps.append((re.compile(regexp), replace))
+
+ #
+ # Search for the line with the given regular expressions and
+ # replace the matching string
+ #
+ updated = False
+ for line in oldConfigFile.readlines():
+ for (regexp, replace) in regexps:
+ match = regexp.search(line)
+ if match != None:
+ oldLine = line
+ line = oldLine.replace(match.group(1), replace)
+# print oldLine + line
+ updated = True
+ break
+ newConfigFile.write(line)
+
+ newConfigFile.close()
+ oldConfigFile.close()
+
+ if updated:
+ print "updated " + filename
+ os.rename(filename + ".new", filename)
+ os.chmod(filename, S_IMODE(mode))
+ else:
+ if warn:
+ print "warning: " + filename + " didn't contain any version"
+ os.unlink(filename + ".new")
+
+#
+# Replace all occurences of a regular expression in a file
+#
+def fileMatchAllAndReplace(filename, matchAndReplaceExps):
+
+ oldFile = open(filename, "r")
+ newFile = open(filename + ".new", "w")
+
+ #
+ # Compile the regular expressions
+ #
+ regexps = [ ]
+ for (regexp, replace) in matchAndReplaceExps:
+ regexps.append((re.compile(regexp), replace))
+
+ #
+ # Search for all lines with the given regular expressions and
+ # replace the matching string
+ #
+ updated = False
+ for line in oldFile.readlines():
+ for (regexp, replace) in regexps:
+ match = regexp.search(line)
+ if match != None:
+ oldLine = line
+ line = oldLine.replace(match.group(1), replace)
+ updated = True
+ newFile.write(line)
+
+ newFile.close()
+ oldFile.close()
+
+ if updated:
+ print "updated " + filename
+ os.rename(filename + ".new", filename)
+ else:
+ print "warning: " + filename + " didn't contain any version"
+ os.unlink(filename + ".new")
+
+def checkVersion(version):
+ if not re.match(vpatCheck, version):
+ print "invalid version number: " + version + " (it should have the form 3.2.1 or 3.2b or 3.2b2)"
+ sys.exit(0)
diff --git a/makedist.py b/distribution/makedist.py
index 654d07e4664..654d07e4664 100755
--- a/makedist.py
+++ b/distribution/makedist.py
diff --git a/distribution/src/windows/vsplugin/LICENSE.txt b/distribution/src/windows/vsplugin/LICENSE.txt
index 9328656d54f..2c0bba940da 100644
--- a/distribution/src/windows/vsplugin/LICENSE.txt
+++ b/distribution/src/windows/vsplugin/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
This copy of Ice Visual Studio Extension is free software; you can
redistribute it and/or modify it under the terms of the GNU General
diff --git a/fixCopyright.py b/fixCopyright.py
deleted file mode 100755
index 268e2615df8..00000000000
--- a/fixCopyright.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-
-import os, sys, FixUtil
-
-def usage():
- print "Usage: " + sys.argv[0] + " [options]"
- print
- print "Options:"
- print "-h Show this message."
- print
-
-for x in sys.argv[1:]:
- if x == "-h":
- usage()
- sys.exit(0)
- elif x.startswith("-"):
- print sys.argv[0] + ": unknown option `" + x + "'"
- print
- usage()
- sys.exit(1)
-
-ice_dir = os.path.normpath(os.path.join(os.path.dirname(__file__)))
-
-FixUtil.replaceAllCopyrights(ice_dir, "Ice", "ICE_LICENSE", False)
-for dir in ["slice", "cpp", "java", "cs", "vb", "php", "py", "rb", "demoscript", "distribution", "config", "certs",\
- "scripts"]:
- home = os.path.join(ice_dir, dir)
- if home:
- FixUtil.replaceAllCopyrights(home, "Ice", "ICE_LICENSE", True)
-
-# **********************************************************************
-#
-# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-cpatMatch = "20[0-9][0-9]-(20[0-9][0-9]) ZeroC"
-copyright = "2009"
-
-files = FixUtil.find(ice_dir, "*.rc")
-files += FixUtil.find(ice_dir, "*LICENSE")
-files += FixUtil.find(os.path.join(ice_dir, "cpp", "src"), "Gen.cpp")
-files += FixUtil.find(os.path.join(ice_dir, "cpp", "src"), "Parser.cpp")
-files += FixUtil.find(os.path.join(ice_dir, "cpp", "src", "Slice"), "*Util.cpp")
-files += [os.path.join(ice_dir, "cpp", "src", "ca", "iceca")]
-files += [os.path.join(ice_dir, "cpp", "doc", "symboltree.js")]
-files += [os.path.join(ice_dir, "cpp", "demo", "Freeze", "backup", "backup")]
-files += FixUtil.find(os.path.join(ice_dir, "cpp"), "*.bat")
-files += [os.path.join(ice_dir, "cpp", "test", "IceSSL", "certs", "makecerts")]
-files += [os.path.join(ice_dir, "java", "bin", "icegridgui.rpm")]
-files += [os.path.join(ice_dir, "java", "src", "IceGridGUI", "Coordinator.java")]
-files += FixUtil.find(os.path.join(ice_dir, "java", "resources", "IceGridAdmin"), "icegridadmin_content_*.html")
-files += [os.path.join(ice_dir, "config", "makeprops.py")]
-files += FixUtil.find(os.path.join(ice_dir), "AssemblyInfo.cs")
-files += FixUtil.find(os.path.join(ice_dir, "distribution", "src", "rpm"), "*")
-files += FixUtil.find(os.path.join(ice_dir, "php"), "*.php")
-files += [os.path.join(ice_dir, "cpp", "test", "Slice", "errorDetection", "IllegalIdentifier.ice")]
-files += [os.path.join(ice_dir, "distribution", "src", "rpm", "mcpp-devel.spec")]
-
-for f in files:
- FixUtil.fileMatchAndReplace(f, [(cpatMatch, copyright)])
diff --git a/java/config/common.xml b/java/config/common.xml
index 223d7007ef7..88776ad1cb6 100644
--- a/java/config/common.xml
+++ b/java/config/common.xml
@@ -82,6 +82,15 @@
<not><isset property="ice.bin.dist"/></not>
</and>
</condition>
+ <condition property="ice.dir" value="${ice.top.dir}/ice">
+ <and>
+ <!-- Don't just look for ${ice.top.dir}/../java - we want to make sure we are really
+ in a source distribution. -->
+ <not><isset property="ice.dir"/></not>
+ <available file="${ice.top.dir}/ice/java/src/Ice/Util.java"/>
+ <not><isset property="ice.bin.dist"/></not>
+ </and>
+ </condition>
<!-- When building a source distribution, we allow using either the
translators from a binary distribution or the local translators, -->
<condition property="ice.cpp.dir" value="${ice.home}">
diff --git a/vsplugin/LICENSE.txt b/vsplugin/LICENSE.txt
index 9328656d54f..2c0bba940da 100644
--- a/vsplugin/LICENSE.txt
+++ b/vsplugin/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
This copy of Ice Visual Studio Extension is free software; you can
redistribute it and/or modify it under the terms of the GNU General
diff --git a/vsplugin/Makefile.mak b/vsplugin/Makefile.mak
index 7d48904c41a..16a5cde69b9 100644
--- a/vsplugin/Makefile.mak
+++ b/vsplugin/Makefile.mak
@@ -1,6 +1,6 @@
# **********************************************************************
#
-# Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# LICENSE file included in this distribution.
diff --git a/vsplugin/config/Make.rules.mak b/vsplugin/config/Make.rules.mak
index 83839b65980..d7f8ffc6a6f 100644
--- a/vsplugin/config/Make.rules.mak
+++ b/vsplugin/config/Make.rules.mak
@@ -1,6 +1,6 @@
# **********************************************************************
#
-# Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# LICENSE file included in this distribution.
diff --git a/vsplugin/src/AssemblyInfo.cs b/vsplugin/src/AssemblyInfo.cs
index bad697a86b5..d5f32e346ed 100644
--- a/vsplugin/src/AssemblyInfo.cs
+++ b/vsplugin/src/AssemblyInfo.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
@@ -18,7 +18,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany("ZeroC, Inc.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("Ice Extension for Visual Studio")]
-[assembly: AssemblyCopyright("Copyright (c) 2009 ZeroC, Inc.")]
+[assembly: AssemblyCopyright("Copyright (c) 2003-2009 ZeroC, Inc.")]
[assembly: AssemblyTrademark("Ice")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.0")]
diff --git a/vsplugin/src/Builder.cs b/vsplugin/src/Builder.cs
index 05fc5dd4b2a..17c4e976cde 100644
--- a/vsplugin/src/Builder.cs
+++ b/vsplugin/src/Builder.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/Connect.cs b/vsplugin/src/Connect.cs
index 7ec4e1f8c3d..0eefe8ef30f 100644
--- a/vsplugin/src/Connect.cs
+++ b/vsplugin/src/Connect.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/FileTracker.cs b/vsplugin/src/FileTracker.cs
index f2a1693174a..05f19242057 100644
--- a/vsplugin/src/FileTracker.cs
+++ b/vsplugin/src/FileTracker.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/IceCppConfigurationDialog.Designer.cs b/vsplugin/src/IceCppConfigurationDialog.Designer.cs
index ec7889c1ebf..ecb142823fc 100644
--- a/vsplugin/src/IceCppConfigurationDialog.Designer.cs
+++ b/vsplugin/src/IceCppConfigurationDialog.Designer.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/IceCppConfigurationDialog.cs b/vsplugin/src/IceCppConfigurationDialog.cs
index 65db2e55a39..7fe6be9aecd 100644
--- a/vsplugin/src/IceCppConfigurationDialog.cs
+++ b/vsplugin/src/IceCppConfigurationDialog.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/IceCsharpConfigurationDialog.Designer.cs b/vsplugin/src/IceCsharpConfigurationDialog.Designer.cs
index c3cb28f4e2d..f37e49c795a 100644
--- a/vsplugin/src/IceCsharpConfigurationDialog.Designer.cs
+++ b/vsplugin/src/IceCsharpConfigurationDialog.Designer.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/IceCsharpConfigurationDialog.cs b/vsplugin/src/IceCsharpConfigurationDialog.cs
index 1e27363081b..b4f44a67b58 100644
--- a/vsplugin/src/IceCsharpConfigurationDialog.cs
+++ b/vsplugin/src/IceCsharpConfigurationDialog.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs b/vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs
index 5bfd3c38572..373a717bd83 100644
--- a/vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs
+++ b/vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/IceSilverlightConfigurationDialog.cs b/vsplugin/src/IceSilverlightConfigurationDialog.cs
index b3f3062777e..571a137a902 100644
--- a/vsplugin/src/IceSilverlightConfigurationDialog.cs
+++ b/vsplugin/src/IceSilverlightConfigurationDialog.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.
diff --git a/vsplugin/src/Makefile.mak b/vsplugin/src/Makefile.mak
index 9407eaaf1a8..a461c96a0c7 100644
--- a/vsplugin/src/Makefile.mak
+++ b/vsplugin/src/Makefile.mak
@@ -1,6 +1,6 @@
# **********************************************************************
#
-# Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice for Silverlight is licensed to you under the terms
# described in the LICENSE file included in this distribution.
diff --git a/vsplugin/src/Util.cs b/vsplugin/src/Util.cs
index 610015619f6..a7cdf261620 100644
--- a/vsplugin/src/Util.cs
+++ b/vsplugin/src/Util.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2009 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// LICENSE file included in this distribution.