Detect and install deps for Fedora Linux in ./installdeps . On 64 bit
intel hosts install both 32 and 64 bit dev libs. Also update README.md
to note that Fedora is supported.
MISC: add nasm to all dep lists for various dists
Make a nice table for CMake options, add a note on making debug vs.
release builds, add nasm to list of deps, add a note in MSys2 notes
about lack of debug console messages.
Only allow running ./installdeps if $MSYSTEM is MINGW32 or MINGW64, that
is, the user started a MINGW 32 bit or 64 bit shell and **NOT** an MSYS
shell.
Use the value of $MSYSTEM to determine if 32 bit or 64 bit target deps
should be installed.
Update usage() text to reflect this.
MISC: rename generic_build_instructions() to build_instructions() .
Fix all cmake issues related to building for win32 with mxe.
Add support for ./installdeps win32 on Debian/Ubuntu using the mxe apt
repository.
Details:
* default to ENABLE_LTO=OFF on mxe
* set SFML_STATIC_LIBRARIES=TRUE on mxe
* fix the libintl/gettext checking logic
* fix the git dependencies submodule checking logic, and check that it
triggers for mxe
* revert FindSFML.cmake to upstream version, works fine with mxe
* make 'win32' an alias for the 'MinGW-w64-i686' target for
./installdeps, add support for mxe apt repository for Debian/Ubuntu
* change bin2c related cmake code to compile the tool on the host always
even when cross-compiling
* copy src/win32/res/VBA.ico to src/wx/icons since src/win32 has been
removed
TODO: generic mxe installer for other unix-likes
Remove "PATH_SUFFIXES include" in the FIND_PATH(SFML_INCLUDE_DIR ...)
call in FindSFML.cmake, this has fixed cross-compiling issues with
FindOpenAL.cmake and FindSDL2.cmake already.
On e.g. Windows WXK_RAW_CONTROL == WXK_CONTROL so having both in a
switch statement is compile-time error, so wrap the checks for
WXK_RAW_CONTROL in an #ifdef __WXMAC__ .
Fix using modifier keys such as SHIFT or CONTROL by themselves as game
keys.
Modifier keys are sent as a special keycode e.g. WXK_CTRL along with the
modifier flag, however on key release the keycode is sent but the
modifier flag is not. So check for modifier keys in process_key_press()
and always set the modifier flag so that release events are recognized
correctly.
Fix support for RAW_CTRL on Mac (which is the real control, while the
Command key is mapped to CTRL.)
Also disable the debug message emitted by wX when our modifier-only key
parsing code runs.
TODO: map modifier key names on Mac to the actual keys rather than the
wX names such as RAWCTRL.
In wX 3.1+ the behavior of wxAcceleratorEntry::ToString() and
wxAcceleratorEntry::FromString() has changed and the resulting string
can no longer round-trip through these methods.
Use a lookup table based on an internal data structure from the wX
source code to translate the "display name" of some keys to the regular
"name" as a workaround for now.
This allows at least the default keybindings to work and not throw an
error on startup.
TODO: standalone modifiers as game keys are still broken.
Some sizeritems in horizontal box sizers had the wxALIGN_RIGHT flag,
which makes no sense in horizontal sizers, since they allow only
aligning things vertically. This was throwing XRC errors on startup.
Remove the erroneous wxALIGN_RIGHT flags from the XRC.
Allow selecting target for MSYS2 deps.
For Arch cross builds, do not run yaourt if all deps are already
satisfied.
For Mac Homebrew, only install formulae that do not already have some
version installed, otherwise if the user has a non-default version (such
as --HEAD) the script will error out.
Refactor ./installdeps and add support for mingw-w64 cross builds on
Arch Linux. The latter does not work currently because of a bug in
libuuid in the mingw-w64 crt, and the wxmsw AUR package does not build.
This will hopefully be resolved soon.
Put a copy of FindOpenAL.cmake into our own CMakeScripts/ because
searching for include files with PATH_SUFFIXES of include/ does not work
for cross builds, as it is done in the system version.
Add a more general purpose ./installdeps script to replace
./installdeps-msys2 that handles: Debian Linux, Arch Linux, MSYS2+MinGW,
Mac Homebrew, MacPorts and Fink for Mac. More OSes and distributions
will be added in the future, and the script may be generalized for use
in other projects.
Move Mac package manager setup code into MacPackageManagers.cmake and
greatly improve it. Handles Homebrew, MacPorts and Fink correctly.
Minor tweaks for FindSDL2.cmake: better include dir searching that works
on cygwin, fix flags for MinGW, and quiet pkg-config program errors.
Add MinGW cross-compilation toolchain files, they can be specified on
the cmake command line with:
-DCMAKE_TOOLCHAIN_FILE=../CMakeScripts/Toolchain-cross-MinGW-w64-i686.cmake
or
-DCMAKE_TOOLCHAIN_FILE=../CMakeScripts/Toolchain-cross-MinGW-w64-x86_64.cmake
these work for Cygwin and should work for MinGW on Linux as well.
Implement a Quartz 2D (aka Core Graphics) output renderer for the Wx
interface as a subclass of BasicDrawingPanel called
Quartz2DDrawingPanel.
Split BasicDrawingPanel's DrawArea() into DrawArea() and DrawImage(),
with DrawImage() receiving both the wxPaintDC and the wxImage, the
wxImage is created with a direct pointer to the frame buffer when
possible (24bpp).
Implement Quartz2DDrawingPanel in macsupport.mm based on the code here:
http://www.cocoabuilder.com/archive/cocoa/309165-how-to-quickly-paint-to-cocoa-view-from-bitmap-in-memory.html
and here:
http://stackoverflow.com/questions/2261177/cgimage-from-byte-array
the GetData() method of wxImage is used to avoid copying the frame
buffer.
Add RND_QUARTZ2D to the renderers enum and update all config stuff and
the XRC to support it. As well as the DrawingPanel instantiation code in
GameArea::OnIdle().
I'm not sure if this was changed in cmake recently, but "SYSCONFDIR" is incorrect. It should be SYSCONF_INSTALL_DIR.
As well CMAKE_INSTALL_PREFIX refers to /usr or /usr/local in linux, so installing it into ${CMAKE_INSTALL_PREFIX}/${SYSCONFDIR} would be incorrect. I've wrapped it in the existing IF( WIN32 ) to preserve the installation for windows, a window dev should fix that if it's incorrect.
Add ENABLE_LTO cmake option that defaults to ON except on GCC building
for AMD64 on Win32.
Also set the cmake variables AMD64 or X86_32 when one of these
architectures is detected.
Add support for Link Time Optimization (LTO) on gcc and Clang.
Link libssp only when it is on the system, some toolchains like Ubuntu's
do not require explicitly linking to libssp. On Win32 try to link it
statically.
In debug builds with GCC, use -ggdb3 -Og, otherwise use -g .
Two new cmake modules were written for this:
* FindSSP.cmake -- this is for finding libssp on the system.
* UseGCCBinUtilsWrappers.cmake -- this is for using gcc binutils
wrappers such as gcc-ar, which is required for gcc LTO to work.
These will be distributed separately as well.