diff options
Diffstat (limited to 'distribution/lib/DistUtils.py')
-rw-r--r-- | distribution/lib/DistUtils.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/distribution/lib/DistUtils.py b/distribution/lib/DistUtils.py index f666d45e835..fcf961a1611 100644 --- a/distribution/lib/DistUtils.py +++ b/distribution/lib/DistUtils.py @@ -320,7 +320,7 @@ def fixMakeRules(file): # # Fix version in given file. # -def fixVersion(file, version, mmversion = None, libversion = None, debversion = None, debmmversion = None, majorVersion = None, minorVersion = None): +def fixVersion(file, version, mmversion = None, libversion = None, debversion = None, debmmversion = None, majorVersion = None, minorVersion = None, jsonVersion = None): origfile = file + ".orig" os.rename(file, origfile) @@ -340,6 +340,8 @@ def fixVersion(file, version, mmversion = None, libversion = None, debversion = line = re.sub("@majorver@", majorVersion, line) if minorVersion: line = re.sub("@minorver@", minorVersion, line) + if jsonVersion: + line = re.sub("@jsonver@", jsonVersion, line) newFile.write(line) newFile.close() oldFile.close() @@ -801,7 +803,7 @@ class Platform: def getJavaEnv(self): return "CLASSPATH=" + string.join([t.getJar() for t in self.thirdParties if t.getJar()], os.pathsep) - + def getJavaBuildOptions(self): return "" @@ -913,7 +915,7 @@ class Darwin(Platform): for name in ["freeze", "glacier2", "ice", "icebox", "icediscovery", "icegrid", "icepatch2", "icestorm", "ice-gradle-plugin", "ant-ice"]: runCommand("cd %s/lib && rm -f %s.jar" % (iceRootDir, name)) runCommand("cd %s/lib && ln -s %s-%s.jar %s.jar" % (iceRootDir, name, "@ver@", name)) - + for name in ["freeze", "glacier2", "ice", "icebox", "icediscovery", "icegrid", "icepatch2", "icestorm"]: runCommand("cd %s/lib && rm -f %s.jar" % (iceRootDir, name)) runCommand("cd %s/lib && ln -s %s-%s-source.jar %s-source.jar" % (iceRootDir, name, "@ver@", name)) @@ -922,32 +924,32 @@ class Darwin(Platform): packageRoot = os.path.join(buildRootDir, "Ice-@ver@") packageInstallLocation = "/Library/Developer/Ice-@ver@" - runCommand("pkgbuild --root %s --identifier=%s --install-location=%s --version @ver@ %s/%s.pkg" % + runCommand("pkgbuild --root %s --identifier=%s --install-location=%s --version @ver@ %s/%s.pkg" % (packageRoot, package, packageInstallLocation, packagesDir, package)) package = "com.zeroc.icepython" packageRoot = os.path.join(buildRootDir, "python") packageInstallLocation = "/Library/Python/2.7/site-packages" - runCommand("pkgbuild --root %s --identifier=%s --install-location=%s --version @ver@ %s/%s.pkg" % + runCommand("pkgbuild --root %s --identifier=%s --install-location=%s --version @ver@ %s/%s.pkg" % (packageRoot, package, packageInstallLocation, packagesDir, package)) package = "com.zeroc.icegridadmin" packageRoot = os.path.join(buildRootDir, "IceGrid Admin.app") packageInstallLocation = "/Applications/IceGrid Admin.app" - runCommand("pkgbuild --root \"%s\" --identifier=%s --install-location=\"%s\" --version @ver@ %s/%s.pkg" % + runCommand("pkgbuild --root \"%s\" --identifier=%s --install-location=\"%s\" --version @ver@ %s/%s.pkg" % (packageRoot, package, packageInstallLocation, packagesDir, package)) distribution = os.path.join(distDir, "src", "mac", "Ice", "distribution.xml") resources = os.path.join(distDir, "src", "mac", "Ice", "resources") scripts = os.path.join(distDir, "src", "mac", "Ice", "scripts") - - runCommand("productbuild --distribution=%s --resources=%s --scripts=%s --package-path=%s %s/Ice-@ver@.pkg" % + + runCommand("productbuild --distribution=%s --resources=%s --scripts=%s --package-path=%s %s/Ice-@ver@.pkg" % (distribution, resources, scripts, packagesDir, installerDir)) - + copy(os.path.join(distDir, "src", "mac", "Ice", "README.txt"), installerDir) copy(os.path.join(distDir, "src", "mac", "Ice", "uninstall.sh"), installerDir) |