Commit Graph

1533 Commits

Author SHA1 Message Date
Mystro256 ddef88f0c5 Possible null dereference 2016-12-30 11:42:56 -05:00
Mystro256 7bc7ff57f4 Redundant code? 2016-12-30 11:41:33 -05:00
Mystro256 7788e6fc89 Spelling mistake ;) 2016-12-30 11:19:48 -05:00
Mystro256 c3e4969498 Fix gcc parentheses warning 2016-12-30 11:17:18 -05:00
Mystro256 0bcf4a5223 Clean up various used variables 2016-12-30 11:16:00 -05:00
Mystro256 0df6f036d6 Silence gcc misleading-indentation warning 2016-12-30 11:03:34 -05:00
Mystro256 a08d944867 Fix format-extra-args warning 2016-12-30 10:49:22 -05:00
Mystro256 e451ce09dd Missing include, fixes gcc warning 2016-12-30 10:48:05 -05:00
Rafael Kitover b258c004af ./installdeps: support Fedora Linux
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
2016-12-28 08:48:30 -08:00
Rafael Kitover f641620a6c ./installdeps: pull deps submdl for cross targets
Run `git submodule update --init --recursive` for all win32 cross
targets, not just msys2, in check_cross() .
2016-12-25 05:12:23 -08:00
Rafael Kitover d01bf5dbd0 fix control panel link in MSys2 Notes in README.md
Fix the instructions in MSys2 notes for how to change the system PATH in
Control Panel in README.md.
2016-12-23 07:15:47 -08:00
Rafael Kitover 9f051c3813 put CMake options in README.md into table + misc
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.
2016-12-23 06:10:54 -08:00
Rafael Kitover 2483a2c440 add a README.md
Add a link to the homepage, building instructions and some notes on
contributing.
2016-12-23 05:38:50 -08:00
Rafael Kitover f124a28e19 use $MSYSTEM for msys2 target in ./installdeps
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() .
2016-12-22 07:04:27 -08:00
Rafael Kitover e2e4105dcd remove src/wx/VBA.ico, dup for src/wx/icons/VBA.ico 2016-12-21 17:10:03 -08:00
Rafael Kitover d06e7afceb full support for cross-compiling to win32 with mxe
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
2016-12-21 13:02:55 -08:00
Zach Bacon 3279ce2ab8 Merge pull request #56 from Mystro256/master
Appdata fixes
2016-12-21 09:53:55 -05:00
Mystro256 774719ddf6 Appdata fixes
Note that metadata_license is the license of this specific file, apparently
it's not allowed to be GPL, CC-BY-SA-3.0 is close enough.
2016-12-21 09:14:10 -05:00
DoctorWho11 978d5b7991 Missed one other cmake instance of gvbam 2016-12-20 21:26:11 -05:00
DoctorWho11 33febfb4ba add old resources that were in the win32 folder that the wxwidgets interface uses on windows 2016-12-20 17:56:05 -05:00
DoctorWho11 a1bf0f3f82 Drop gtk and mfc interfaces. Things are changing and for the better. 2016-12-20 17:34:34 -05:00
DoctorWho11 ac32a524a3 adjust small things in preparation in a move. 2016-12-20 17:27:30 -05:00
Rafael Kitover 982d639ea2 add gettext-tools to fink deps
gettext-tools needs to be installed in fink for cmake to find msginit,
update ./installdeps to include it.
2016-12-19 02:18:30 -08:00
Rafael Kitover dea31e52e9 fix SDL2 include in 534c4da
For SDL2 includes are specified as:

```cpp
```

rather than as:

```cpp
```

without the `SDL/` prefix, this was causing a compile error.
2016-12-19 02:15:44 -08:00
Rafael Kitover fba7adf3eb trying to create an issue template
This should help with people creating issues with no information about
their build or configuration.
2016-12-18 20:10:18 -08:00
Zach Bacon 0b6942684f Merge pull request #53 from drysyle/master
Fix wx joystick hat diagonals
2016-12-18 21:28:49 -05:00
drysyle 534c4da649 Rewrote joystick hat code to fix diagonal issues 2016-12-18 15:25:18 -08:00
Rafael Kitover f83fcfb40f hopefully fix cross-compiling with SFML
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.
2016-12-18 12:11:37 -08:00
Zach Bacon f7f67ff6f9 Fixed compiling without sfml. 2016-12-14 16:52:45 -05:00
Rafael Kitover c2a23a9ffe check for RAW_CONTROL only on macs in switch stmts
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__ .
2016-12-14 06:23:02 -08:00
Rafael Kitover 7b1b1ea236 only use gcc binutils wrappers when LTO is enabled
Use gcc wrappers like gcc-ar/gcc-nm/gcc-ranlib only when LTO is enabled.
2016-12-14 05:48:37 -08:00
Rafael Kitover 8c309eaaf4 fix modifier-only game keys
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.
2016-12-14 00:26:54 -08:00
Rafael Kitover a60d24e91a workaround wX 3.1+ key accel string parsing bug
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.
2016-12-13 15:08:55 -08:00
Rafael Kitover d5020b905c fix wX XRC for wX 3.2
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.
2016-12-13 10:03:38 -08:00
Rafael Kitover 94b62b13b3 minor update to ./installdeps
For arch cross builds, try to install both the mingw -headers-git and
-crt-git .
2016-12-13 10:38:15 -05:00
Rafael Kitover 68f2badae7 more ./installdeps improvements
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.
2016-12-12 19:55:44 -08:00
Rafael Kitover 53fb6b4371 ./installdeps + windows cross build improvements
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.
2016-12-12 19:46:14 -05:00
Rafael Kitover c216528793 generalize ./installdeps + mac pkg mgrs support
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.
2016-12-10 23:41:32 -08:00
Zach Bacon 0e9fb98393 Merge pull request #52 from Mystro256/master
Various fixes
2016-12-10 19:50:19 -05:00
Mystro256 1af42f486c Use full name for wx appdata 2016-12-10 19:34:16 -05:00
Mystro256 8f694f054b Fix FSF address information 2016-12-10 19:19:34 -05:00
Mystro256 8baa415848 Add linux appdata and fixes
Desktop files aren't installed for linux by default
2016-12-10 19:05:30 -05:00
Mystro256 d6228254cf cmake fixes
-Whitespace fixes
-Binaries installation fixes
2016-12-10 18:27:18 -05:00
Mystro256 24d2521914 Manpage fixes 2016-12-10 17:56:04 -05:00
Mystro256 4a3618ef26 Forgot two instances of SYSCONF_INSTALL_DIR 2016-12-10 04:12:36 -05:00
Zach Bacon ea220b4822 one file was missed from the last PR, looking at you Mystro256 :P 2016-12-10 04:08:03 -05:00
Mystro256 87ee8c700a Forgot two instances of SYSCONF_INSTALL_DIR 2016-12-09 23:33:19 -05:00
Rafael Kitover 0e6c1b66e3 Quartz2D display rendering driver for Mac
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().
2016-12-09 13:06:59 -08:00
Zach Bacon 60e98506e7 Merge pull request #49 from Mystro256/master
Fix DSYSCONF_INSTALL_DIR (SDL)
2016-12-09 14:20:13 -05:00
Jeremy Newton c7386503c4 Fix DSYSCONF_INSTALL_DIR
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.
2016-12-09 12:44:11 -05:00