From 906033ed79c39b955322efb856b3fa9e299b9709 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 16 Nov 2009 13:09:35 +0000 Subject: [PATCH] Library is now version numbered on UNIX (e.g. libp3dtool.so.1.7.0) --- makepanda/makepanda.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index fb6aabe64c..91e48f881c 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -865,6 +865,12 @@ def CompileLink(dll, obj, opts): if (GetOrigExt(dll)==".exe" and GetOptimizeOption(opts)==4 and "NOSTRIP" not in opts): oscmd("strip " + BracketNameWithQuotes(dll)) os.system("chmod +x " + BracketNameWithQuotes(dll)) + + if dll.endswith("." + VERSION): + newdll = dll[:-len(VERSION)-1] + if (os.path.isfile(newdll)): + os.remove(newdll) + oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll)) ########################################################################################## # @@ -1068,6 +1074,9 @@ def CompileAnything(target, inputs, opts, progress = None): ProgressOutput(progress, "Linking executable", target) else: ProgressOutput(progress, "Linking dynamic library", target) + if (origsuffix==".dll" and not sys.platform.startswith("win")): + target = target + "." + VERSION + SetOrigExt(target, origsuffix) return CompileLink(target, inputs, opts) elif (origsuffix==".in"): ProgressOutput(progress, "Building Interrogate database", target)