Commit Graph

995 Commits

Author SHA1 Message Date
Sam Edwards 9b7bcf2564 Merge branch 'master' into cmake 2019-11-07 21:21:04 -07:00
rdb a72be90f17 Merge branch 'release/1.10.x' 2019-10-29 23:13:22 +01:00
fireclawthefox b3c79096e5 distributed: fix division exception in ServerRepository
change operator to double slash for integer division

Closes #762
2019-10-29 20:47:48 +01:00
rdb f149fb4ab0 direct: big formatting changes for the benefit of API reference
Part of the effort to move the API reference to Sphinx, see panda3d/panda3d-docs#21
2019-10-29 20:43:41 +01:00
Sam Edwards fe7fdc0976 CMake: Reclassify direct/distributed/ headers as installed headers 2019-09-16 17:43:03 -06:00
Sam Edwards 5fa4af9189 CMake: Rely on GNUInstallDirs to specify install paths
This makes multiarch OSes happy as they can dictate that
64-bit libraries go into 'lib64'
2019-08-31 00:48:42 -06:00
Sam Edwards 1a654cba04 CMake: Record the location that headers are installed
This populates INTERFACE_INCLUDE_DIRECTORIES on the targets
after they're installed.
2019-08-30 22:58:18 -06:00
Sam Edwards 855d217f35 CMake: Update for upstream changes
- Miles is gone; remove all references
- pystub is gone; remove all references
- dcparser uses Interrogate extensions properly; don't depend on Python
- stringStream* moved to express from downloader
2019-08-24 18:07:22 -06:00
Sam Edwards 19ed9f6b47 Merge branch 'master' into cmake 2019-08-24 18:07:12 -06:00
Sam Edwards 6c3013a29c dcparser: move Python-specific code to extension files
We can now build dcparser without linking to Python and dcparse.exe's dependency on pystub is removed.

Co-authored-by: rdb <git@rdb.name>
2019-08-23 18:58:19 +02:00
Sam Edwards 36df3bdf0b dcparser: Delete dcPython.h
py_panda.h has the same purpose; we also don't want
Python.h brought in from the headers (only from the
.cxx files) so that including the headers won't require
linkage against Python.
2019-08-23 13:15:36 +02:00
Sam Edwards 31c9a88dcf CMake: Ugh, just give p3distributed a dummy .cxx instead
Windows won't even create the .lib unless there's at least one
source file. Whatever, this is easy to do.
2019-08-15 16:47:55 -06:00
Sam Edwards 1bd15dad60 CMake: Manually set p3distributed's linker language
It doesn't contain any source files anymore (see last commit),
so for non-metalib builds, this is necessary for CMake to
understand how to invoke the linker/archiver.
2019-07-10 15:39:46 -06:00
Sam Edwards e3cd658642 CMake: C++ code in direct.distributed should be an extension
This code is so heavily dependent on Python (and makepanda
doesn't even build it into libp3direct) that we shouldn't
even try to put it in the libp3direct library ourselves.
2019-07-07 16:09:52 -06:00
Sam Edwards 6097d34ead CMake: Neatly format everything for readability and consistency 2019-04-14 22:37:18 -06:00
Sam Edwards 3b194c75e4 Merge branch 'master' into cmake 2018-12-28 22:15:44 -07:00
rdb e4f493b872 dcparser: use vector_uchar for blobs, step towards Python 3 compat
Closes #298
2018-12-19 12:45:32 +01:00
Sam Edwards 99fee1a64d CMake: Assign COMPONENT and EXPORT to all targets 2018-12-06 17:48:44 -07:00
Sam Edwards a6877a6def Merge branch 'master' into cmake 2018-11-03 22:55:13 -06:00
rdb 5ac3cf3fc6 Eliminate C++ DConfig; replace it with a Python compatibility shim 2018-11-02 23:27:07 +01:00
Sam Edwards f1c5352cc1 CMake: Remove redundant target_compile_definitions(WITHIN_PANDA)
This is no longer needed since they should now propagate from
dcparser automatically.
2018-10-13 15:07:09 -06:00
Sam Edwards 1520d712d4 CMake: Remove target_use_packages
Instead, let's use a PKG::PKGNAME interface library, which simplifies
the linking and also allows us to use imported libraries from
find_package in the future.
2018-09-21 10:17:05 -06:00
Sam Edwards 208ecd6708 Merge branch 'master' into cmake 2018-09-02 16:06:41 -06:00
Sam Edwards fa1e1a2e63 CMake: Tidy up installation directory
Don't install "object-Configuration/" directories when
using metalibs, and also put .dll files in bin/ on Windows.
2018-09-01 11:07:55 -06:00
Sam Edwards 4695557a5d general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
rdb b1d2111037 express: add Datagram add_blob and add_blob32, et al.
This is for writing Python 2/3 agnostic code for writing binary data to a datagram, and reading from it using DatagramIterator.
2018-08-19 16:01:39 +02:00
Sam Edwards 2ab77d9a27 Merge branch 'master' into cmake 2018-08-14 21:59:45 -06:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
Sam Edwards c4126942f6 Merge branch 'master' into cmake 2018-06-10 02:29:21 -06:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards 592a2e2d68 Merge branch 'master' into cmake 2018-06-06 13:18:12 -06:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
rdb 6b726fa697 general: fix various compiler warnings and issues exposed thereby 2018-05-30 11:09:35 +02: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 4cec331722 CMake: Add support for building metalibs as metalibs 2018-04-18 14:42:56 -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
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
rdb e9ae7dcc40 Use vector_uchar instead of string for binary network/file data
This distinction allows us to better support Python 3, since it will raise exceptions when trying to put arbitrary binary data in a str object.

This also adds some convenience functions for efficiently initializing a Datagram or PTA_uchar from a vector_uchar.
2018-04-02 23:17:14 +02:00
Sam Edwards 449195a33d CMake: Define appropriate BUILDING_ symbols 2018-03-31 04:24:06 -06:00
Sam Edwards 25b13ad199 Merge branch 'master' into cmake 2018-03-31 04:23:49 -06:00
Tohka 0b1ad67e13 distributed: Fix DC file reading regression (#295) 2018-03-31 04:01:35 -06:00
Sam Edwards 9dd37e9dbc general: Add guards to ensure proper BUILDING_ macros defined
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
Sam Edwards f231ba4cd7 directbase: Introduce BUILDING_ defines for each component
Ditto everything before, but for direct.
2018-03-25 13:17:52 -06:00
Michael Wass b10ee32752 direct: Fix some more NameErrors
Closes #274
2018-03-08 11:44:04 +01:00
Sam Edwards ac8417ffdf distributed: `type(x) == types.FooType` -> `inspect.isfoo(x)`
This is more compatible across Python 2 vs. 3.

[skip ci]
2018-03-04 15:28:39 -07:00
Sam Edwards df0c889092 distributed: Fix the import test (and syntax on Python 3) 2018-02-23 19:53:13 -07:00
Sam Edwards b72d1c198f distributed: Fix the import test (and syntax on Python 3) 2018-02-23 19:52:48 -07:00
Sam Edwards dfed8d2100 Merge branch 'master' into cmake 2018-02-23 17:49:32 -07:00
Sam Edwards f76b8a6ad8 distributed: Replace the OTP protocol format with Astron's
Again, all this does is affect the 4-years-disused OTP system, leaving
the CMU system entirely untouched.

This changes the packet formatting in several of distributed's helper
classes.
2018-02-23 16:45:50 -07:00