mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Fix various Windows build issues
This commit is contained in:
parent
f624cdcac0
commit
477aa4bdfe
@ -2263,7 +2263,7 @@ class Packager:
|
||||
self.executablePath.appendDirectory('/usr/lib')
|
||||
self.executablePath.appendDirectory('/usr/local/lib')
|
||||
|
||||
if os.uname()[1] == "pcbsd":
|
||||
if self.platform.startswith('freebsd') and os.uname()[1] == "pcbsd":
|
||||
self.executablePath.appendDirectory('/usr/PCBSD/local/lib')
|
||||
|
||||
# Set this flag true to automatically add allow_python_dev to
|
||||
|
@ -2865,7 +2865,12 @@ define_array_type(InterrogateType &itype, CPPArrayType *cpptype) {
|
||||
itype._flags |= InterrogateType::F_array;
|
||||
itype._wrapped_type = get_type(cpptype->_element_type, false);
|
||||
|
||||
itype._array_size = cpptype->_bounds->evaluate().as_integer();
|
||||
if (cpptype->_bounds == NULL) {
|
||||
// This indicates an unsized array.
|
||||
itype._array_size = -1;
|
||||
} else {
|
||||
itype._array_size = cpptype->_bounds->evaluate().as_integer();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -19,6 +19,6 @@
|
||||
|
||||
NotifyCategoryDef(prc, "");
|
||||
|
||||
ConfigVariableBool assert_abort
|
||||
ALIGN_16BYTE ConfigVariableBool assert_abort
|
||||
("assert-abort", false,
|
||||
PRC_DESC("Set this true to trigger a core dump and/or stack trace when the first assertion fails"));
|
||||
|
@ -22,7 +22,8 @@ class ConfigVariableBool;
|
||||
|
||||
NotifyCategoryDecl(prc, EXPCL_DTOOLCONFIG, EXPTP_DTOOLCONFIG);
|
||||
|
||||
extern ConfigVariableBool assert_abort;
|
||||
// This is aligned to match the shadowed definition in notify.cxx.
|
||||
extern ALIGN_16BYTE ConfigVariableBool assert_abort;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -403,7 +403,7 @@ assert_failure(const char *expression, int line,
|
||||
|
||||
// This is redefined here, shadowing the defining in config_prc.h,
|
||||
// so we can guarantee it has already been constructed.
|
||||
ConfigVariableBool assert_abort("assert-abort", false);
|
||||
ALIGN_16BYTE ConfigVariableBool assert_abort("assert-abort", false);
|
||||
if (assert_abort) {
|
||||
#ifdef WIN32
|
||||
// How to trigger an exception in VC++ that offers to take us into
|
||||
|
@ -224,7 +224,7 @@ SectionGroup "Panda3D Libraries"
|
||||
!endif
|
||||
|
||||
!ifdef HAVE_PHYSX
|
||||
Section "PhysX support" SecPhysX
|
||||
Section "NVIDIA PhysX" SecPhysX
|
||||
SectionIn 1
|
||||
|
||||
SetOutPath "$INSTDIR\bin"
|
||||
|
@ -290,7 +290,7 @@ def parseopts(args):
|
||||
winver = sys.getwindowsversion()
|
||||
if platsdk and os.path.isdir(platsdk) and winver[0] >= 6 and winver[1] >= 1:
|
||||
is_win7 = True
|
||||
if not is_win7:
|
||||
if RUNTIME or not is_win7:
|
||||
PkgDisable("TOUCHINPUT")
|
||||
|
||||
parseopts(sys.argv[1:])
|
||||
@ -598,14 +598,17 @@ if (COMPILER == "MSVC"):
|
||||
LibName("FMODEX", GetThirdpartyDir() + "fmodex/lib/fmodex64_vc.lib")
|
||||
else:
|
||||
LibName("FMODEX", GetThirdpartyDir() + "fmodex/lib/fmodex_vc.lib")
|
||||
if (PkgSkip("FLTK")==0 and RTDIST):
|
||||
LibName("FLTK", GetThirdpartyDir() + "fltk/lib/fltk.lib")
|
||||
if not PkgSkip("FLTK"):
|
||||
# If we have fltk, we don't need wx
|
||||
PkgDisable("WX")
|
||||
if (PkgSkip("WX")==0 and RTDIST):
|
||||
LibName("WX", GetThirdpartyDir() + "wx/lib/wxbase28u.lib")
|
||||
LibName("WX", GetThirdpartyDir() + "wx/lib/wxmsw28u_core.lib")
|
||||
DefSymbol("WX", "__WXMSW__", "")
|
||||
DefSymbol("WX", "_UNICODE", "")
|
||||
DefSymbol("WX", "UNICODE", "")
|
||||
if (PkgSkip("FLTK")==0 and RTDIST):
|
||||
LibName("FLTK", GetThirdpartyDir() + "fltk/lib/fltk.lib")
|
||||
if (PkgSkip("VORBIS")==0):
|
||||
LibName("VORBIS", GetThirdpartyDir() + "vorbis/lib/libogg_static.lib")
|
||||
LibName("VORBIS", GetThirdpartyDir() + "vorbis/lib/libvorbis_static.lib")
|
||||
@ -689,13 +692,12 @@ if (COMPILER=="GCC"):
|
||||
IncDirectory("FREETYPE", "/usr/X11/include/freetype2")
|
||||
LibDirectory("FREETYPE", "/usr/X11/lib")
|
||||
|
||||
if (os.path.isdir("/usr/PCBSD")):
|
||||
IncDirectory("ALWAYS", "/usr/PCBSD/local/include")
|
||||
LibDirectory("ALWAYS", "/usr/PCBSD/local/lib")
|
||||
|
||||
if (GetHost() == "freebsd"):
|
||||
IncDirectory("ALWAYS", "/usr/local/include")
|
||||
LibDirectory("ALWAYS", "/usr/local/lib")
|
||||
if (os.path.isdir("/usr/PCBSD")):
|
||||
IncDirectory("ALWAYS", "/usr/PCBSD/local/include")
|
||||
LibDirectory("ALWAYS", "/usr/PCBSD/local/lib")
|
||||
|
||||
fcollada_libs = ("FColladaD", "FColladaSD", "FColladaS")
|
||||
# WARNING! The order of the ffmpeg libraries matters!
|
||||
@ -889,22 +891,37 @@ def printStatus(header,warnings):
|
||||
tkeep = ""
|
||||
tomit = ""
|
||||
for x in PkgListGet():
|
||||
if (PkgSkip(x)==0): tkeep = tkeep + x + " "
|
||||
else: tomit = tomit + x + " "
|
||||
if RTDIST: print("Makepanda: Runtime distribution build")
|
||||
elif RUNTIME: print("Makepanda: Runtime build")
|
||||
else: print("Makepanda: Regular build")
|
||||
print("Makepanda: Compiler:",COMPILER)
|
||||
print("Makepanda: Optimize:",GetOptimize())
|
||||
print("Makepanda: Keep Pkg:",tkeep)
|
||||
print("Makepanda: Omit Pkg:",tomit)
|
||||
if (GENMAN): print("Makepanda: Generate API reference manual")
|
||||
else : print("Makepanda: Don't generate API reference manual")
|
||||
if (GetHost() == "windows" and not RTDIST):
|
||||
if INSTALLER: print("Makepanda: Build installer, using",COMPRESSOR)
|
||||
else : print("Makepanda: Don't build installer")
|
||||
print("Makepanda: Version ID: "+VERSION)
|
||||
for x in warnings: print("Makepanda: "+x)
|
||||
if PkgSkip(x):
|
||||
tomit = tomit + x + " "
|
||||
else:
|
||||
tkeep = tkeep + x + " "
|
||||
|
||||
if RTDIST:
|
||||
print("Makepanda: Runtime distribution build")
|
||||
elif RUNTIME:
|
||||
print("Makepanda: Runtime build")
|
||||
else:
|
||||
print("Makepanda: Regular build")
|
||||
|
||||
print("Makepanda: Compiler: %s" % (COMPILER))
|
||||
print("Makepanda: Optimize: %d" % (GetOptimize()))
|
||||
print("Makepanda: Keep Pkg: %s" % (tkeep))
|
||||
print("Makepanda: Omit Pkg: %s" % (tomit))
|
||||
|
||||
if GENMAN:
|
||||
print("Makepanda: Generate API reference manual")
|
||||
else:
|
||||
print("Makepanda: Don't generate API reference manual")
|
||||
|
||||
if GetHost() == "windows" and not RTDIST:
|
||||
if INSTALLER:
|
||||
print("Makepanda: Build installer, using %s" % (COMPRESSOR))
|
||||
else:
|
||||
print("Makepanda: Don't build installer")
|
||||
|
||||
print("Makepanda: Version ID: %s" % (VERSION))
|
||||
for x in warnings:
|
||||
print("Makepanda: %s" % (x))
|
||||
print("-------------------------------------------------------------------")
|
||||
print("")
|
||||
sys.stdout.flush()
|
||||
@ -946,6 +963,8 @@ def CompileCxx(obj,src,opts):
|
||||
# Enable Windows 7 interfaces if we need Touchinput.
|
||||
if PkgSkip("TOUCHINPUT") == 0:
|
||||
cmd += "/DWINVER=0x601 "
|
||||
else:
|
||||
cmd += "/DWINVER=0x501 "
|
||||
cmd += "/Fo" + obj + " /nologo /c"
|
||||
if GetTargetArch() != 'x64' and (not PkgSkip("SSE2") or 'SSE2' in opts):
|
||||
cmd += " /arch:SSE2"
|
||||
@ -996,6 +1015,8 @@ def CompileCxx(obj,src,opts):
|
||||
# Enable Windows 7 interfaces if we need Touchinput.
|
||||
if PkgSkip("TOUCHINPUT") == 0:
|
||||
cmd += "/DWINVER=0x601 "
|
||||
else:
|
||||
cmd += "/DWINVER=0x501 "
|
||||
cmd += "/Fo" + obj + " /c"
|
||||
for x in ipath: cmd += " /I" + x
|
||||
for (opt,dir) in INCDIRECTORIES:
|
||||
@ -1360,6 +1381,8 @@ def CompileLib(lib, obj, opts):
|
||||
if not BOOUSEINTELCOMPILER:
|
||||
#Use MSVC Linker
|
||||
cmd = 'link /lib /nologo'
|
||||
if GetOptimizeOption(opts) == 4:
|
||||
cmd += " /LTCG"
|
||||
if HasTargetArch():
|
||||
cmd += " /MACHINE:" + GetTargetArch().upper()
|
||||
cmd += ' /OUT:' + BracketNameWithQuotes(lib)
|
||||
@ -3556,10 +3579,9 @@ if (not RUNTIME):
|
||||
|
||||
DefSymbol("TINYXML", "TIXML_USE_STL", "")
|
||||
|
||||
if (RUNTIME or RTDIST):
|
||||
OPTS=['DIR:panda/src/dxml', 'TINYXML']
|
||||
TargetAdd('tinyxml_composite1.obj', opts=OPTS, input='tinyxml_composite1.cxx')
|
||||
TargetAdd('libp3tinyxml.ilb', input='tinyxml_composite1.obj')
|
||||
OPTS=['DIR:panda/src/dxml', 'TINYXML']
|
||||
TargetAdd('tinyxml_composite1.obj', opts=OPTS, input='tinyxml_composite1.cxx')
|
||||
TargetAdd('libp3tinyxml.ilb', input='tinyxml_composite1.obj')
|
||||
|
||||
if (not RUNTIME):
|
||||
OPTS=['DIR:panda/src/dxml', 'BUILDING:PANDA', 'TINYXML']
|
||||
@ -3741,6 +3763,7 @@ if (not RUNTIME):
|
||||
TargetAdd('core.pyd', input='p3display_pythonGraphicsWindowProc.obj')
|
||||
|
||||
TargetAdd('core.pyd', input='core_module.obj')
|
||||
TargetAdd('core.pyd', input='libp3tinyxml.ilb')
|
||||
TargetAdd('core.pyd', input=COMMON_PANDA_LIBS)
|
||||
TargetAdd('core.pyd', opts=OPTS)
|
||||
|
||||
|
@ -2203,8 +2203,9 @@ def LibName(opt, name):
|
||||
if not os.path.exists(name):
|
||||
WARNINGS.append(name + " not found. Skipping Package " + opt)
|
||||
if (opt in PkgListGet()):
|
||||
print("%sWARNING:%s Could not locate thirdparty package %s, excluding from build" % (GetColor("red"), GetColor(), opt.lower()))
|
||||
PkgDisable(opt)
|
||||
if not PkgSkip(opt):
|
||||
print("%sWARNING:%s Could not locate thirdparty package %s, excluding from build" % (GetColor("red"), GetColor(), opt.lower()))
|
||||
PkgDisable(opt)
|
||||
return
|
||||
else:
|
||||
print("%sERROR:%s Could not locate thirdparty package %s, aborting build" % (GetColor("red"), GetColor(), opt.lower()))
|
||||
|
@ -26,8 +26,6 @@ distribution.
|
||||
#ifndef TINYXML_INCLUDED
|
||||
#define TINYXML_INCLUDED
|
||||
|
||||
#include "pandasymbols.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4530 )
|
||||
@ -98,7 +96,7 @@ const int TIXML_PATCH_VERSION = 1;
|
||||
/* Internal structure for tracking location of items
|
||||
in the XML file.
|
||||
*/
|
||||
struct EXPCL_PANDA TiXmlCursor
|
||||
struct TiXmlCursor
|
||||
{
|
||||
TiXmlCursor() { Clear(); }
|
||||
void Clear() { row = col = -1; }
|
||||
@ -127,7 +125,7 @@ struct EXPCL_PANDA TiXmlCursor
|
||||
|
||||
@sa TiXmlNode::Accept()
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlVisitor
|
||||
class TiXmlVisitor
|
||||
{
|
||||
public:
|
||||
virtual ~TiXmlVisitor() {}
|
||||
@ -193,7 +191,7 @@ const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
|
||||
A Decleration contains: Attributes (not on tree)
|
||||
@endverbatim
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlBase
|
||||
class TiXmlBase
|
||||
{
|
||||
friend class TiXmlNode;
|
||||
friend class TiXmlElement;
|
||||
@ -422,7 +420,7 @@ private:
|
||||
in a document, or stand on its own. The type of a TiXmlNode
|
||||
can be queried, and it can be cast to its more defined type.
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlNode : public TiXmlBase
|
||||
class TiXmlNode : public TiXmlBase
|
||||
{
|
||||
friend class TiXmlDocument;
|
||||
friend class TiXmlElement;
|
||||
@ -778,7 +776,7 @@ private:
|
||||
part of the tinyXML document object model. There are other
|
||||
suggested ways to look at this problem.
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlAttribute : public TiXmlBase
|
||||
class TiXmlAttribute : public TiXmlBase
|
||||
{
|
||||
friend class TiXmlAttributeSet;
|
||||
|
||||
@ -902,7 +900,7 @@ private:
|
||||
- I like circular lists
|
||||
- it demonstrates some independence from the (typical) doubly linked list.
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlAttributeSet
|
||||
class TiXmlAttributeSet
|
||||
{
|
||||
public:
|
||||
TiXmlAttributeSet();
|
||||
@ -939,7 +937,7 @@ private:
|
||||
and can contain other elements, text, comments, and unknowns.
|
||||
Elements also contain an arbitrary number of attributes.
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlElement : public TiXmlNode
|
||||
class TiXmlElement : public TiXmlNode
|
||||
{
|
||||
public:
|
||||
/// Construct an element.
|
||||
@ -1154,7 +1152,7 @@ private:
|
||||
|
||||
/** An XML comment.
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlComment : public TiXmlNode
|
||||
class TiXmlComment : public TiXmlNode
|
||||
{
|
||||
public:
|
||||
/// Constructs an empty comment.
|
||||
@ -1204,7 +1202,7 @@ private:
|
||||
you generally want to leave it alone, but you can change the output mode with
|
||||
SetCDATA() and query it with CDATA().
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlText : public TiXmlNode
|
||||
class TiXmlText : public TiXmlNode
|
||||
{
|
||||
friend class TiXmlElement;
|
||||
public:
|
||||
@ -1277,7 +1275,7 @@ private:
|
||||
handled as special cases, not generic attributes, simply
|
||||
because there can only be at most 3 and they are always the same.
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlDeclaration : public TiXmlNode
|
||||
class TiXmlDeclaration : public TiXmlNode
|
||||
{
|
||||
public:
|
||||
/// Construct an empty declaration.
|
||||
@ -1346,7 +1344,7 @@ private:
|
||||
|
||||
DTD tags get thrown into TiXmlUnknowns.
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlUnknown : public TiXmlNode
|
||||
class TiXmlUnknown : public TiXmlNode
|
||||
{
|
||||
public:
|
||||
TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) {}
|
||||
@ -1385,7 +1383,7 @@ private:
|
||||
XML pieces. It can be saved, loaded, and printed to the screen.
|
||||
The 'value' of a document node is the xml file name.
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlDocument : public TiXmlNode
|
||||
class TiXmlDocument : public TiXmlNode
|
||||
{
|
||||
public:
|
||||
/// Create an empty document, that has no name.
|
||||
@ -1630,7 +1628,7 @@ private:
|
||||
}
|
||||
@endverbatim
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlHandle
|
||||
class TiXmlHandle
|
||||
{
|
||||
public:
|
||||
/// Create a handle from any node (at any depth of the tree.) This can be a null pointer.
|
||||
@ -1729,7 +1727,7 @@ private:
|
||||
fprintf( stdout, "%s", printer.CStr() );
|
||||
@endverbatim
|
||||
*/
|
||||
class EXPCL_PANDA TiXmlPrinter : public TiXmlVisitor
|
||||
class TiXmlPrinter : public TiXmlVisitor
|
||||
{
|
||||
public:
|
||||
TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ),
|
||||
|
@ -22,9 +22,9 @@
|
||||
// The below functions can encode and decode sRGB colors in various
|
||||
// representations. Some of them are implemented using look-up tables,
|
||||
// some others using SSE2 intrinsics.
|
||||
extern EXPCL_PANDA_PNMIMAGE const unsigned char to_srgb8_table[256];
|
||||
extern EXPCL_PANDA_PNMIMAGE const unsigned char to_linear_uchar_table[256];
|
||||
extern EXPCL_PANDA_PNMIMAGE const float to_linear_float_table[256];
|
||||
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_srgb8_table[256];
|
||||
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_linear_uchar_table[256];
|
||||
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const float to_linear_float_table[256];
|
||||
|
||||
EXPCL_PANDA_PNMIMAGE CONSTEXPR float decode_sRGB_float(unsigned char val);
|
||||
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(float val);
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "extension.h"
|
||||
#include "pythonCallbackObject.h"
|
||||
#include "pointerTo.h"
|
||||
#include "py_panda.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user