Skip to content

Commit bc0d509

Browse files
committed
bam 5.0, new Geom implementation is now official
1 parent ea4792e commit bc0d509

File tree

396 files changed

+17406
-40588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+17406
-40588
lines changed

direct/src/ffi/Sources.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#define INSTALL_SCRIPTS $[INSTALL_SCRIPTS] genPyCode.bat
77
#else
88
#define INSTALL_SCRIPTS $[INSTALL_SCRIPTS] genPyCode
9-
#define INSTALL_SCRIPTS $[INSTALL_SCRIPTS] genPyCodeNative
109
#endif
1110
1211
#include $[THISDIRPREFIX]genPyCode.pp

direct/src/ffi/genPyCodeNative

Lines changed: 0 additions & 4 deletions
This file was deleted.

dtool/Config.pp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@
102102

103103
// #define INSTALL_LIB_DIR /usr/lib/python2.2/site-packages
104104

105-
// If you want to use python 2.2 or earlier, you may need this defined:
106-
// (Later versions of Python handle signed and unsigned integers differently).
107-
// #define USE_PYTHON_2_2_OR_EARLIER
108-
109105

110106
// The character used to separate components of an OS-specific
111107
// directory name depends on the platform (it is '/' on Unix, '\' on
@@ -813,8 +809,8 @@
813809
// a running program without crashing the running instance. However,
814810
// it doesn't understanding installing a program from a subdirectory,
815811
// so we have to cd into the source directory first.
816-
#defer INSTALL $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_DATA] $[notdir $[local]] $[dest]/
817-
#defer INSTALL_PROG $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_PROG] $[notdir $[local]] $[dest]/
812+
#defer INSTALL $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_DATA] -p $[notdir $[local]] $[dest]/
813+
#defer INSTALL_PROG $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_PROG] -p $[notdir $[local]] $[dest]/
818814

819815
// Variable definitions for building with the Irix MIPSPro compiler.
820816
#if $[eq $[USE_COMPILER], MIPS]

dtool/LocalSetup.pp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,4 @@
448448
$[cdefine MODERN_STYLE_ALLOCATOR]
449449
$[cdefine NO_STYLE_ALLOCATOR]
450450
451-
/* Define if you want to use Python before 2.3. */
452-
$[cdefine USE_PYTHON_2_2_OR_EARLIER]
453-
454451
#end dtool_config.h

dtool/pptempl/Template.gmsvc.pp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -427,19 +427,19 @@
427427
$[install_lib_dir]/$[get_dllname $[TARGET]].$[dlllib] : $[ODIR]/$[get_dllname $[TARGET]].$[dlllib]
428428
#define local $[get_dllname $[TARGET]].$[dlllib]
429429
#define dest $[install_lib_dir]
430-
$[TAB] cp -f $[ODIR]/$[local] $[dest]/
430+
$[TAB] cp -p -f $[ODIR]/$[local] $[dest]/
431431
#endif
432432
433433
$[install_lib_dir]/$[get_dllname $[TARGET]].lib : $[ODIR]/$[get_dllname $[TARGET]].lib
434434
#define local $[get_dllname $[TARGET]].lib
435435
#define dest $[install_lib_dir]
436-
$[TAB] cp -f $[ODIR]/$[local] $[dest]/
436+
$[TAB] cp -p -f $[ODIR]/$[local] $[dest]/
437437
438438
#if $[and $[build_dlls],$[build_pdbs]]
439439
$[install_lib_dir]/$[get_dllname $[TARGET]].pdb : $[ODIR]/$[get_dllname $[TARGET]].pdb
440440
#define local $[get_dllname $[TARGET]].pdb
441441
#define dest $[install_lib_dir]
442-
$[TAB] cp -f $[ODIR]/$[local] $[dest]/
442+
$[TAB] cp -p -f $[ODIR]/$[local] $[dest]/
443443
#endif
444444
445445
#if $[igatescan]
@@ -458,7 +458,7 @@
458458
$[igatedb:$[ODIR]/%=$[install_igatedb_dir]/%] : $[igatedb]
459459
#define local $[igatedb]
460460
#define dest $[install_igatedb_dir]
461-
$[TAB] cp -f $[local] $[dest]/
461+
$[TAB] cp -p -f $[local] $[dest]/
462462
463463
// We have to split this out as a separate rule to properly support
464464
// parallel make.
@@ -610,7 +610,7 @@
610610
$[install_lib_dir]/$[get_dllname $[TARGET]].lib : $[ODIR]/$[get_dllname $[TARGET]].lib
611611
#define local $[get_dllname $[TARGET]].lib
612612
#define dest $[install_lib_dir]
613-
$[TAB] cp -f $[ODIR]/$[local] $[dest]/
613+
$[TAB] cp -p -f $[ODIR]/$[local] $[dest]/
614614

615615
#end static_lib_target ss_lib_target
616616

@@ -645,7 +645,7 @@
645645
#define local $[TARGET]
646646
#define dest $[install_bin_dir]
647647
$[install_bin_dir]/$[TARGET] : $[ODIR]/$[TARGET]
648-
$[TAB] cp -f $[ODIR]/$[local] $[dest]/
648+
$[TAB] cp -p -f $[ODIR]/$[local] $[dest]/
649649

650650
#end sed_bin_target
651651

@@ -699,13 +699,13 @@
699699
$[install_bin_dir]/$[TARGET].exe : $[ODIR]/$[TARGET].exe
700700
#define local $[TARGET].exe
701701
#define dest $[install_bin_dir]
702-
$[TAB] cp -f $[ODIR]/$[local] $[dest]/
702+
$[TAB] cp -p -f $[ODIR]/$[local] $[dest]/
703703
704704
#if $[build_pdbs]
705705
$[install_bin_dir]/$[TARGET].pdb : $[ODIR]/$[TARGET].pdb
706706
#define local $[TARGET].pdb
707707
#define dest $[install_bin_dir]
708-
$[TAB] cp -f $[ODIR]/$[local] $[dest]/
708+
$[TAB] cp -p -f $[ODIR]/$[local] $[dest]/
709709
#endif
710710
711711
#if $[bin_postprocess_target]
@@ -717,7 +717,7 @@
717717
$[TAB] $[bin_postprocess_cmd] $[bin_postprocess_arg1] $[input_exe] $[bin_postprocess_arg2] $[output_exe]
718718
719719
$[install_bin_dir]/$[bin_postprocess_target].exe : $[output_exe]
720-
$[TAB] cp -f $[output_exe] $[install_bin_dir]/
720+
$[TAB] cp -p -f $[output_exe] $[install_bin_dir]/
721721
#endif
722722
723723
#end bin_target
@@ -850,14 +850,14 @@
850850
$[install_bin_dir]/$[file] : $[file]
851851
#define local $[file]
852852
#define dest $[install_bin_dir]
853-
$[TAB] chmod +x $[local]; cp -f $[local] $[dest]/
853+
$[TAB] chmod +x $[local]; cp -p -f $[local] $[dest]/
854854
#end file
855855
856856
#foreach file $[install_headers]
857857
$[install_headers_dir]/$[file] : $[file]
858858
#define local $[file]
859859
#define dest $[install_headers_dir]
860-
$[TAB] cp -f $[local] $[dest]/
860+
$[TAB] cp -p -f $[local] $[dest]/
861861
#end file
862862
863863
#foreach file $[install_parser_inc]
@@ -866,34 +866,34 @@
866866
#define local $[notdir $[file]]
867867
#define dest $[install_parser_inc_dir]/$[dir $[file]]
868868
$[TAB] mkdir -p $[install_parser_inc_dir]/$[dir $[file]] || echo
869-
$[TAB] cp -f $[local] $[dest]
869+
$[TAB] cp -p -f $[local] $[dest]
870870
#else
871871
$[install_parser_inc_dir]/$[file] : $[file]
872872
#define local $[file]
873873
#define dest $[install_parser_inc_dir]
874-
$[TAB] cp -f $[local] $[dest]/
874+
$[TAB] cp -p -f $[local] $[dest]/
875875
#endif
876876
#end file
877877
878878
#foreach file $[install_data]
879879
$[install_data_dir]/$[file] : $[file]
880880
#define local $[file]
881881
#define dest $[install_data_dir]
882-
$[TAB] cp -f $[local] $[dest]/
882+
$[TAB] cp -p -f $[local] $[dest]/
883883
#end file
884884
885885
#foreach file $[install_config]
886886
$[install_config_dir]/$[file] : $[file]
887887
#define local $[file]
888888
#define dest $[install_config_dir]
889-
$[TAB] cp -f $[local] $[dest]/
889+
$[TAB] cp -p -f $[local] $[dest]/
890890
#end file
891891
892892
#foreach file $[install_py]
893893
$[install_py_dir]/$[file] : $[file]
894894
#define local $[file]
895895
#define dest $[install_py_dir]
896-
$[TAB] cp -f $[local] $[dest]/
896+
$[TAB] cp -p -f $[local] $[dest]/
897897
#end file
898898
899899
#if $[install_py]
@@ -1049,7 +1049,7 @@
10491049
$[install_headers_dir]/$[CONFIG_HEADER] : $[CONFIG_HEADER]
10501050
#define local $[CONFIG_HEADER]
10511051
#define dest $[install_headers_dir]
1052-
$[TAB] cp -f $[local] $[dest]/
1052+
$[TAB] cp -p -f $[local] $[dest]/
10531053
#endif
10541054

10551055
// Finally, the rules to freshen the Makefile itself.

dtool/src/interrogate/interfaceMakerPythonObj.cxx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,15 @@ write_function_instance(ostream &out, int indent_level,
394394
extra_cleanup += " Py_XDECREF(" + param_name + "_long);";
395395
expected_params += "long";
396396

397-
#ifndef USE_PYTHON_2_2_OR_EARLIER
398397
} else if (TypeManager::is_unsigned_integer(type)) {
399-
out << "unsigned int " << param_name;
400-
format_specifiers += "I"; // This requires Python 2.3 or better
398+
out << "PyObject *" << param_name;
399+
format_specifiers += "O";
401400
parameter_list += ", &" + param_name;
402-
#endif
401+
extra_convert += " PyObject *" + param_name + "_uint = PyNumber_Long(" + param_name + ");";
402+
extra_param_check += "|| (" + param_name + "_uint == NULL)";
403+
pexpr_string = "(unsigned int)PyLong_AsUnsignedLong(" + param_name + "_uint)";
404+
extra_cleanup += " Py_XDECREF(" + param_name + "_uint);";
405+
expected_params += "unsigned int";
403406

404407
} else if (TypeManager::is_integer(type)) {
405408
out << "int " << param_name;
@@ -571,11 +574,9 @@ pack_return_value(ostream &out, int indent_level,
571574
indent(out, indent_level)
572575
<< "return PyLong_FromLongLong(" << return_expr << ");\n";
573576

574-
#ifndef USE_PYTHON_2_2_OR_EARLIER
575577
} else if (TypeManager::is_unsigned_integer(type)) {
576578
indent(out, indent_level)
577579
<< "return PyLong_FromUnsignedLong(" << return_expr << ");\n";
578-
#endif
579580

580581
} else if (TypeManager::is_integer(type)) {
581582
indent(out, indent_level)

dtool/src/interrogate/interfaceMakerPythonSimple.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,14 @@ void InterfaceMakerPythonSimple::write_function_instance(ostream &out, Interface
303303
pexpr_string = "PyLong_AsLongLong(" + param_name + "_long)";
304304
extra_cleanup += " Py_XDECREF(" + param_name + "_long);";
305305

306-
#ifndef USE_PYTHON_2_2_OR_EARLIER
307306
} else if (TypeManager::is_unsigned_integer(type)) {
308-
out << "unsigned int " << param_name;
309-
format_specifiers += "I"; // This requires Python 2.3 or better
307+
out << "PyObject *" << param_name;
308+
format_specifiers += "O";
310309
parameter_list += ", &" + param_name;
311-
#endif
310+
extra_convert += " PyObject *" + param_name + "_uint = PyNumber_Long(" + param_name + ");";
311+
extra_param_check += "|| (" + param_name + "_uint == NULL)";
312+
pexpr_string = "(unsigned int)PyLong_AsUnsignedLong(" + param_name + "_uint)";
313+
extra_cleanup += " Py_XDECREF(" + param_name + "_uint);";
312314

313315
} else if (TypeManager::is_integer(type)) {
314316
out << "int " << param_name;
@@ -463,11 +465,9 @@ pack_return_value(ostream &out, int indent_level,
463465
indent(out, indent_level)
464466
<< "return PyLong_FromLongLong(" << return_expr << ");\n";
465467

466-
#ifndef USE_PYTHON_2_2_OR_EARLIER
467468
} else if (TypeManager::is_unsigned_integer(type)) {
468469
indent(out, indent_level)
469470
<< "return PyLong_FromUnsignedLong(" << return_expr << ");\n";
470-
#endif
471471

472472
} else if (TypeManager::is_integer(type)) {
473473
indent(out, indent_level)

panda/metalibs/pandadx7/Sources.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#define BUILD_DIRECTORY $[HAVE_DX]
1+
// DX7 build is temporarily disabled until we bring it up-to-date with
2+
// the new Geom rewrite.
3+
#define BUILD_DIRECTORY
4+
//#define BUILD_DIRECTORY $[HAVE_DX]
25

36
// DIR_TYPE "metalib" indicates we are building a shared library that
47
// consists mostly of references to other shared libraries. Under

panda/metalibs/pandadx7/pandadx7.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
#include "config_dxgsg7.h"
99

10+
// By including checkPandaVersion.h, we guarantee that runtime
11+
// attempts to load libpandadx7.dll will fail if they
12+
// inadvertently link with the wrong version of libdtool.dll.
13+
14+
#include "checkPandaVersion.h"
15+
1016
////////////////////////////////////////////////////////////////////
1117
// Function: init_libpandadx7
1218
// Description: Initializes the library. This must be called at

panda/metalibs/pandadx9/Sources.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#define BUILD_DIRECTORY $[HAVE_DX]
1+
// DX9 build is temporarily disabled until we bring it up-to-date with
2+
// the new Geom rewrite.
3+
#define BUILD_DIRECTORY
4+
//#define BUILD_DIRECTORY $[HAVE_DX]
25

36
// DIR_TYPE "metalib" indicates we are building a shared library that
47
// consists mostly of references to other shared libraries. Under

0 commit comments

Comments
 (0)