Commit graph

1338 commits

Author SHA1 Message Date
Kp 78d4a36bb4 Explicitly require support for C++11 constructor inheritance
Parts of the code already used the C++11 syntax, so compilers without it
were already unsupported.  Expand the remaining uses to the standard
syntax.
2022-01-09 15:25:42 +00:00
Kp d2478d0708 Require support for C++17 attribute [[fallthrough]] 2022-01-09 15:25:42 +00:00
Kp d8cc2fd363 Factor out definition of __get_found_includes
This does not need to be a local function.  It does not need to access
anything from the containing scope, so move it to be a static method on
the class.
2022-01-07 04:26:22 +00:00
Kp 6ac75cd618 Construct compilation database earlier
This must be set up before trying to register check_header_includes
targets.
2022-01-07 04:26:22 +00:00
Kp bc6d043f5d Extend SConstruct compilation_database support to cover Program()
This is not required by clang, but should be useful for anyone who wants
to produce a machine-readable list of all the compile commands run for
building the program.  Previously, compilation_database would describe
how to build object files from sources, but not how to link those
objects.
2022-01-07 04:26:22 +00:00
Kp 0d9f2d1136 Move GL_SILENCE_DEPRECATION from CXXFLAGS to CPPDEFINES 2021-12-23 03:21:26 +00:00
Kreeblah 522acbf398
Updated enums and added define to silence deprecation warnings 2021-12-22 13:45:35 -08:00
Kp 14891bd5af Merge branch kreeblah/macos-sign-app into master
Requested-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/issues/611>
2021-12-18 19:29:31 +00:00
Kp 52256223da Pass bundledir via a local, not a property on self 2021-12-18 03:22:09 +00:00
Kp a7f2d0a751 Change default build output directory to build/ 2021-12-17 03:14:54 +00:00
Kreeblah d39d043692
Switch password auth to use an environment variable, to avoid printing it in the SConstruct logs 2021-12-14 21:01:28 -08:00
Kreeblah 5a7d09ec41
Fixed test 2021-12-12 16:21:02 -08:00
Kreeblah 9d328ed620
Added test for if bundledir is None 2021-12-12 16:17:22 -08:00
Kreeblah e640a2116d
Reused bundledir 2021-12-12 16:09:07 -08:00
Kreeblah b696a63190
Updated to pass in binary name instead of using glob 2021-12-12 16:04:31 -08:00
Kreeblah f97d553013
Updated messages 2021-12-12 15:53:41 -08:00
Kreeblah 8d0aa0c6a8
Initial changes from feedback 2021-12-12 15:45:28 -08:00
Kreeblah a5cd62e877
Updated to working SConstruct implementation 2021-12-11 20:42:55 -08:00
Kreeblah 91232cbb01
First pass for code signing and notarization for Macs 2021-11-08 23:27:27 -08:00
Kp f99ba91998 Pass user $PATH to Command() for dylibbundler
On some systems, such as the Apple M1 (ARM-based Macs),
dylibbundler is in $PATH, but not in a directory found by the limited
path that SCons uses for Command() invocations.  This causes the SConf
test to succeed (because it uses the full $PATH), but the Command() to
fail (because it uses a reduced path).  Fix this by using the user's
$PATH, if defined, for this Command() invocation.

Along the way, rework tool_bundle.py to use SCons' Node() objects in
place of direct path manipulation.  This lets SCons produce better error
messages in some cases.

Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/pull/610>
2021-11-08 01:53:05 +00:00
Kreeblah 9a14d734bb Added message for library bundling step 2021-11-06 21:28:36 +00:00
Kreeblah 13d3af3123 Made dylibbundler an optional step 2021-11-06 21:28:36 +00:00
Kp d604518563 Change SConf tests not to generate consecutive underscores 2021-11-04 03:24:43 +00:00
Kp 23f03d0a5e Add unit tests for partial_range 2021-09-04 12:17:14 +00:00
Kp 0f4c9f240e Make some SConstruct output respect SCons' -Q option 2021-08-26 03:13:45 +00:00
Kp 86e8e1d4f9 Remove Python2 dict compatibility symbols
Switch to calling the methods directly on the dict instances.  This
eliminates use of a global variable at each call site.
2021-06-28 03:37:51 +00:00
Kp f1606f7747 Simplify test for __builtin_bswap16
This test covered __builtin_bswap32 and __builtin_bswap16 separately,
because it was written to support gcc versions that predated the
introduction of __builtin_bswap16.  The minimum supported gcc version
now understands both intrinsics, so simplify the test to cover all three
at once.
2021-06-28 03:37:51 +00:00
Kp e1aac6949a Replace __attribute_warn_unused_result with C++17 [[nodiscard]]
This eliminates a configure test, and may help readers understand the
annotation more readily.
2021-06-28 03:37:51 +00:00
Kp 770ae0cea5 Replace __attribute_noreturn with C++11 [[noreturn]]
This eliminates a configure test, and may help readers understand the
annotation more readily.
2021-06-28 03:37:50 +00:00
Robert Menes c630191c29
Add Haiku as a built host option 2021-06-01 13:37:30 -04:00
Kp e226623ebe Fix advice in dylibbundler error path
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/pull/591#issuecomment-841927157>
2021-05-18 03:00:48 +00:00
Kp e75cff028f Rework dylibbundler test
- Add support for a sequence of guard predicates for a test, rather than
  limiting to a single predicate.
- Use that support to skip the dylibbundler test when
  user_settings.macos_add_frameworks makes the test unnecessary.
- Use StaticSubprocess to avoid running dylibbundler repeatedly if
  building multiple targets for which the test is necessary.
- Capture stderr from the child process, and log it, instead of letting
  it be written directly to the stderr inherited from the caller of
  SCons.
- On failure, write to the SConf log the return code of dylibbundler,
  its stdout, and its stderr.  This may help users diagnose the problem
  if it is more complicated than the tool not being installed.
- On failure, show a more direct suggestion about how to avoid needing
  dylibbundler.
2021-05-16 23:15:14 +00:00
Kp ad4fb29920 Use super() in SConstruct to avoid repeating parent class names 2021-05-16 23:15:14 +00:00
Kp 88ff96f49e Change SConstruct classes not to inherit from object
This is not necessary in Python3, and Python2 is no longer supported.
2021-05-16 23:15:14 +00:00
Kreeblah 6b5ff851a3 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah 5afd1d8e53 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah ef9c9a3b29 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah d9d1f5c0db Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah 25556fa120 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah d82c52539c Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah 66fe76b0c2 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah 14562e74b3 Added test for dylibbundler on macOS 2021-05-16 23:15:11 +00:00
Kreeblah fb73b7fb8f
Tested on a fresh install and this needs to put dylibs in libs, not Frameworks 2021-03-29 23:19:32 -07:00
Kreeblah b7ff72c364
Embed dylibs in app bundles 2021-03-26 02:07:06 -07:00
Kp 791282aad7 Read physfs location from pkg-config
For consistency with other packages, ask pkg-config for the location
instead of assuming it is on the system search path.
2021-02-07 00:35:33 +00:00
Kp b0338164f7 Remove SDLMain.m
According to @raptor, this is not needed on modern OSX for SDL1 or SDL2,
and breaks the build on SDL2.  Remove it.

Reported-by: raptor <https://github.com/dxx-rebirth/dxx-rebirth/issues/565>
2021-02-06 17:53:53 +00:00
Kp ac97d00698 Remove support for PhysFS 1, PhysFS 2
The last PhysFS 1 release was in March 2009.  The last PhysFS 2 release
was in August 2017, shortly before the release of PhysFS 3 in September
2017.  Most distributions have moved to PhysFS 3.  Drop support for
PhysFS 1 and PhysFS 2.  PhysFS 2 support could be restored if there is
interest.
2020-12-27 22:03:09 +00:00
Kp 6af0595cfe Use platform-specific OpenGL libraries for GLU test 2020-10-28 04:02:31 +00:00
Kreeblah a36f6866da
Fixed macOS compilation by bypassing GL library check 2020-09-13 22:35:22 -07:00
Kp b40b48e6f9 Merge branch 'experimental/540/macos-no-framework' into master 2020-09-14 03:42:24 +00:00