Merge branch 'release/1.9.x'

Conflicts:
	.travis.yml
	dtool/src/cppparser/cppBison.cxx.prebuilt
	dtool/src/cppparser/cppBison.yxx
	makepanda/makepanda.py
This commit is contained in:
rdb 2015-11-19 18:43:13 +01:00
commit c93e50ca05
10 changed files with 1440 additions and 1502 deletions

View File

@ -4,7 +4,7 @@ compiler:
- clang
before_script:
- sudo apt-get install python-dev libpng-dev zlib1g-dev libssl-dev libx11-dev libgl1-mesa-dev libxrandr-dev libxxf86dga-dev libxcursor-dev bison flex libfreetype6-dev libvorbis-dev libjpeg-dev libopenal-dev libode-dev nvidia-cg-toolkit
script: python makepanda/makepanda.py --everything --verbose --git-commit $TRAVIS_COMMIT --installer --threads 2
script: python makepanda/makepanda.py --everything --verbose --git-commit $TRAVIS_COMMIT --installer --threads 4
notifications:
irc:
channels:

View File

@ -24,7 +24,6 @@ class Fixture(NodePath, FSM):
self.scaleIval = None
self.recordingInProgress = False
self.dirty = False
pass
def __str__(self):
return 'Fixture(%d, \'%s\', %s, %s, %s)' % (self.id, self.state, self.getPos(), self.getHpr(), self.getFov())
@ -34,7 +33,6 @@ class Fixture(NodePath, FSM):
def setId(self, id):
self.id = id
pass
def setFov(self, fov):
"""
@ -42,15 +40,12 @@ class Fixture(NodePath, FSM):
"""
if fov != VBase2(0):
self.lens.setFov(fov)
pass
self.setupFrustum()
pass
def adjustFov(self, x, y):
fov = self.lens.getFov()
self.lens.setFov(fov[0]+x, fov[1]+y)
self.dirty = True
pass
def getFov(self):
return self.lens.getFov()
@ -59,40 +54,30 @@ class Fixture(NodePath, FSM):
oldFrustum = self.find('frustum')
if oldFrustum:
oldFrustum.detachNode()
pass
self.attachNewNode(GeomNode('frustum')).node().addGeom(self.lens.makeGeometry())
pass
def setRecordingInProgress(self, inProgress):
self.recordingInProgress = inProgress
if self.recordingInProgress and \
base.config.GetInt('camera-id', -1) >= 0:
self.hide()
pass
else:
self.show()
pass
pass
def show(self):
if base.config.GetBool('aware-of-cameras',0) and \
not self.recordingInProgress:
NodePath.show(self)
pass
pass
def getScaleIval(self):
if not self.scaleIval:
self.scaleIval = Sequence(LerpScaleInterval(self.getChild(0), 0.25, 2, startScale = 1, blendType = 'easeInOut'),
LerpScaleInterval(self.getChild(0), 0.25, 1, startScale = 2, blendType = 'easeInOut'))
pass
return self.scaleIval
def setState(self, state):
self.request(state)
pass
def defaultFilter(self, request, args):
if request == self.getCurrentOrNextState():
@ -101,7 +86,6 @@ class Fixture(NodePath, FSM):
def exitOff(self):
self.accept('recordingInProgress', self.setRecordingInProgress)
pass
def enterOff(self):
self.ignore('recordingInProgress')
@ -109,10 +93,8 @@ class Fixture(NodePath, FSM):
if self.scaleIval:
self.scaleIval.finish()
self.scaleIval = None
pass
self.hide()
pass
def enterStandby(self):
self.show()
@ -122,37 +104,27 @@ class Fixture(NodePath, FSM):
else:
self.setColorScale(3,3,0,1)
self.getScaleIval().finish()
pass
pass
def enterBlinking(self):
self.show()
self.setColorScale(0,3,0,1)
self.getScaleIval().loop()
pass
def exitBlinking(self):
if self.scaleIval:
self.scaleIval.finish()
pass
pass
def enterRecording(self):
if base.config.GetInt('camera-id', -1) == self.id:
self.demand('Using')
pass
else:
self.show()
self.setColorScale(3,0,0,1)
self.getScaleIval().loop()
pass
pass
def exitRecording(self):
if self.scaleIval:
self.scaleIval.finish()
pass
pass
def enterUsing(self, args = []):
localAvatar.b_setGameState('Camera')
@ -178,8 +150,6 @@ class Fixture(NodePath, FSM):
lodNodes = render.findAllMatches('**/+LODNode')
for i in xrange(0,lodNodes.getNumPaths()):
lodNodes[i].node().forceSwitch(lodNodes[i].node().getHighestSwitch())
pass
pass
def exitUsing(self):
@ -199,9 +169,6 @@ class Fixture(NodePath, FSM):
if self.dirty:
messenger.send('refresh-fixture', [self.id, self.pack()])
self.dirty = False
pass
pass
class DistributedCamera(DistributedObject):
@ -211,8 +178,6 @@ class DistributedCamera(DistributedObject):
self.fixtures = {}
self.cameraId = base.config.GetInt('camera-id',0)
pass
def __getitem__(self, index):
return self.fixtures.get(index)
@ -236,7 +201,6 @@ class DistributedCamera(DistributedObject):
for fixture in self.fixtures.itervalues():
fixture.cleanup()
fixture.detachNode()
pass
self.fixtures = {}
DistributedObject.disable(self)
@ -250,13 +214,9 @@ class DistributedCamera(DistributedObject):
self.parent = render
else:
self.parent = self.cr.getDo(doId)
pass
for fix in self.fixtures.itervalues():
fix.reparentTo(self.parent)
pass
pass
pass
def getCamParent(self):
return self.parent
@ -266,7 +226,6 @@ class DistributedCamera(DistributedObject):
fixture = self.fixtures.pop(x)
fixture.cleanup()
fixture.detachNode()
pass
recordingInProgress = False
for x,fixture in enumerate(fixtures):
@ -277,7 +236,6 @@ class DistributedCamera(DistributedObject):
if x not in self.fixtures:
self.fixtures[x] = Fixture(x, self.parent, Point3(0), hpr = Point3(0), fov = VBase2(0))
pass
fix = self.fixtures.get(x)
fix.setId(x)
@ -285,7 +243,6 @@ class DistributedCamera(DistributedObject):
fix.setState(state)
fix.setFov(fov)
recordingInProgress |= state == 'Recording'
pass
messenger.send('recordingInProgress', [recordingInProgress])
@ -294,8 +251,6 @@ class DistributedCamera(DistributedObject):
if fixture:
fixture.request('Using', [True])
self.accept('escape', self.stopTesting, [index])
pass
pass
def stopTesting(self, index):
fixture = self.fixtures.get(index)
@ -303,5 +258,3 @@ class DistributedCamera(DistributedObject):
self.ignore('escape')
fixture.request('Standby')
localAvatar.b_setGameState('LandRoam')
pass

View File

@ -6,7 +6,6 @@ class DistributedCameraAI(DistributedObjectAI):
DistributedObjectAI.__init__(self, air)
self.parent = 0
self.fixtures = []
pass
def getCamParent(self):
return self.parent

View File

@ -7,7 +7,6 @@ class DistributedCameraOV(DistributedObjectOV):
self.parent = 0
self.fixtures = []
self.accept('refresh-fixture', self.refreshFixture)
pass
def delete(self):
self.ignore('escape')
@ -19,17 +18,14 @@ class DistributedCameraOV(DistributedObjectOV):
def setCamParent(self, doId):
self.parent = doId
pass
def setFixtures(self, fixtures):
self.fixtures = fixtures
pass
def storeToFile(self, name):
f = file('cameras-%s.txt' % name, 'w')
f.writelines(self.getObject().pack())
f.close()
pass
def unpackFixture(self, data):
data = data.strip().replace('Camera','')
@ -45,9 +41,7 @@ class DistributedCameraOV(DistributedObjectOV):
hpr[0],hpr[1],hpr[2],
fov[0],fov[1],
'Standby'])
pass
f.close()
pass
def refreshFixture(self, id, data):
pos,hpr,fov = self.unpackFixture(data)
@ -59,24 +53,20 @@ class DistributedCameraOV(DistributedObjectOV):
# distributed only
self.d_setFixtures(self.fixtures)
pass
def b_setFixtures(self, fixtures):
self.getObject().setFixtures(fixtures)
self.setFixtures(fixtures)
self.d_setFixtures(fixtures)
pass
def d_setFixtures(self, fixtures):
self.sendUpdate('setFixtures', [fixtures])
pass
def addFixture(self, fixture, index = None):
if index is not None:
self.fixtures.insert(index, fixture)
else:
self.fixtures.append(fixture)
pass
self.b_setFixtures(self.fixtures)
return self.fixtures.index(fixture)
@ -85,25 +75,20 @@ class DistributedCameraOV(DistributedObjectOV):
fixture = self.fixtures[index]
fixture[6] = 'Blinking'
self.b_setFixtures(self.fixtures)
pass
pass
def standbyFixture(self, index):
if index < len(self.fixtures):
fixture = self.fixtures[index]
fixture[6] = 'Standby'
self.b_setFixtures(self.fixtures)
pass
def testFixture(self, index):
if index < len(self.fixtures):
self.getObject().testFixture(index)
pass
def removeFixture(self, index):
self.fixtures.pop(index)
self.b_setFixtures(self.fixtures)
pass
def saveFixture(self, index = None):
"""
@ -116,20 +101,15 @@ class DistributedCameraOV(DistributedObjectOV):
hpr[0], hpr[1], hpr[2],
'Standby'],
index)
pass
def startRecording(self):
self.accept('escape', self.stopRecording)
for fixture in self.fixtures:
fixture[6] = 'Recording'
pass
self.b_setFixtures(self.fixtures)
pass
def stopRecording(self):
self.ignore('escape')
for fixture in self.fixtures:
fixture[6] = 'Standby'
pass
self.b_setFixtures(self.fixtures)
pass

View File

@ -440,7 +440,7 @@ def makeInstaller():
if not os.path.exists(tmproot):
os.makedirs(tmproot)
dst_npapi = os.path.join(tmproot, "Library", "Internet Plug-Ins", npapi)
dst_panda3d = os.path.join(tmproot, "usr", "bin", panda3d)
dst_panda3d = os.path.join(tmproot, "usr", "local", "bin", panda3d)
dst_panda3dapp = os.path.join(tmproot, "Applications", panda3dapp)
if not os.path.exists(dst_npapi): os.makedirs(os.path.dirname(dst_npapi))
if not os.path.exists(dst_panda3d): os.makedirs(os.path.dirname(dst_panda3d))

File diff suppressed because it is too large Load Diff

View File

@ -2343,14 +2343,14 @@ element:
| KW_CLASS | KW_CONST | KW_CONSTEXPR | KW_DECLTYPE | KW_DEFAULT
| KW_DELETE | KW_DOUBLE | KW_DYNAMIC_CAST | KW_ELSE | KW_ENUM
| KW_EXTERN | KW_EXPLICIT | KW_FALSE
| KW_FLOAT | KW_FRIEND | KW_FOR | KW_GOTO
| KW_IF | KW_INLINE | KW_INT | KW_LONG | KW_MUTABLE
| KW_FLOAT | KW_FRIEND | KW_FOR | KW_GOTO | KW_IF | KW_INLINE
| KW_INT | KW_LONG | KW_MUTABLE | KW_NAMESPACE
| KW_NEW | KW_NULLPTR | KW_OPERATOR | KW_PRIVATE | KW_PROTECTED
| KW_PUBLIC | KW_PUBLISHED | KW_REGISTER | KW_RETURN
| KW_SHORT | KW_SIGNED | KW_SIZEOF | KW_STATIC | KW_STATIC_ASSERT
| KW_STATIC_CAST | KW_STRUCT | KW_THROW | KW_TRUE | KW_TRY
| KW_TYPEDEF | KW_TYPENAME | KW_UNION | KW_UNSIGNED | KW_VIRTUAL
| KW_VOID | KW_VOLATILE | KW_WCHAR_T | KW_WHILE
| KW_TYPEDEF | KW_TYPENAME | KW_UNION | KW_UNSIGNED | KW_USING
| KW_VIRTUAL | KW_VOID | KW_VOLATILE | KW_WCHAR_T | KW_WHILE
{
}
| '+' | '-' | '*' | '/' | '&' | '|' | '^' | '!' | '~' | '=' | '%'

View File

@ -383,6 +383,8 @@ get_next_token0() {
ident->_names.back().set_templ
(nested_parse_template_instantiation(decl->get_template_scope()));
token = internal_get_next_token();
} else {
error(string("unknown template '") + ident->get_fully_scoped_name() + "'", loc);
}
}
@ -441,6 +443,8 @@ get_next_token0() {
ident->_names.back().set_templ
(nested_parse_template_instantiation(decl->get_template_scope()));
token = internal_get_next_token();
} else {
error(string("unknown template '") + ident->get_fully_scoped_name() + "'", loc);
}
}
}

View File

@ -267,6 +267,11 @@ define_extension_type(CPPExtensionType *type, CPPPreprocessor *error_sink) {
}
if (type->is_template()) {
CPPTemplateScope *scope = type->get_template_scope();
if (scope->_parameters._parameters.size() == 0) {
return;
}
string simple_name = type->get_simple_name();
pair<Templates::iterator, bool> result =
@ -616,9 +621,14 @@ find_scope(const string &name, bool recurse) const {
ti = _types.find(name);
if (ti != _types.end()) {
type = (*ti).second;
// Resolve if this is a typedef.
while (type->as_typedef_type() != (CPPTypedefType *)NULL) {
type = type->as_typedef_type()->_type;
// Resolve if this is a typedef or const.
while (type->get_subtype() == CPPDeclaration::ST_const ||
type->get_subtype() == CPPDeclaration::ST_typedef) {
if (type->as_typedef_type() != (CPPType *)NULL) {
type = type->as_typedef_type()->_type;
} else {
type = type->as_const_type()->_wrapped_around;
}
}
} else if (_struct_type != NULL) {
@ -668,9 +678,14 @@ find_scope(const string &name, CPPDeclaration::SubstDecl &subst,
return NULL;
}
// Resolve this if it is a typedef.
while (type->get_subtype() == CPPDeclaration::ST_typedef) {
type = type->as_typedef_type()->_type;
// Resolve if this is a typedef or const.
while (type->get_subtype() == CPPDeclaration::ST_const ||
type->get_subtype() == CPPDeclaration::ST_typedef) {
if (type->as_typedef_type() != (CPPType *)NULL) {
type = type->as_typedef_type()->_type;
} else {
type = type->as_const_type()->_wrapped_around;
}
}
CPPStructType *st = type->as_struct_type();

View File

@ -169,13 +169,14 @@ def parseopts(args):
"optimize=","everything","nothing","installer","rtdist","nocolor",
"version=","lzma","no-python","threads=","outputdir=","override=",
"static","host=","debversion=","rpmrelease=","p3dsuffix=",
"directx-sdk=", "windows-sdk=", "msvc-version=", "use-icl",
"directx-sdk=", "windows-sdk=", "msvc-version=", "clean", "use-icl",
"universal", "target=", "arch=", "git-commit="]
anything = 0
optimize = ""
target = None
target_arch = None
universal = False
clean_build = False
for pkg in PkgListGet():
longopts.append("use-" + pkg.lower())
longopts.append("no-" + pkg.lower())
@ -225,6 +226,7 @@ def parseopts(args):
elif (option=="--msvc-version"):
MSVC_VERSION = value.strip().lower()
elif (option=="--use-icl"): BOOUSEINTELCOMPILER = True
elif (option=="--clean"): clean_build = True
else:
for pkg in PkgListGet():
if option == "--use-" + pkg.lower():
@ -325,6 +327,10 @@ def parseopts(args):
else:
PkgDisable("TOUCHINPUT")
if clean_build:
print("Deleting %s" % (GetOutputDir()))
shutil.rmtree(GetOutputDir())
parseopts(sys.argv[1:])
########################################################################