mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
ce235c3e60
@ -64,8 +64,8 @@ depending on whether you are on a 32-bit or 64-bit system, or you can
|
||||
[click here](https://github.com/rdb/panda3d-thirdparty) for instructions on
|
||||
building them from source.
|
||||
|
||||
- https://www.panda3d.org/download/panda3d-1.10.8/panda3d-1.10.8-tools-win64.zip
|
||||
- https://www.panda3d.org/download/panda3d-1.10.8/panda3d-1.10.8-tools-win32.zip
|
||||
- https://www.panda3d.org/download/panda3d-1.10.9/panda3d-1.10.9-tools-win64.zip
|
||||
- https://www.panda3d.org/download/panda3d-1.10.9/panda3d-1.10.9-tools-win32.zip
|
||||
|
||||
After acquiring these dependencies, you can build Panda3D from the command
|
||||
prompt using the following command. Change the `--msvc-version` option based
|
||||
|
@ -1453,6 +1453,19 @@ def CompileFlex(wobj,wsrc,opts):
|
||||
pre = GetValueOption(opts, "BISONPREFIX_")
|
||||
dashi = opts.count("FLEXDASHI")
|
||||
flex = GetFlex()
|
||||
want_version = GetValueOption(opts, "FLEXVERSION:")
|
||||
if flex and want_version:
|
||||
# Is flex at the required version for this file?
|
||||
want_version = tuple(map(int, want_version.split('.')))
|
||||
have_version = GetFlexVersion()
|
||||
if want_version > have_version:
|
||||
Warn("Skipping flex %s for file %s, need at least %s" % (
|
||||
'.'.join(map(str, have_version)),
|
||||
ifile,
|
||||
'.'.join(map(str, want_version)),
|
||||
))
|
||||
flex = None
|
||||
|
||||
if flex is None:
|
||||
# We don't have flex. See if there is a prebuilt file.
|
||||
base, ext = os.path.splitext(wsrc)
|
||||
@ -4383,7 +4396,7 @@ if GetTarget() == 'windows' and not PkgSkip("DX9"):
|
||||
#
|
||||
|
||||
if not PkgSkip("EGG"):
|
||||
OPTS=['DIR:panda/src/egg', 'BUILDING:PANDAEGG', 'ZLIB', 'BISONPREFIX_eggyy', 'FLEXDASHI']
|
||||
OPTS=['DIR:panda/src/egg', 'BUILDING:PANDAEGG', 'ZLIB', 'BISONPREFIX_eggyy', 'FLEXDASHI', 'FLEXVERSION:2.5.9']
|
||||
CreateFile(GetOutputDir()+"/include/parser.h")
|
||||
TargetAdd('p3egg_parser.obj', opts=OPTS, input='parser.yxx')
|
||||
TargetAdd('parser.h', input='p3egg_parser.obj', opts=['DEPENDENCYONLY'])
|
||||
|
@ -552,6 +552,23 @@ def GetFlex():
|
||||
|
||||
return FLEX
|
||||
|
||||
def GetFlexVersion():
|
||||
flex = GetFlex()
|
||||
if not flex:
|
||||
return (0, 0, 0)
|
||||
|
||||
try:
|
||||
handle = subprocess.Popen(["flex", "--version"], executable=flex, stdout=subprocess.PIPE)
|
||||
words = handle.communicate()[0].strip().splitlines()[0].split(b' ')
|
||||
if words[1] != "version":
|
||||
version = words[1]
|
||||
else:
|
||||
version = words[2]
|
||||
return tuple(map(int, version.split(b'.')))
|
||||
except:
|
||||
Warn("Unable to detect flex version")
|
||||
return (0, 0, 0)
|
||||
|
||||
########################################################################
|
||||
##
|
||||
## LocateBinary
|
||||
|
@ -19,6 +19,7 @@
|
||||
#ifdef HAVE_PYTHON
|
||||
|
||||
#include "extension.h"
|
||||
#include "eggData.h"
|
||||
#include "eggNode.h"
|
||||
#include "py_panda.h"
|
||||
|
||||
|
@ -1195,12 +1195,12 @@ scan_quoted_string() {
|
||||
|
||||
int c;
|
||||
c = read_char(line, col);
|
||||
while (c != '"' && c != EOF) {
|
||||
while (c != '"' && c != 0 && c != EOF) {
|
||||
result += c;
|
||||
c = read_char(line, col);
|
||||
}
|
||||
|
||||
if (c == EOF) {
|
||||
if (c == 0 || c == EOF) {
|
||||
eggyyerror("This quotation mark is unterminated.");
|
||||
}
|
||||
|
||||
@ -1224,7 +1224,7 @@ eat_c_comment() {
|
||||
|
||||
last_c = '\0';
|
||||
c = read_char(line, col);
|
||||
while (c != EOF && !(last_c == '*' && c == '/')) {
|
||||
while (c != 0 && c != EOF && !(last_c == '*' && c == '/')) {
|
||||
if (last_c == '/' && c == '*') {
|
||||
std::ostringstream errmsg;
|
||||
errmsg << "This comment contains a nested /* symbol at line "
|
||||
@ -1236,7 +1236,7 @@ eat_c_comment() {
|
||||
c = read_char(line, col);
|
||||
}
|
||||
|
||||
if (c == EOF) {
|
||||
if (c == 0 || c == EOF) {
|
||||
eggyyerror("This comment marker is unclosed.");
|
||||
}
|
||||
|
||||
|
@ -250,12 +250,12 @@ scan_quoted_string() {
|
||||
|
||||
int c;
|
||||
c = read_char(line, col);
|
||||
while (c != '"' && c != EOF) {
|
||||
while (c != '"' && c != 0 && c != EOF) {
|
||||
result += c;
|
||||
c = read_char(line, col);
|
||||
}
|
||||
|
||||
if (c == EOF) {
|
||||
if (c == 0 || c == EOF) {
|
||||
eggyyerror("This quotation mark is unterminated.");
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ eat_c_comment() {
|
||||
|
||||
last_c = '\0';
|
||||
c = read_char(line, col);
|
||||
while (c != EOF && !(last_c == '*' && c == '/')) {
|
||||
while (c != 0 && c != EOF && !(last_c == '*' && c == '/')) {
|
||||
if (last_c == '/' && c == '*') {
|
||||
std::ostringstream errmsg;
|
||||
errmsg << "This comment contains a nested /* symbol at line "
|
||||
@ -291,7 +291,7 @@ eat_c_comment() {
|
||||
c = read_char(line, col);
|
||||
}
|
||||
|
||||
if (c == EOF) {
|
||||
if (c == 0 || c == EOF) {
|
||||
eggyyerror("This comment marker is unclosed.");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user