22646 Commits

Author SHA1 Message Date
Sam Edwards
c62f3d0d23 CMake: Don't set a default Python version.
A blank string to FindPythonInterp finds the version
of Python that the system "python" interpreter invokes,
so this means the default is now the system default.
2018-05-16 18:14:07 -06:00
Sam Edwards
94937dd432 travis: Fix error reporting on failed builds
Apparently after_script is allowed to fail, so just
run the tests inside script.
2018-05-16 18:05:40 -06:00
Sam Edwards
d96765b957 CMake: Enhance checkPandaVersion.h
This removes the requirement that it only be included
in a single C++ file per library, by forcing the compiler
to emit the function that references the version symbol
as a weak symbol itself.  Now, the linker will not only
tolerate redundant inclusions, it will also coalesce them
together.
2018-05-16 17:38:13 -06:00
Sam Edwards
b08ab6324e CMake: Move panda version logic to dtoolbase 2018-05-16 14:36:31 -06:00
Sam Edwards
9f46d3dc48 CMake: Remove unused LINK_IN_PHYSX 2018-05-15 18:35:22 -06:00
rdb
0bb81a43c9 express: make a thread safe weak pointer implementation (#321)
To access a WeakPointerTo in a thread-safe way, use something like this:

    if (auto ptr = weak_ptr.lock()) {
      ..use ptr as regular PointerTo
    }

The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient.  Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.

The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
2018-05-15 13:40:21 +02:00
Sam Edwards
62e335a801 CMake: Update for upstream changes 2018-05-14 19:20:44 -06:00
Sam Edwards
6efb07de93 Merge branch 'master' into cmake 2018-05-14 19:09:14 -06:00
Sam Edwards
aeeabdbd3b CMake: Move interrogatedb interrogation to p3interrogatedb 2018-05-14 19:07:27 -06:00
Sam Edwards
538c615abe CMake: Light tidying in Interrogate.cmake 2018-05-14 19:07:27 -06:00
Sam Edwards
8e230495a1 CMake: Consolidate "module or static" library logic 2018-05-14 19:07:27 -06:00
Sam Edwards
d2d5e3014c CMake: Generate, don't use, pydtool.cxx 2018-05-14 19:07:27 -06:00
Sam Edwards
47f7d3f297 general: Add headers explaining the renamed config_*.h 2018-05-14 02:36:42 -06:00
Sam Edwards
c81229c1a8 pfmprogs: Rename config_pfm to config_pfmprogs 2018-05-14 02:36:42 -06:00
Sam Edwards
52e7c952b3 putil: Rename config_util to config_putil 2018-05-14 02:36:42 -06:00
Sam Edwards
87c11d8018 pstatclient: Rename config_pstats to config_pstatclient 2018-05-14 02:36:42 -06:00
rdb
6175e79c57 cppparser: fix infinite recursion stack overflow with enum classes 2018-05-06 22:21:24 +02:00
rdb
666591ff48 cppparser: fix compile warnings on MSVC 2018-05-06 22:19:33 +02:00
rdb
ed54856e9f makepanda: don't fail building Windows installer if Pmw is missing 2018-05-06 22:18:30 +02:00
rdb
549301d0f0 putil: keep reference to objects queued for writing
This prevents a crash when a reference counted object is destroyed right after a write_pointer call.

Fixes #310
2018-05-05 23:10:41 +02:00
rdb
8a98bf42a3 general: enable use of tie and tuple on macOS (from TR1, for now) 2018-05-05 23:09:39 +02:00
rdb
71eee6df3f showbase: make iris/fade/letterbox transitions awaitable
This allows using a coroutine to build up a more complex sequence including transitions (eg. scripted cutscene), as well as provide a standard way to register callbacks upon completion of the transition.
2018-05-05 23:05:50 +02:00
rdb
cf58de4d04 showbase: make base.movie() awaitable (by returning a future) 2018-05-05 23:02:11 +02:00
rdb
11e21af52c showbase: fix iris/fade transitions for extreme aspect ratios
Fixes #311
2018-05-05 22:08:52 +02:00
rdb
b45726001e task: fix double free when failing to retrieve coroutine exception 2018-05-05 20:53:04 +02:00
rdb
9db74bca1d task: use consistent ordering for tasks with same sort value
We don't guarantee a specific order in this case, especially because they can be run in either order if there is more than one thread, but it is still useful to have a defined order for single-threaded task chains.  To that end, tasks
are now run in the order in which they were added to taskMgr.add (in absence of any other ordering constraints).

Fixes #309
2018-05-01 15:06:27 +02:00
rdb
3b4d4b0804 glgsg: fix broken upload of downscaled texture without mipmaps
Fixes #306
2018-04-30 19:13:54 -04:00
rdb
f986f8de1b showbase: add back clampScalar and PriorityCallbacks to PythonUtil
These were removed by 88dbb31daa02779405ef5326677eefb5cf93f3c8 under the assumption that they were not used, but it has recently come to my attention that there is still code out there that uses these.

PriorityCallbacks has been updated to be compatible with Python 3 by only comparing the priority, rather than the (priority, callback) tuple. This also has the side-effect of ditching the bisect dependency.

Also moves testing code from the source to the unit tests.
2018-04-21 11:43:46 +02:00
Donny Lawrence
574000aedd Add getter and setter for Content-Type header
Fixes #296
Closes #305
2018-04-21 11:20:18 +02:00
deflected
1ac351d594 bullet: Allow intractions with bullet world during tick callbacks
- Release the global lock during the user tick callback
        and allow interactions with bullet world
        - Acquire the lock again after the callback

Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-04-20 21:29:08 +03:00
rdb
e6e39cce0e bullet: fix deadlock in get_manifold 2018-04-20 12:51:26 +02:00
rdb
fc172f8918 tests: fix unit test on 32-bit Ubuntu due to float imprecision 2018-04-20 12:48:26 +02:00
Sam Edwards
5f0a390b8f travis: Always use system 'virtualenv' command for venvs 2018-04-20 03:22:45 -06:00
Sam Edwards
cca5b910dc travis: Correct version of Python 3 in use
Travis-CI environment only has Python 3.4 available, not 3.5.
2018-04-20 02:32:22 -06:00
Sam Edwards
95785407a3 CMake: General whitespace fixes
- Remove trailing whitespace from ends of lines
- Convert tabs to (two) spaces
2018-04-20 02:30:04 -06:00
Sam Edwards
1fcb8a2748 CMake: Skip optional subdirectories in a cleaner way
Instead of wrapping the whole subdirectory's CMakeLists in
a gigantic if block, we use if(NOT HAVE_FOO) + return()

This is tidier since it keeps the indentation generally consistent
across all CMakeLists files.
2018-04-20 02:26:47 -06:00
Sam Edwards
56a6e6a80a Merge remote-tracking branch 'origin/master' into cmake 2018-04-20 01:57:46 -06:00
Sam Edwards
5beaeb0f66 travis: Fix Python version selection
Apparently this is only respected by Travis if 'language' is set
to 'python'
2018-04-20 01:53:36 -06:00
Sam Edwards
d9e769f656 travis: Practically rewrite .travis.yml
- Make the build matrix actually run as a matrix
  - Add a few exclusion rules to turn off some of the
    more esoteric cases.
- Install libav, to test that p3ffmpeg builds
- Don't do a makepanda build at all on this branch
- Simplify uses of Python
- Change indentation style; no indentation for nested lists
2018-04-20 01:15:44 -06:00
Sam Edwards
5b3ca1bb05 CMake: Fix up the "transitive library" metalib logic
This fixes some cases where transitive libraries, as nominated
by a component library, were not being absorbed into a metalib,
due to the library actually not being defined yet. This makes the
logic a little more robust, first by explicitly requiring a metalib
definition to come after all component library definitions, and second
to assume a library "linked" to a component library is a non-component
if it isn't defined (yet).
2018-04-20 00:20:14 -06:00
Sam Edwards
570afa6973 CMake: Fix include path when building prc into metalib 2018-04-19 20:06:09 -06:00
Sam Edwards
218d0e8ade CMake: Build dtool metalibs as metalibs 2018-04-19 00:07:08 -06:00
Sam Edwards
5a31844e11 CMake: Slightly tweak component-library -D inheritance rules
This only inherits -D flags from another component library. The private
-D flags should not be inherited from regular libraries.
2018-04-19 00:07:08 -06:00
Sam Edwards
29799643e0 CMake: Move source file accidentally counted as a header 2018-04-18 16:58:20 -06:00
Sam Edwards
4cec331722 CMake: Add support for building metalibs as metalibs 2018-04-18 14:42:56 -06:00
Sam Edwards
655e661035 CMake: Minor typo fix 2018-04-18 14:38:59 -06:00
Sam Edwards
7590c37f0c CMake: Have Interrogate respect INTERFACE_COMPILE_DEFINITIONS
This commit isn't technically quite right, since Interrogate should
use the definitions from COMPILE_DEFINITIONS but the module should
be built with INTERFACE_COMPILE_DEFINITIONS, but whatever. That can
be changed if it becomes a nuisance later on.

The rationale here is it's consistent with how CMake treats these
two properties.
2018-04-18 12:23:18 -06:00
rdb
4877e8350d tests: fix unit test on 64-bit Ubuntu due to float imprecision
[skip ci]
2018-04-18 18:25:29 +02:00
Sam Edwards
d642ca4fa0 CMake: Change linkages to go through metalibs
This changes the target_link_libraries() declarations so they only
go directly to a component library if it's in the same metalib.

If it's outside of the metalib, the correct thing to do is link against
the metalib. CMake takes care of the transitive linking for us, so
there isn't actually any big change here.
2018-04-15 01:10:21 -06:00
Sam Edwards
c0b8b3c542 CMake: Interrogate bugfix for LINK and IMPORT keywords together 2018-04-15 00:35:49 -06:00