mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
support _d.dll in debug build
This commit is contained in:
parent
1415193b5e
commit
e74c4a0c8f
@ -2337,6 +2337,23 @@ class Packager:
|
|||||||
if not thisFiles:
|
if not thisFiles:
|
||||||
thisFiles = [filename.toOsSpecific()]
|
thisFiles = [filename.toOsSpecific()]
|
||||||
|
|
||||||
|
if newExt == 'dll' or (ext == 'dll' and newExt is None):
|
||||||
|
# Go through the dsoFilename interface on Windows,
|
||||||
|
# to insert a _d if we are running on a debug
|
||||||
|
# build.
|
||||||
|
dllFilename = Filename(filename)
|
||||||
|
dllFilename.setExtension('so')
|
||||||
|
dllFilename = Filename.dsoFilename(dllFilename.cStr())
|
||||||
|
if dllFilename != filename:
|
||||||
|
thisFiles = glob.glob(filename.toOsSpecific())
|
||||||
|
if not thisFiles:
|
||||||
|
# We have to resolve this filename to
|
||||||
|
# determine if it's a _d or not.
|
||||||
|
if dllFilename.resolveFilename(self.executablePath):
|
||||||
|
thisFiles = [dllFilename.toOsSpecific()]
|
||||||
|
else:
|
||||||
|
thisFiles = [filename.toOsSpecific()]
|
||||||
|
|
||||||
if len(thisFiles) > 1:
|
if len(thisFiles) > 1:
|
||||||
explicit = False
|
explicit = False
|
||||||
files += thisFiles
|
files += thisFiles
|
||||||
|
@ -1351,7 +1351,11 @@ p3dpython_thread_run() {
|
|||||||
// Now load the library.
|
// Now load the library.
|
||||||
string libp3dpython = _python_root_dir + "/libp3dpython";
|
string libp3dpython = _python_root_dir + "/libp3dpython";
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#ifdef _DEBUG
|
||||||
|
libp3dpython += "_d.dll";
|
||||||
|
#else
|
||||||
libp3dpython += ".dll";
|
libp3dpython += ".dll";
|
||||||
|
#endif
|
||||||
SetErrorMode(0);
|
SetErrorMode(0);
|
||||||
HMODULE module = LoadLibrary(libp3dpython.c_str());
|
HMODULE module = LoadLibrary(libp3dpython.c_str());
|
||||||
if (module == NULL) {
|
if (module == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user