Commit graph

1296 commits

Author SHA1 Message Date
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
Kp f0d3523128 Integrate MacOS no-framework mode into the general argument parser 2020-09-13 21:41:35 +00:00
Kp 969caa8c0c Add configure test to check for usable GL utility library
Rebirth built with OpenGL has a hard dependency on the GL utility
library, but did not have a configure time test to report this.  Add
one.

Reported-by: shoober420 <https://github.com/dxx-rebirth/dxx-rebirth/issues/468>
2020-09-11 03:08:02 +00:00
Kreeblah a4a977e9bc
Added scons option to use libraries instead of frameworks on macOS 2020-09-08 23:37:47 -07:00
Kp 0b141ea122 Show CHOST in show_partial_environ
This can influence other values, so it is useful to see it directly.
2020-08-16 00:43:12 +00:00
Kp 3a9bdbfa6e Use __slots__ for cached_property
Remove the redundant storage of the method's name, since it is only read
once in the getter.
2020-06-15 00:21:35 +00:00
Kp 17b9edcd47 Enable -Wredundant-decls when possible
Add an inclusion of <SDL.h> since, for Windows targets, this triggers a
chain of includes that leads to <intrin.h>, which causes
-Wredundant-decls to print a diagnostic.  This allows Windows targets to
declare -Wredundant-decls as unusable, while enabling it for non-Windows
targets.
2020-05-31 23:04:25 +00:00
Kp 3114874713 Delegate PCX loading to SDL_image
This adds a new dependency, but most systems likely already have
SDL_image installed.  Use of SDL_image can be disabled, but this is
discouraged, because various in-game interfaces assume the use of the
original background.

The old implementation automatically corrected for filename case.  The
new implementation expects that the supplied filename can be passed to
PYHSFS_openRead as-is.  All known uses in-game have been corrected to
satisfy this requirement.  If the new stricter match requirement becomes
a problem, a variant of PHYSFSRWOPS_openRead that adjusts filename case
could be created for use here.

- Update install instructions
- Update ebuild
- Update Arch PKGBUILD
2020-05-17 23:35:26 +00:00
Kp f577788665 Use C++17 fold expressions to simplify serialization code 2020-05-17 23:35:25 +00:00
Kp 9ed64013bc Decorate SConf C++ standard tests
Add per-test comments to ease identifying which test is responsible for
a given section.
2020-05-17 23:35:25 +00:00
Kp 6a4a8a62c9 Add unit tests for serialization code 2020-05-17 23:35:25 +00:00
Kp 619ac0abff Use structured bindings for enumerate+zip 2020-05-02 21:18:43 +00:00
Kp ea0f4eb02a Use C++17, not C++14
This only changes the version of the standard used.  It does not
introduce use of new functionality.
2020-05-02 21:18:43 +00:00
Kp 3ce1f2b3ed Require support for C++11 addressof 2020-05-02 21:18:43 +00:00
Kp 3add38df3d Require support for C++14 std::make_unique 2020-05-02 21:18:42 +00:00
Kp cc38cdf4b8 Qualify uses of std::make_unique 2020-05-02 21:18:42 +00:00
Kp 8839f538e0 Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp 9cee93abb1 Require support for C++14 std::exchange 2020-05-02 21:18:42 +00:00
Kp e4323bf192 Fix gcc-7 build
The existing test for gcc pr #82541 was insufficient, and allowed using
-Wduplicated-branches with gcc-7 in some cases it should not.  Extend
the test to cover these cases.
2020-05-02 21:18:42 +00:00
Kp f0a47c358b Tell clang that GNU extensions are fine in GNU++14 mode 2020-04-28 04:09:47 +00:00
Kp 49138117e4 OSX: log FRAMEWORKPATH, FRAMEWORKS from the construction environment 2020-04-26 17:26:23 +00:00
Kp 03318382d0 Only search for frameworks in directories that exist
mmontag reported that the OS X linker warns when attempting to search a
framework directory that does not exist.  Suppress this warning by
checking for the directory and not adding it to the search path if it
does not exist.

Reported-by: mmontag <https://github.com/dxx-rebirth/dxx-rebirth/issues/503#issuecomment-619457491>
2020-04-26 17:26:23 +00:00
Kp a6590fa496 Update SConstruct test for -Wold-style-cast on OS X
mmontag reports that <HIServices/Processes.h> is no longer available,
and the change from 15b0ec7f42 needs to be
applied to SConstruct as well.

Reported-by: mmontag <https://github.com/dxx-rebirth/dxx-rebirth/issues/503#issuecomment-619463994>
2020-04-26 17:26:23 +00:00
Kp b396445efa Require support for std::index_sequence, std::make_index_sequence
The minimum supported compiler versions now provide a depth-efficient
implementation of std::make_index_sequence, which removes the last
reason to carry a private implementation.  In the case of clang, it
appears to have a special compiler intrinsic used to implement its
std::make_index_sequence.

Switch to the compiler-provided version for both gcc and clang.
2020-04-26 17:26:23 +00:00
Kp 238f529ff4 Clean generated PCH headers
Initialize PCHManager on the clean path, so that the generated headers
are reported to the SCons core.
2020-04-19 20:47:07 +00:00
Kp 7d3f4333be Require support for C++14 template variables 2020-04-19 20:47:07 +00:00
Kp f9b90d4e8c Raise minimum required gcc version to gcc-7
gcc-4.9 support is now difficult to test due to system libraries linking
to newer symbols.  gcc-4.9 is unsupported upstream, as are gcc-5 and
gcc-6.  Raise the minimum required gcc version to the minimum version
supported upstream.

Debian Jessie shipped gcc-4.9.2, and support for this target was the
primary motivator for retaining gcc-4.9 support.  Jessie ended regular
support in June 2018, and will end Long Term Support in June 2020.  It
seems unlikely that Jessie would receive a snapshot build of Rebirth in
the months it has left.

Debian Stretch shipped gcc-6, but is currently considered "oldstable"
and has been superseded by Debian Buster.  Further, Debian Stretch
provides a package for gcc-7, so Stretch users can still build Rebirth
using only packages available from the package manager.
2020-04-19 20:47:07 +00:00
Kp aaaf212dca Add unit test for zip iterator 2020-02-26 05:07:34 +00:00
Kp 8997b5c801 Fix check_header_includes for Python 3 2020-02-11 04:48:14 +00:00
Kp b6e782d128 Add unit tests for xrange 2020-02-01 22:33:31 +00:00
Kp 8fcbb893b7 Rewrite guessed git commit: s/-/_/
In exported archives, the commit will be
`archive-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` for some hexadecimal
characters `x`.  `-` is not valid in a C identifier, but the commit
needs to be a valid C identifier.  Change `-` to `_` so that it will be
valid.

Reported-by: andrew-strong <https://github.com/dxx-rebirth/dxx-rebirth/issues/484>
Fixes: fafa07a456 ("Instruct git-archive to insert a commit ID in SConstruct")
2020-01-04 22:24:25 +00:00
Kp fafa07a456 Instruct git-archive to insert a commit ID in SConstruct 2019-12-29 22:24:20 +00:00
Kp 4a47e27f08 Apply .decode() to various objects that are embedded in vers_id
Python 2 byte sequences look best when not decoded.  Python 3 byte
sequences look best when decoded.  As Python 2 is near end of life and
most distributions have moved on to Python 3, switch to the style that
looks better in Python 3.  The code still runs in Python 2, but produces
a u'' wrapper around the text because the type is `unicode` in Python 2,
but `str` in Python 3.  This change eliminates the b'' wrapper around
the text in Python 3.
2019-12-29 22:24:20 +00:00
Kp e2a108bbf5 Use base32 instead of base64+extended-identifiers
Extended identifiers have proved to cause more problems than they solve.
Switch to base32 which, while less commonly supported, is available in
Python and uses an alphabet that is almost a subset of the C identifier
alphabet.  Padding characters are still a problem, but can be remapped
to a valid C identifier that is not a valid base32 character.
2019-12-29 22:24:20 +00:00
Kp e20152da11 Remove -Wredundant-decls from the default options
This is primarily a developer option, and it conflicts with some Windows
toolchains that choke on their own headers.  Remove it from the default
options, and rely on developers to set it locally.

Reported-by: AlumiuN <https://github.com/dxx-rebirth/dxx-rebirth/issues/473#issuecomment-554935866>
2019-12-28 21:26:37 +00:00
Kp cc144647b5 Make kconfig.ui-table.cpp compile when freestanding
Special macros are used to pass information to
`generate-kconfig-udlr.py`.  Provide default definitions for these
macros in `kconfig.ui-table.cpp`, and override them in the one build
where they need to be special.  This enables `kconfig.ui-table.cpp` to
build cleanly when invoked from the command line in the compilation
database.
2019-12-22 05:34:08 +00:00
Kp 065bcb3da8 Escape more characters when quoting for the command line
Inserting the compile command for vers_id.cpp into a compilation
database does not quote a string with embedded whitespace, although this
string is correctly quoted when used to invoke a shell.  Remove
whitespace from the character whitelist, so that it is always escaped.
2019-12-17 05:01:38 +00:00
Kp c8c5ed9b86 Merge branch osx-build into master
This change was proposed by an external user as a claimed fix for a
failure to build.  This change has not been tested by the core team.
However, it is a simple change and at worst will break the build.

The change is based in part on advice from recurring contributor
@MaddTheSane.  Neither @MaddTheSane nor @kreatordxx have commented on
the correctness of these changes, though the original author of the
commit, @Sottises, is listed as the origin of the most recent prebuilt
OS X package offered from
<https://www.dxx-rebirth.com/download-dxx-rebirth/>.

Reported-by: Sottises <https://github.com/dxx-rebirth/dxx-rebirth/issues/455>
2019-11-16 22:46:48 +00:00
Kp 2bedba0a2c Only register win32/rbaudio.cpp for Win32/SDL2
Instead of preprocessing out the file for SDL1, skip trying to build it.
2019-10-28 00:45:34 +00:00
ziplantil b38f99d7ce modify SConstruct to handle target platform; fix track finish detect code 2019-10-27 14:53:48 +02:00
ziplantil 2c5ab8e739 initial version of this, trying to catch MCI events 2019-10-27 02:47:45 +03:00
Christian Beckhäuser 2cf0085b1d Removed SDL and SDLmain as default libs for Win32/MinGW, fixing SDL2 build on Windows (SDL1.2 build is not broken by this change). 2019-10-24 09:54:00 +02:00