2
0
Эх сурвалжийг харах

Fix compilation issues with the runtime

rdb 10 жил өмнө
parent
commit
7edecd7fea

+ 2 - 2
direct/src/plugin_npapi/ppBrowserObject.cxx

@@ -230,10 +230,10 @@ call(const string &method_name, P3D_object *params[], int num_params) const {
 ////////////////////////////////////////////////////////////////////
 P3D_object *PPBrowserObject::
 eval(const string &expression) const {
-  NPString npexpr = { expression.c_str(), expression.length() };
+  NPString npexpr = { expression.c_str(), (uint32_t)expression.length() };
 
   NPVariant result;
-  if (!browser->evaluate(_instance->get_npp_instance(), _npobj, 
+  if (!browser->evaluate(_instance->get_npp_instance(), _npobj,
                          &npexpr, &result)) {
     // Failed to eval.
     return NULL;

+ 3 - 3
direct/src/plugin_npapi/ppInstance.cxx

@@ -2173,16 +2173,16 @@ set_failed() {
       NPObject *window_object = NULL;
       if (browser->getvalue(_npp_instance, NPNVWindowNPObject,
                             &window_object) == NPERR_NO_ERROR) {
-        NPString npexpr = { expression.c_str(), expression.length() };
+        NPString npexpr = { expression.c_str(), (uint32_t)expression.length() };
         NPVariant result;
-        if (browser->evaluate(_npp_instance, window_object, 
+        if (browser->evaluate(_npp_instance, window_object,
                               &npexpr, &result)) {
           nout << "Eval " << expression << "\n";
           browser->releasevariantvalue(&result);
         } else {
           nout << "Unable to eval " << expression << "\n";
         }
-        
+
         browser->releaseobject(window_object);
       }
     }

+ 1 - 1
direct/src/plugin_npapi/startup.cxx

@@ -187,7 +187,7 @@ NP_Initialize(NPNetscapeFuncs *browserFuncs,
   }
 #endif
 
-  int browser_major = (browser->version >> 8) && 0xff;
+  int browser_major = (browser->version >> 8) & 0xff;
   int browser_minor = browser->version & 0xff;
   nout << "Browser NPAPI version " << browser_major << "." << browser_minor << "\n";
 

+ 4 - 0
makepanda/makepanda.py

@@ -439,6 +439,10 @@ if (RTDIST and DISTRIBUTOR == "cmu"):
 elif RTDIST and not HOST_URL:
     exit("You must specify a host URL when building the rtdist!")
 
+if RUNTIME and not HOST_URL:
+    # Set this to a nice default.
+    HOST_URL = "https://runtime.panda3d.org/"
+
 ########################################################################
 ##
 ## Choose a Compiler.

+ 2 - 0
panda/src/dxml/tinyxml.h

@@ -26,6 +26,8 @@ distribution.
 #ifndef TINYXML_INCLUDED
 #define TINYXML_INCLUDED
 
+#include "pandasymbols.h"
+
 #ifdef _MSC_VER
 #pragma warning( push )
 #pragma warning( disable : 4530 )