mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
More ABI compatibility stuff
This commit is contained in:
parent
d9345815b9
commit
aed8f189ae
@ -45,6 +45,7 @@ RTDIST_VERSION="dev"
|
|||||||
RUNTIME=0
|
RUNTIME=0
|
||||||
DISTRIBUTOR=""
|
DISTRIBUTOR=""
|
||||||
VERSION=None
|
VERSION=None
|
||||||
|
MAJOR_VERSION=None
|
||||||
OSXTARGET=None
|
OSXTARGET=None
|
||||||
|
|
||||||
if "MACOSX_DEPLOYMENT_TARGET" in os.environ:
|
if "MACOSX_DEPLOYMENT_TARGET" in os.environ:
|
||||||
@ -203,6 +204,8 @@ if (VERSION == None):
|
|||||||
else:
|
else:
|
||||||
VERSION = ParsePandaVersion("dtool/PandaVersion.pp")
|
VERSION = ParsePandaVersion("dtool/PandaVersion.pp")
|
||||||
|
|
||||||
|
MAJOR_VERSION = VERSION[:3]
|
||||||
|
|
||||||
if (RUNTIME or RTDIST):
|
if (RUNTIME or RTDIST):
|
||||||
PkgDisable("PANDATOOL")
|
PkgDisable("PANDATOOL")
|
||||||
|
|
||||||
@ -928,13 +931,13 @@ def CompileLink(dll, obj, opts):
|
|||||||
oscmd("strip " + BracketNameWithQuotes(dll))
|
oscmd("strip " + BracketNameWithQuotes(dll))
|
||||||
os.system("chmod +x " + BracketNameWithQuotes(dll))
|
os.system("chmod +x " + BracketNameWithQuotes(dll))
|
||||||
|
|
||||||
if dll.endswith("." + VERSION + ".dylib"):
|
if dll.endswith("." + MAJOR_VERSION + ".dylib"):
|
||||||
newdll = dll[:-6-len(VERSION)] + "dylib"
|
newdll = dll[:-6-len(MAJOR_VERSION)] + "dylib"
|
||||||
if (os.path.isfile(newdll)):
|
if (os.path.isfile(newdll)):
|
||||||
os.remove(newdll)
|
os.remove(newdll)
|
||||||
oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll))
|
oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll))
|
||||||
elif dll.endswith("." + VERSION):
|
elif dll.endswith("." + MAJOR_VERSION):
|
||||||
newdll = dll[:-len(VERSION)-1]
|
newdll = dll[:-len(MAJOR_VERSION)-1]
|
||||||
if (os.path.isfile(newdll)):
|
if (os.path.isfile(newdll)):
|
||||||
os.remove(newdll)
|
os.remove(newdll)
|
||||||
oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll))
|
oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll))
|
||||||
@ -1155,10 +1158,10 @@ def CompileAnything(target, inputs, opts, progress = None):
|
|||||||
if (origsuffix==".dll" and "MODULE" not in opts and not sys.platform.startswith("win") and not RTDIST):
|
if (origsuffix==".dll" and "MODULE" not in opts and not sys.platform.startswith("win") and not RTDIST):
|
||||||
if (sys.platform == "darwin"):
|
if (sys.platform == "darwin"):
|
||||||
if (target.lower().endswith(".dylib")):
|
if (target.lower().endswith(".dylib")):
|
||||||
target = target[:-5] + VERSION + ".dylib"
|
target = target[:-5] + MAJOR_VERSION + ".dylib"
|
||||||
SetOrigExt(target, origsuffix)
|
SetOrigExt(target, origsuffix)
|
||||||
else:
|
else:
|
||||||
target = target + "." + VERSION
|
target = target + "." + MAJOR_VERSION
|
||||||
SetOrigExt(target, origsuffix)
|
SetOrigExt(target, origsuffix)
|
||||||
return CompileLink(target, inputs, opts)
|
return CompileLink(target, inputs, opts)
|
||||||
elif (origsuffix==".in"):
|
elif (origsuffix==".in"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user