mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Merge remote-tracking branch 'origin/release/1.9.x'
Conflicts: direct/src/showutil/FreezeTool.py
This commit is contained in:
commit
63c65b4228
@ -16,6 +16,7 @@ import types
|
|||||||
import getpass
|
import getpass
|
||||||
import struct
|
import struct
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import copy
|
||||||
from direct.p3d.FileSpec import FileSpec
|
from direct.p3d.FileSpec import FileSpec
|
||||||
from direct.p3d.SeqValue import SeqValue
|
from direct.p3d.SeqValue import SeqValue
|
||||||
from direct.showbase import Loader
|
from direct.showbase import Loader
|
||||||
@ -839,6 +840,14 @@ class Packager:
|
|||||||
self.packager.contents[pe.getKey()] = pe
|
self.packager.contents[pe.getKey()] = pe
|
||||||
self.packager.contentsChanged = True
|
self.packager.contentsChanged = True
|
||||||
|
|
||||||
|
# Hack for coreapi package, to preserve backward compatibility
|
||||||
|
# with old versions of the runtime, which still called the
|
||||||
|
# 32-bit Windows platform "win32".
|
||||||
|
if self.packageName == "coreapi" and self.platform == "win_i386":
|
||||||
|
pe2 = copy.copy(pe)
|
||||||
|
pe2.platform = "win32"
|
||||||
|
self.packager.contents[pe2.getKey()] = pe2
|
||||||
|
|
||||||
self.cleanup()
|
self.cleanup()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -1832,7 +1841,10 @@ class Packager:
|
|||||||
self.notify.warning(message)
|
self.notify.warning(message)
|
||||||
return
|
return
|
||||||
|
|
||||||
self.freezer.addModule(moduleName, filename = file.filename)
|
if file.text:
|
||||||
|
self.freezer.addModule(moduleName, filename = file.filename, text = file.text)
|
||||||
|
else:
|
||||||
|
self.freezer.addModule(moduleName, filename = file.filename)
|
||||||
|
|
||||||
def addEggFile(self, file):
|
def addEggFile(self, file):
|
||||||
# Precompile egg files to bam's.
|
# Precompile egg files to bam's.
|
||||||
|
@ -362,8 +362,16 @@ class rocket(package):
|
|||||||
config(display_name = "Panda3D libRocket support")
|
config(display_name = "Panda3D libRocket support")
|
||||||
require('panda3d')
|
require('panda3d')
|
||||||
|
|
||||||
module('panda3d.rocket', required = True)
|
file('rocket.py', extract = True, text = """
|
||||||
module('_rocketcore', '_rocketcontrols')
|
from _rocketcore import *
|
||||||
|
try:
|
||||||
|
from _rocketcontrols import *
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
""")
|
||||||
|
|
||||||
|
module('panda3d.rocket', '_rocketcore', required = True)
|
||||||
|
module('_rocketcontrols')
|
||||||
file('libp3rocket.dll', required = True)
|
file('libp3rocket.dll', required = True)
|
||||||
|
|
||||||
class vrpn(package):
|
class vrpn(package):
|
||||||
|
@ -258,9 +258,17 @@ initialize(int api_version, const string &contents_filename,
|
|||||||
|
|
||||||
// TODO: Linux multiplatform support. Just add the
|
// TODO: Linux multiplatform support. Just add the
|
||||||
// appropriate platform strings to _supported_platforms.
|
// appropriate platform strings to _supported_platforms.
|
||||||
|
} else {
|
||||||
|
nout << "Platform string was set by plugin to " << _platform << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_supported_platforms.empty()) {
|
if (_supported_platforms.empty()) {
|
||||||
|
// Hack for older plug-ins, which should still remain compatible with
|
||||||
|
// newer versions of the runtime distribution.
|
||||||
|
if (_platform == "win32") {
|
||||||
|
_supported_platforms.push_back("win_i386");
|
||||||
|
}
|
||||||
|
|
||||||
// We always support at least the specific platform on which we're
|
// We always support at least the specific platform on which we're
|
||||||
// running.
|
// running.
|
||||||
_supported_platforms.push_back(_platform);
|
_supported_platforms.push_back(_platform);
|
||||||
|
@ -681,10 +681,13 @@ subprocess_run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input_ready) {
|
while (input_ready) {
|
||||||
|
// Empty the pipe of whatever is in it.
|
||||||
receive_command();
|
receive_command();
|
||||||
|
input_ready = _pipe_read.has_gdata();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sleep a good amount in order not to lock up the system.
|
||||||
struct timespec req;
|
struct timespec req;
|
||||||
req.tv_sec = 0;
|
req.tv_sec = 0;
|
||||||
req.tv_nsec = 50000000; // 50 ms
|
req.tv_nsec = 50000000; // 50 ms
|
||||||
|
@ -76,8 +76,7 @@ class VFSImporter:
|
|||||||
if desc[2] != imp.C_EXTENSION:
|
if desc[2] != imp.C_EXTENSION:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
filename = Filename(path)
|
filename = Filename(path + desc[0])
|
||||||
filename.setExtension(desc[0][1:])
|
|
||||||
vfile = vfs.getFile(filename, True)
|
vfile = vfs.getFile(filename, True)
|
||||||
if vfile:
|
if vfile:
|
||||||
return VFSLoader(dir_path, vfile, filename, FTExtensionModule,
|
return VFSLoader(dir_path, vfile, filename, FTExtensionModule,
|
||||||
|
@ -8,6 +8,7 @@ import marshal
|
|||||||
import imp
|
import imp
|
||||||
import platform
|
import platform
|
||||||
import types
|
import types
|
||||||
|
from StringIO import StringIO
|
||||||
from distutils.sysconfig import PREFIX, get_python_inc, get_python_version, get_config_var
|
from distutils.sysconfig import PREFIX, get_python_inc, get_python_version, get_config_var
|
||||||
|
|
||||||
# Temporary (?) try..except to protect against unbuilt p3extend_frozen.
|
# Temporary (?) try..except to protect against unbuilt p3extend_frozen.
|
||||||
@ -497,7 +498,8 @@ class Freezer:
|
|||||||
def __init__(self, moduleName, filename = None,
|
def __init__(self, moduleName, filename = None,
|
||||||
implicit = False, guess = False,
|
implicit = False, guess = False,
|
||||||
exclude = False, forbid = False,
|
exclude = False, forbid = False,
|
||||||
allowChildren = False, fromSource = None):
|
allowChildren = False, fromSource = None,
|
||||||
|
text = None):
|
||||||
# The Python module name.
|
# The Python module name.
|
||||||
self.moduleName = moduleName
|
self.moduleName = moduleName
|
||||||
|
|
||||||
@ -532,6 +534,9 @@ class Freezer:
|
|||||||
# record came from, supplied by the caller.
|
# record came from, supplied by the caller.
|
||||||
self.fromSource = fromSource
|
self.fromSource = fromSource
|
||||||
|
|
||||||
|
# If this is set, it contains Python code of the module.
|
||||||
|
self.text = text
|
||||||
|
|
||||||
# Some sanity checks.
|
# Some sanity checks.
|
||||||
if not self.exclude:
|
if not self.exclude:
|
||||||
self.allowChildren = True
|
self.allowChildren = True
|
||||||
@ -748,7 +753,8 @@ class Freezer:
|
|||||||
return modules
|
return modules
|
||||||
|
|
||||||
def addModule(self, moduleName, implicit = False, newName = None,
|
def addModule(self, moduleName, implicit = False, newName = None,
|
||||||
filename = None, guess = False, fromSource = None):
|
filename = None, guess = False, fromSource = None,
|
||||||
|
text = None):
|
||||||
""" Adds a module to the list of modules to be exported by
|
""" Adds a module to the list of modules to be exported by
|
||||||
this tool. If implicit is true, it is OK if the module does
|
this tool. If implicit is true, it is OK if the module does
|
||||||
not actually exist.
|
not actually exist.
|
||||||
@ -804,7 +810,7 @@ class Freezer:
|
|||||||
# It's actually a regular module.
|
# It's actually a regular module.
|
||||||
self.modules[newParentName] = self.ModuleDef(
|
self.modules[newParentName] = self.ModuleDef(
|
||||||
parentName, implicit = implicit, guess = guess,
|
parentName, implicit = implicit, guess = guess,
|
||||||
fromSource = fromSource)
|
fromSource = fromSource, text = text)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Now get all the py files in the parent directory.
|
# Now get all the py files in the parent directory.
|
||||||
@ -819,7 +825,7 @@ class Freezer:
|
|||||||
# A normal, explicit module name.
|
# A normal, explicit module name.
|
||||||
self.modules[newName] = self.ModuleDef(
|
self.modules[newName] = self.ModuleDef(
|
||||||
moduleName, filename = filename, implicit = implicit,
|
moduleName, filename = filename, implicit = implicit,
|
||||||
guess = guess, fromSource = fromSource)
|
guess = guess, fromSource = fromSource, text = text)
|
||||||
|
|
||||||
def done(self, compileToExe = False):
|
def done(self, compileToExe = False):
|
||||||
""" Call this method after you have added all modules with
|
""" Call this method after you have added all modules with
|
||||||
@ -970,7 +976,10 @@ class Freezer:
|
|||||||
stuff = ("", "rb", imp.PY_COMPILED)
|
stuff = ("", "rb", imp.PY_COMPILED)
|
||||||
self.mf.load_module(mdef.moduleName, fp, pathname, stuff)
|
self.mf.load_module(mdef.moduleName, fp, pathname, stuff)
|
||||||
else:
|
else:
|
||||||
fp = open(pathname, 'U')
|
if mdef.text:
|
||||||
|
fp = StringIO(mdef.text)
|
||||||
|
else:
|
||||||
|
fp = open(pathname, 'U')
|
||||||
stuff = ("", "r", imp.PY_SOURCE)
|
stuff = ("", "r", imp.PY_SOURCE)
|
||||||
self.mf.load_module(mdef.moduleName, fp, pathname, stuff)
|
self.mf.load_module(mdef.moduleName, fp, pathname, stuff)
|
||||||
|
|
||||||
|
@ -455,9 +455,8 @@ SdkAutoDisableMax()
|
|||||||
SdkAutoDisablePhysX()
|
SdkAutoDisablePhysX()
|
||||||
SdkAutoDisableSpeedTree()
|
SdkAutoDisableSpeedTree()
|
||||||
|
|
||||||
if (RTDIST and DISTRIBUTOR == "cmu"):
|
if RTDIST and DISTRIBUTOR == "cmu":
|
||||||
HOST_URL = "https://runtime.panda3d.org/"
|
# Some validation checks for the CMU builds.
|
||||||
|
|
||||||
if (RTDIST_VERSION == "cmu_1.7" and SDK["PYTHONVERSION"] != "python2.6"):
|
if (RTDIST_VERSION == "cmu_1.7" and SDK["PYTHONVERSION"] != "python2.6"):
|
||||||
exit("The CMU 1.7 runtime distribution must be built against Python 2.6!")
|
exit("The CMU 1.7 runtime distribution must be built against Python 2.6!")
|
||||||
elif (RTDIST_VERSION == "cmu_1.8" and SDK["PYTHONVERSION"] != "python2.7"):
|
elif (RTDIST_VERSION == "cmu_1.8" and SDK["PYTHONVERSION"] != "python2.7"):
|
||||||
@ -465,7 +464,7 @@ if (RTDIST and DISTRIBUTOR == "cmu"):
|
|||||||
elif (RTDIST_VERSION == "cmu_1.9" and SDK["PYTHONVERSION"] != "python2.7"):
|
elif (RTDIST_VERSION == "cmu_1.9" and SDK["PYTHONVERSION"] != "python2.7"):
|
||||||
exit("The CMU 1.9 runtime distribution must be built against Python 2.7!")
|
exit("The CMU 1.9 runtime distribution must be built against Python 2.7!")
|
||||||
|
|
||||||
elif RTDIST and not HOST_URL:
|
if RTDIST and not HOST_URL:
|
||||||
exit("You must specify a host URL when building the rtdist!")
|
exit("You must specify a host URL when building the rtdist!")
|
||||||
|
|
||||||
if RUNTIME and not HOST_URL:
|
if RUNTIME and not HOST_URL:
|
||||||
|
@ -34,6 +34,8 @@ TypeHandle RocketInputHandler::_type_handle;
|
|||||||
RocketInputHandler::
|
RocketInputHandler::
|
||||||
RocketInputHandler(const string &name) :
|
RocketInputHandler(const string &name) :
|
||||||
DataNode(name),
|
DataNode(name),
|
||||||
|
_mouse_xy(-1),
|
||||||
|
_mouse_xy_changed(false),
|
||||||
_modifiers(0),
|
_modifiers(0),
|
||||||
_wheel_delta(0)
|
_wheel_delta(0)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "configVariableBool.h"
|
#include "configVariableBool.h"
|
||||||
#include "panda_getopt_long.h"
|
#include "panda_getopt_long.h"
|
||||||
#include "preprocess_argv.h"
|
#include "preprocess_argv.h"
|
||||||
#include "pandaVersion.h"
|
#include "pandaSystem.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -222,7 +222,8 @@ write_man_page(ostream &out) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out << " 1 \"" << date_str << "\" \"" PANDA_VERSION_STR "\" Panda3D\n";
|
out << " 1 \"" << date_str << "\" \""
|
||||||
|
<< PandaSystem::get_version_string() << "\" Panda3D\n";
|
||||||
|
|
||||||
out << ".SH NAME\n";
|
out << ".SH NAME\n";
|
||||||
if (_brief.empty()) {
|
if (_brief.empty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user