mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Fix various link issues on Windows when building rtdist
This commit is contained in:
parent
1d9aff0c48
commit
62217c652e
@ -21,8 +21,10 @@
|
|||||||
|
|
||||||
#include "py_panda.h"
|
#include "py_panda.h"
|
||||||
|
|
||||||
// This has been compiled-in by the build system, if all is well.
|
extern "C" {
|
||||||
extern struct _frozen _PyImport_FrozenModules[];
|
// This has been compiled-in by the build system, if all is well.
|
||||||
|
extern struct _frozen _PyImport_FrozenModules[];
|
||||||
|
};
|
||||||
|
|
||||||
// There is only one P3DPythonRun object in any given process space.
|
// There is only one P3DPythonRun object in any given process space.
|
||||||
// Makes the statics easier to deal with, and we don't need multiple
|
// Makes the statics easier to deal with, and we don't need multiple
|
||||||
|
@ -14,6 +14,7 @@ import panda3d._core as core
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import io
|
import io
|
||||||
|
import encodings
|
||||||
|
|
||||||
_vfs = core.VirtualFileSystem.getGlobalPtr()
|
_vfs = core.VirtualFileSystem.getGlobalPtr()
|
||||||
|
|
||||||
|
@ -5061,6 +5061,7 @@ if (RTDIST or RUNTIME):
|
|||||||
TargetAdd('p3dpython.exe', opts=['PYTHON', 'WINUSER'])
|
TargetAdd('p3dpython.exe', opts=['PYTHON', 'WINUSER'])
|
||||||
|
|
||||||
TargetAdd('libp3dpython.dll', input='p3dpython_p3dpython_composite1.obj')
|
TargetAdd('libp3dpython.dll', input='p3dpython_p3dpython_composite1.obj')
|
||||||
|
TargetAdd('libp3dpython.dll', input='p3dpython_frozen.obj')
|
||||||
TargetAdd('libp3dpython.dll', input=COMMON_PANDA_LIBS)
|
TargetAdd('libp3dpython.dll', input=COMMON_PANDA_LIBS)
|
||||||
TargetAdd('libp3dpython.dll', input='libp3tinyxml.ilb')
|
TargetAdd('libp3dpython.dll', input='libp3tinyxml.ilb')
|
||||||
TargetAdd('libp3dpython.dll', input='libp3interrogatedb.dll')
|
TargetAdd('libp3dpython.dll', input='libp3interrogatedb.dll')
|
||||||
@ -5073,6 +5074,7 @@ if (RTDIST or RUNTIME):
|
|||||||
TargetAdd('p3dpythonw_p3dPythonMain.obj', opts=OPTS, input='p3dPythonMain.cxx')
|
TargetAdd('p3dpythonw_p3dPythonMain.obj', opts=OPTS, input='p3dPythonMain.cxx')
|
||||||
TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dpython_composite1.obj')
|
TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dpython_composite1.obj')
|
||||||
TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dPythonMain.obj')
|
TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dPythonMain.obj')
|
||||||
|
TargetAdd('p3dpythonw.exe', input='p3dpython_frozen.obj')
|
||||||
TargetAdd('p3dpythonw.exe', input=COMMON_PANDA_LIBS)
|
TargetAdd('p3dpythonw.exe', input=COMMON_PANDA_LIBS)
|
||||||
TargetAdd('p3dpythonw.exe', input='libp3tinyxml.ilb')
|
TargetAdd('p3dpythonw.exe', input='libp3tinyxml.ilb')
|
||||||
TargetAdd('p3dpythonw.exe', input='libp3interrogatedb.dll')
|
TargetAdd('p3dpythonw.exe', input='libp3interrogatedb.dll')
|
||||||
|
@ -63,7 +63,7 @@ get_data_size() {
|
|||||||
INLINE string StringStream::
|
INLINE string StringStream::
|
||||||
get_data() {
|
get_data() {
|
||||||
flush();
|
flush();
|
||||||
const pvector<unsigned char> &data = _buf.get_data();
|
const vector_uchar &data = _buf.get_data();
|
||||||
if (!data.empty()) {
|
if (!data.empty()) {
|
||||||
return string((char *)&data[0], data.size());
|
return string((char *)&data[0], data.size());
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ set_data(const string &data) {
|
|||||||
// internal buffer.
|
// internal buffer.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void StringStream::
|
INLINE void StringStream::
|
||||||
swap_data(pvector<unsigned char> &data) {
|
swap_data(vector_uchar &data) {
|
||||||
flush();
|
flush();
|
||||||
_buf.swap_data(data);
|
_buf.swap_data(data);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
void StringStream::
|
void StringStream::
|
||||||
set_data(const unsigned char *data, size_t size) {
|
set_data(const unsigned char *data, size_t size) {
|
||||||
_buf.clear();
|
_buf.clear();
|
||||||
pvector<unsigned char> pv;
|
vector_uchar pv;
|
||||||
pv.insert(pv.end(), data, data + size);
|
pv.insert(pv.end(), data, data + size);
|
||||||
_buf.swap_data(pv);
|
_buf.swap_data(pv);
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "pandabase.h"
|
#include "pandabase.h"
|
||||||
#include "stringStreamBuf.h"
|
#include "stringStreamBuf.h"
|
||||||
|
#include "vector_uchar.h"
|
||||||
#include "extension.h"
|
#include "extension.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -49,7 +50,7 @@ public:
|
|||||||
void set_data(const unsigned char *data, size_t size);
|
void set_data(const unsigned char *data, size_t size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
INLINE void swap_data(pvector<unsigned char> &data);
|
INLINE void swap_data(vector_uchar &data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StringStreamBuf _buf;
|
StringStreamBuf _buf;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
// or the iostream buffer.
|
// or the iostream buffer.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void StringStreamBuf::
|
INLINE void StringStreamBuf::
|
||||||
swap_data(pvector<unsigned char> &data) {
|
swap_data(vector_uchar &data) {
|
||||||
_data.swap(data);
|
_data.swap(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ swap_data(pvector<unsigned char> &data) {
|
|||||||
// Description: Returns a reference to the contents of the internal
|
// Description: Returns a reference to the contents of the internal
|
||||||
// buffer, without any of the iostream buffer.
|
// buffer, without any of the iostream buffer.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE const pvector<unsigned char> &StringStreamBuf::
|
INLINE const vector_uchar &StringStreamBuf::
|
||||||
get_data() const {
|
get_data() const {
|
||||||
return _data;
|
return _data;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#define STRINGSTREAMBUF_H
|
#define STRINGSTREAMBUF_H
|
||||||
|
|
||||||
#include "pandabase.h"
|
#include "pandabase.h"
|
||||||
#include "pvector.h"
|
#include "vector_uchar.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : StringStreamBuf
|
// Class : StringStreamBuf
|
||||||
@ -32,8 +32,8 @@ public:
|
|||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
INLINE void swap_data(pvector<unsigned char> &data);
|
INLINE void swap_data(vector_uchar &data);
|
||||||
INLINE const pvector<unsigned char> &get_data() const;
|
INLINE const vector_uchar &get_data() const;
|
||||||
|
|
||||||
size_t read_chars(char *start, size_t length);
|
size_t read_chars(char *start, size_t length);
|
||||||
void write_chars(const char *start, size_t length);
|
void write_chars(const char *start, size_t length);
|
||||||
@ -47,7 +47,7 @@ protected:
|
|||||||
virtual int underflow();
|
virtual int underflow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
pvector<unsigned char> _data;
|
vector_uchar _data;
|
||||||
char *_buffer;
|
char *_buffer;
|
||||||
size_t _ppos;
|
size_t _ppos;
|
||||||
size_t _gpos;
|
size_t _gpos;
|
||||||
|
@ -34,7 +34,7 @@ __init__(PyObject *source) {
|
|||||||
PyObject *Extension<StringStream>::
|
PyObject *Extension<StringStream>::
|
||||||
get_data() {
|
get_data() {
|
||||||
_this->flush();
|
_this->flush();
|
||||||
const pvector<unsigned char> &data = _this->_buf.get_data();
|
const vector_uchar &data = _this->_buf.get_data();
|
||||||
if (!data.empty()) {
|
if (!data.empty()) {
|
||||||
#if PY_MAJOR_VERSION >= 3
|
#if PY_MAJOR_VERSION >= 3
|
||||||
return PyBytes_FromStringAndSize((char *)&data[0], data.size());
|
return PyBytes_FromStringAndSize((char *)&data[0], data.size());
|
||||||
|
@ -35,7 +35,6 @@ public:
|
|||||||
BLOCKING PyObject *extract_bytes(size_t size);
|
BLOCKING PyObject *extract_bytes(size_t size);
|
||||||
BLOCKING PyObject *readline();
|
BLOCKING PyObject *readline();
|
||||||
BLOCKING PyObject *readlines();
|
BLOCKING PyObject *readlines();
|
||||||
BLOCKING PyObject *get_data() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HAVE_PYTHON
|
#endif // HAVE_PYTHON
|
||||||
|
Loading…
x
Reference in New Issue
Block a user