Commit Graph

82 Commits

Author SHA1 Message Date
Rafael Kitover 65e1ab041d disable gcc stack protector, segfault on 8.2.0
Make gcc -fstack-protector-strong and associated options controlled by
the cmake option ENABLE_SSP which defaults to OFF.

This option causes a segfault on startup with gcc 8.2.0.
2018-08-10 16:35:49 -07:00
ZachBacon 21b718b837 Add Coverity Badge 2018-06-26 22:26:50 -04:00
Rafael Kitover 8778837c83 add Travis CI support
Use a matrix of 4 jobs, linux (ubuntu trusty), mingw i686, mingw x86-64
and mac.

Automatically detect ccache in the cmake config and cache the
`~/.ccache` directory for faster rebuilds.

Instructions for ccache in cmake are here:
https://stackoverflow.com/a/24305849

Change build status badge in README.md to Travis.
2018-06-26 19:15:22 -07:00
Rafael Kitover 66a50e35da note how to reset config in windows in README.md
Add a note at the top of README.md for windows users on how to find the
config directory and delete it.
2018-06-23 13:45:35 -07:00
Rafael Kitover 70c8dee8bf cmake: default ENABLE_OPENAL to OFF
Since the SDL sound driver is now the default on all platforms, change
the ENABLE_OPENAL default in cmake to OFF.
2018-04-13 12:31:07 -04:00
Rafael Kitover 66980934b2 add multi-platform build system
under `tools/` add some scripts to invoke the build system to build all
deps for vbam and vbam itself:

- `tools/linux/builder`

This builds a mostly static linux binary with a few dynamic deps for
xorg and wayland. Using gtk3. This will run on just about any dist.

- `tools/osx/builder`

Builds a static mac app targetting 10.7.

- `tools/win/linux-cross-builder`

Builds a static windows binary using the mingw-w64 toolchain.

- `tools/win/msys2-builder`

Builds a static windows binary in the MSYS2 environment, this may be
suffering from a few regressions.

Change some cmake code to support the build system, refactor a few
things in it.
2018-02-24 14:39:29 -05:00
Rafael Kitover 420450255c mac build/builder improvements
Improve, refactor and clean up `tools/osx/builder` to build a relatively
full-featured ffmpeg as well. This requires lots of other dists. It's
kind of like a mini port system now. Will generalize it shortly to a
sourced library for using with both the mac and the mingw builds. Will
hopefully become a separate repo on github at some point.

Add perl dist support to the builder.

Add an `--env` flag to the builder to print the build environment
variables so that they can be read in with `eval` for debugging
purposes.

Also add the `FFMPEG_STATIC` cmake option to link static ffmpeg
libraries correctly.

Move the codesigning and zipping of the `.app` bundle to the builder
script and out of cmake, as this is something most users don't need.
2017-10-22 15:35:56 -07:00
Rafael Kitover d3351a7575 remove doctoc title from README.md TOC
Remove the "generated with doctoc" title from the README.md table of
contents.

Need to run `doctoc --notitle`.
2017-09-18 01:02:33 -07:00
Rafael Kitover 42fb76bfcf update README.md
Note that LTO now defaults to ON, and ENABLE_ASM does not turn on
ENABLE_ASM_CORE.

Trim the wxLogDebug() section.

Titlecase headings.

Generate a TOC with `doctoc`.
2017-09-18 00:58:47 -07:00
Rafael Kitover 02b3defcd0 restore wx 2.8 compat, improve string processing
Fix building with wx 2.8 by rewriting some more string related code.

Replace all calls to .c_str() with .mb_str().

Remove some of the .c_str()/.mb_str() calls where the target is already
wxString.

Move the split()/enum_idx() functions from opts.cpp into
str_split()/vec_find() in strutils.h/strutils.cpp for use in other
files.

Replace the C-style string parsing code in a couple of places in
wxvbam.cpp for processing possible command line options by splitting on
'='.

Also replace a couple of places that use pointer arithmetic in
widgets/joyedit.cpp and widgets/keyedit.cpp with wxString methods.
2017-09-13 05:32:44 -07:00
Rafael Kitover 4e665ae088 use -fabi-version=2 for GCC, turn off LTO #142
Use the g++ `-fabi-version=2` compiler option, as suggested by @ArtiiP
to fix problems similar to:

```
Fatal Error: Mismatch between the program and library build versions
detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1002,wx
containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1009,wx
containers,compatible with 2.8).
Aborted
```

Turn LTO off by default until I fix it for newer gcc/binutils, currently
with gcc7 ar segfaults linking vbamcore.
2017-09-01 05:06:26 -07:00
Rafael Kitover 82d0b04a01 remove cairo references from README.md
Since Cairo was dropped in 1583a226, remove all references to it in
README.md .
2017-08-27 13:22:41 -07:00
Rafael Kitover 9bca4f7292 document how to provide symbolic backtraces
Add a "REPORTING CRASH BUGS" section to the README.md with instructions
for how to provide a symbolic backtrace on Linux and MSYS2.

Add a "Crash bugs" section the the issue template with a link to said
README.md section.
2017-08-17 14:25:27 -07:00
Nicola Spanti (RyDroid) 2da2d9c41d Improving README 2017-08-14 15:28:52 -07:00
Rafael Kitover 783475bf39 switch to cmake module GNUInstallDirs #116
See:

https://cmake.org/cmake/help/v2.8.12/cmake.html#module:GNUInstallDirs

Use these variables to set all installation paths.

Add link and note about module to README.md .
2017-05-24 04:25:45 -07:00
Zach Bacon 10e1b7a6dd added tea-ci badge 2017-05-11 15:38:17 -04:00
orbea 7ea1616afc Add BIN_INSTALL_DIR and MAN_INSTALL_DIR 2017-05-11 06:39:37 -07:00
Rafael Kitover 41ead88dcb 32 bit cross compiling support on Linux
Add the `m32` parameter to ./installdeps to fetch 32 bit multilib
dependencies on Fedora, Arch and Solus linuxes and add a cmake toolchain
file to build with them.

For MSYS2 support both an `m32` and an `m64` to choose deps for 32 bit
or 64 bit mingw targets.

Adjust build instructions from ./installdeps to support both usages.

Other changes:

- use --nogpgcheck --best --allowerasing for dnf invocations for Fedora,
  the --nogpgcheck is necessary when Rawhide is confused about which
  keys it has, and the latter two are needed for upgrades that remove
  unneeded deps etc

- when finding GTK2, first try using pkg-config, and only fall back to
  the cmake script when that fails, pkg-config works better for cross
  builds

- add cairo to dep lists in ./installdeps for the time being

- for arch, list individual packages from base-devel instead of
  base-devel that do not require gcc-libs because of potential conflicts
  between gcc and gcc-multilib
2017-03-23 14:09:17 -07:00
Rafael Kitover 3a7c18da11 add gitter.im badge to top of README.md 2017-03-21 16:05:28 -07:00
Rafael Kitover 0dc175cdb4 basic ./installdeps support for Solus Linux
Add basic support for installing deps for a Solus host build and update
README.md .

Support for mingw and 32 bit cross-builds may be added later.
2017-03-19 19:09:33 -07:00
Rafael Kitover 6af5525ac1 cmake: default to ENABLE_ASM_CORE=OFF #98 #54
The inline assembly in src/gba/GBA-thumb.cpp which is turned on with the
cmake ENABLE_ASM_CORES option, sometimes causes weird behavior on
windows (see: #54) and a crash on startup in linux (see: #98, confirmed
on both Fedora and Arch Linux.)

Previously the default for this option was ON for 32 bit builds, set the
default to OFF always for the time being, until it is either fixed or
replaced.
2017-03-18 19:04:39 -07:00
Rafael Kitover f2bfc549ea fix Ubuntu PPA link
Also add a note that it's easy to build from source.
2017-03-06 02:10:06 -08:00
Rafael Kitover 9dc740156b minor doc tweaks
- Add Ubuntu daily PPA link.

- Add link to releases tab for win/mac builds.

- Advise `make -j8` instead of `make -j10`.

- Clarify which dependencies are optional and which are required.

- Add ENABLE_ASM cmake option to the table.

- Replace wxLogDebug with wxString example to use .utf8_str() instead of
  concatenation, this is more correct.
2017-03-06 02:03:15 -08:00
Rafael Kitover ea4056e025 remove intermediate dependencies jpeg and tiff
jpeg and tiff are not direct dependencies and should be pulled in by
direct dependencies such as wx, remove them from README.md and
./installdeps.
2017-02-20 13:43:39 -08:00
Rafael Kitover 6a7d49419c initial Wayland support #72 #76
Disable OpenGL support under Wayland because wxGLCanvas segfaults, and
fix an issue with drawn frames not appearing.

If the user has opengl as the render method in their config, it will not
be changed, but at runtime will be set to simple under Wayland.

To fix the issue with frames not being drawn, Call Refresh() to queue a
PaintEv from DrawArea(data) instead of calling DrawArea(device_context)
directly.

Also remove the DrawOSD() call from PaintEv, this was causing the OSD to
sometimes show up twice in one frame, because DrawArea(data) draws the
OSD directly on the frame data.

Add new files wayland.cpp and wayland.h with a bool IsItWayland() global
function. This uses a GDK (part of GTK) call to detect Wayland.  This
unfortunately requires linking GTK libs separately.

Add cmake code to detect the version of GTK used by the wx being linked
and link it as well. Add gtk2 and gtk3 dev packages to the code for the
supported linux dists in ./installdeps.
2017-02-20 13:20:09 -08:00
Rafael Kitover 65dae0d0a1 support Ninja cmake generator on msys2
Add a hack to the root CMakeLists.txt to SET(MSYS ON) for the Ninja
generator when running under msys2, otherwise it cannot find libs.

The quoting fixes from #70 allow all of this to work.
2017-02-11 14:18:38 -08:00
Rafael Kitover fdc389c280 fix wx 2.8 compat, debug logging works everywhere
Fix backcompat with wx 2.8. This involved writing
wxPositiveDoubleValidator and rewiring the DrawingPanel inheritance tree
and event handling mechanisms (because 2.8 does not have ->Bind, only
->Connect which is less flexible.) As a result all the event handling
has been gathered into GameArea and the affected code is somewhat
cleaner. 2.8 support is untested on Mac because it requires 32 bit libs
and Carbon.

Add support for cross-compiling for windows using the Fedora MinGW
packages in ./installdeps.

Check for OpenGL support in the wx library being linked, this was
necessary because the Fedora MinGW wx library does not have OpenGL
support.

Remove vbamDebug() in favor of wxLogDebug(), and add an override for it
so that it works in non-debug builds of wx as well as on Windows. Turn
off buffering on stdout and stderr on startup so that debug logging
works in msys2/cygwin mintty as well.

On Windows, build a console binary for debug builds.

Update README.md to reflect Fedora MinGW support and debug logging
support.

Add -Wextra to cflags for debug builds.
2017-01-25 10:53:05 -08:00
Mystro256 2ef0074f72 Duplicate CMake Option in README.md 2016-12-30 12:14:35 -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 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