Commit Graph

1748 Commits

Author SHA1 Message Date
Zach Bacon 893269d897
Merge pull request #239 from retro-wertz/libretro
Update Libretro port
2018-06-04 12:36:32 -04:00
retro-wertz 3411aa33a4 libretro: Use stdint.h instead in most cases 2018-06-05 00:14:06 +08:00
retro-wertz 1f20ba81ad libretro: Update 2018-06-04 23:55:08 +08:00
retro-wertz b0982ac8e1 Always apply map masks
fixes libretro issue where loading rom will only show white screen
2018-06-04 18:12:02 +08:00
retro-wertz ff4f1235aa libretro: Fix wrong file pointer 2018-06-04 18:03:33 +08:00
retro-wertz 8f6e5de50a libretro: Fix error : narrowing conversion 2018-06-04 18:01:58 +08:00
retro-wertz 8a1fd58783 libretro: Add header guard to UtilRetro.h 2018-06-04 17:59:29 +08:00
Rafael Kitover 85dea8a57b add cygwin cross build support
Put shared code for linux cross builds and cygwin cross builds into
builder/mingw-cross.sh .

Call wxrc when the build platform is cygwin with files resolved via
`cygpath -m` in case the wxrc is a native binary.

Add -fpermissive to CXX/OBJCXX flags.

Reenable libzvbi support for ffmpeg.

Stop building ffmpeg and related dists by default until we fix game
recording.

Set CMAKE_PREFIX_PATH in cmake args as a FILEPATH type variable.

Support xml catalog made with native libxml2 using cygpath in related
commands, make cygpath a noop on non-cygwin platforms.

Remove gdb and zip from msys2 deps.

Add a cygwin installdeps routine using a copy of cyg-apt that it
fetches.

When creating symlinks in install_dist() fully resolve all symlinks in
path parts for the source file, so that host and target binaries are
correctly linked.

When cp -af fails to preserve permission related data, fall back to cp
-rf.

When installing libs with a cross suffix, make a symlink for the lib
without the cross suffix.

Make sure cygwin runs with CYGWIN=winsymlinks:native .

Add paths to host gettext executables to cmake args, otherwise it tries
to use the target executables and fails on paths.

For the pkgconfig bundled glib, turn off win32 platform for the cygwin
host build.

For gettext, remove --disable-auto-import from link flags.

Compile target freetype on cygwin with cmake and manually install the
pkgconfig .pc file using sed.

Add a relocation type 'aggressive', when a dist is marked with this
type, rewrite all '/usr' prefixes to the build root. By default only
files that exist in the dist are matched and rewritten.

Fix regression in linux build by adding some iconv related flags to the
cmake invocation for doxygen and disabling -Werror for xorg dists.

When relocating scripts, use the actual resolved root path for host or
target.

Build libxslt --without-python so that it doesn't try to pick up the
msys2 python.

Other misc. minor tweaks and cleanups.
2018-05-01 04:11:57 -04:00
Rafael Kitover 8638c76923 require pkg-config in cmake for gtk checks #227
cmake reconfigure was failing for the gtk2 case because the pkg-config
cmake code was not being loaded.

Load pkg-config cmake code before any gtk checks.
2018-04-26 17:09:21 -04:00
Rafael Kitover 60f2bd3fd9 remove ffmpeg from suse installdeps
ffmpeg requires the packman repo, and there's no simple way to enable
the repo for any version of opensuse.
2018-04-26 17:08:16 -04:00
ZachBacon 9933b6bb7e if cross compiling openssl, need to add --cross-compile-prefix=- 2018-04-20 20:39:19 -04:00
Rafael Kitover 55caf62e01 win cross script: pass RANLIB to openssl make
Pass RANLIB=${prefix}-ranlib to openssl for the linux mingw cross
compile script.
2018-04-20 16:40:03 -04:00
Rafael Kitover 9cd26b255f windows cross build script: use autoconf for bzip2
When cross compiling bzip2, it may use host tools such as ranlib instead
of the cross tools.

Apply the msys2 autotools patch to the cross bzip2 and move it to after
automake in the chain.
2018-04-20 15:49:18 -04:00
Rafael Kitover d5f90f0a05 fix SDL sound on windows
In SoundSDL, when building on windows add this init code:

```
SDL_setenv("SDL_AUDIODRIVER", "directsound", true);
```

Otherwise there is no sound on windows.

Also update SDL to 2.0.8 from 2.0.7 in build scripts.
2018-04-16 13:10:12 -04:00
Rafael Kitover fe9f06414d fix msys2 builder script
- add python2 for msys to list of core deps and link it to root/bin,
  harfbuzz requires python to build

- fix double eval in build_project()

- remove duplicates from list of host-only and host/target dists in
  mingw.sh

- fix msys2-builder startup, and assume 64 bit build if MSYSTEM = MSYS

- make sure MSYS has winsymlinks:nativestrict on startup, the user has
  to turn off UAC

- update patch for infozip zip to fix a #define

Overall, the script is far too slow to be practical.

TODO: build both python and perl for the host to not rely on system
versions
2018-04-16 12:01:21 -04: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
Eleuin d992cfa214 Finalize vertical draw fixes and code cleanup
Fix shenanigans
2018-04-04 14:33:20 -04:00
Lucas 62e8098f5b Fix forbidden conversion in remote.cpp
Conversion from std::string to char* is forbidden in ISO C++.
2018-04-03 16:00:45 -04:00
Zach Bacon edb2fd2601
Merge pull request #214 from Eleuin/name-fixes
Fix cmake directory in installdeps
2018-04-02 12:23:11 -04:00
Eleuin 9843af2b5a
Fix cmake directory in installdeps 2018-04-02 09:29:32 -04:00
Eleuin 80bcdab924 Fix draw height across rendering modes 2018-03-22 21:00:11 -04:00
Rafael Kitover f3f6ee7b1c fix compile errors with ffmpeg git
The FF_MIN_BUFFER_SIZE macro was renamed to AV_INPUT_BUFFER_MIN_SIZE at
some point, so check for the newer variant first.

The AVFMT_RAWPICTURE macro seems to be gone, but affected code was an
edge-case so compile it out if the macro is not present.
2018-03-19 19:36:00 -04:00
Rafael Kitover 5ae853a905 fix installdeps for OpenSUSE
Fix syntax error (calling functions from the wrong script) and add
openal-soft-devel to deps.
2018-03-19 02:52:53 -04:00
Rafael Kitover 8540860ab8 adjust changelog version regex for cur. version
Allow matching text after version and before date.

Matches current version 2.0.2 .
2018-03-17 12:32:27 -04:00
Zach Bacon 61e2f3b284
Merge pull request #204 from Eleuin/filter-bounds-fix
Fixed filter draw bounds
2018-03-15 10:15:54 -04:00
Eleuin d7a4eddb3c Fixed filter draw bounds 2018-03-15 10:00:26 -04:00
ZachBacon 92ba676632 update changelog for 2.0.2 release
Signed-off-by: ZachBacon <zachbacon@budgiemedia.rocks>
2018-03-13 23:49:17 -04:00
Rafael Kitover d5c9c6bac7 change default audio driver to SDL
A Linux user (Eleuin) has reported menu lockups with the default OpenAL
(probably thread related) and no lockups with SDL.

A Windows user has reported popping noises with all audio drivers except
SDL (#178).

Change the audio driver default to SDL for the time being until these
issues can be looked into.
2018-02-28 17:53:55 -05:00
Eleuin 480541a205 Modify max_threads sanity check to better handle erroneous values 2018-02-28 17:18:52 -05:00
ZachBacon c7c6ad6a87
implemented the fix from nhdailey, should resolve #153. Will put up a
test build soon.
2018-02-25 13:38:25 -05: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
orbea 3e052c943d cmake: Fix -DENABLE_FFMPEG=OFF 2018-01-18 13:18:35 -08:00
Rafael Kitover df0bd439fb fix deps submodule init on windows
`git submodule update --remote --recursive` must be called with `--init`
if the submodules have never been initialized, add the flag to the cmake
code that does this. If they are already initialized, it will not cause
any harm.
2017-10-25 06:25:29 -07: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
ZachBacon f527d0a2a3 The not so finished builder script for windows. 2017-10-22 08:29:22 -04:00
Zach Bacon 7dca06979b Added some windows specific stuff to builder.
Still have much more to do.
2017-10-22 00:41:27 -04:00
Zach Bacon c3fc4e7edf Added basic windows script 2017-10-21 23:25:12 -04:00
Rafael Kitover 21926d6230 add -mfpmath=sse -msse2 compiler flags: x86/amd64
This may speed things up a little in some places, or maybe not, but
should be safe as few if any users are likely to be using a CPU without
SSE2.
2017-10-17 10:26:37 -07:00
Rafael Kitover afb1cd3dfc automate codesign/zip for mac build, add xz dep
Add POST_BUILD commands on Mac to codesign the `.app` and make a zip
file from it.

Also add xz/liblzma dist to `tools/osx/builder` because something
apparently wants liblzma.
2017-10-12 14:56:21 -07:00
Rafael Kitover 5e633984b8 mac builder refactor/improvements
Refactor the code in `tools/osx/builder` somewhat and make it cleaner.

Move a few table processing loops into functions to make things less
ugly.

Delete dists not listed in the table (e.g. when they are updated) and
when a dist is re-downloaded, delete the tree and the target file to
force a rebuild.

Use number version for gettext instead of `-latest`.

Specify full dist target, e.g. `lib/libfoo.a` instead of just
`libfoo.a`.
2017-10-12 14:31:23 -07:00
Rafael Kitover d7ff2afb80 add mac release builder script
Add `tools/osx/builder`, a POSIX sh script to build all dependant
libraries as static, targetted to OS X 10.7, and build the project with
them (also targetted to OS X 10.7.)

ffmpeg currently does not link, as recording functionality is currently
non-functional anyway, this will be fixed later.

MISC:

- set WORKING_DIRECTORY and ERROR_QUIET for all git commands, for the
  cases when the build directory is not under the git checkout

- #include <cerrno> in ConfigManager.cpp as it uses errno

- change `build*` in `.gitignore` to `build/*` so that files starting
  with "build" are not affected
2017-10-12 01:32:18 -07:00
Rafael Kitover 46486381f0 read version info from CHANGELOG.md if no git
If git tags are not available, set the version and revision by finding
the first version tag in `CHANGELOG.md` of the form

```
```

Where N.N.N is the number version (number of components can vary) and
the revision (as speicified by -REV) is optional.

TODO: support named revision without a version number of the form
`[REV]`.
2017-10-11 19:17:25 -07:00
Zach Bacon 30b6ecf1a5 Add a changelog
Gonna try and keep this up to date as often as possible.
2017-10-12 00:49:05 +00:00
Rafael Kitover 55fa9c69c0 refactor/cleanup GitTagVersion.cmake
Run just one `git tag` command instead of two (with tags and refs) and
break it into the form [tag0, ref0, tag1, ref1, ...]. Iterate over the
list with two counters for tag and ref.
2017-10-10 03:15:53 -07:00
Rafael Kitover 52439cee0e fix error and version info in shallow git clones
Fix `cmake/GitTagVersion.cmake` to not throw errors when in a shallow
git clone, or any git clone that has no tags.

And when either git or git tag version info is not available, set the
version variables to the defaults, which are:

```
VERSION         = '2.0.0'
REVISION        = 'unknown'
VERSION_RELEASE = 0
```
2017-10-07 18:17:52 -07:00
Rafael Kitover f5379ab806 read version and subversion info from Git
To get the version, find the last tag in git tag of the form "v2.0.0" or
"2.0.0". If this is the last tag and the current commit matches the ref
of this tag, the revision will be empty.

In the case that the current commit is not tagged with a version, to get
the revision, use the short sha unless the current commit is tagged with
something that is not a version string, e.g.  "feature-foo", in which
case the revision will be "feature-foo".

If the current commit is tagged as e.g. "v2.0.1-foo" or "2.0.1-foo" then
the version will be "2.0.1" and the revision will be "foo". Tags of this
form are also checked when finding the current version.

This is all done in cmake. If there is no git detected, the version will
be "2.0.0" and the revision will be "unknown".
2017-10-07 14:00:47 -07:00
Rafael Kitover 9c06c31814 deps: don't check result of apt-get update #154
On Debian-based distributions, people sometimes have bad sources in apt,
e.g. PPAs that no longer exist, or mirrors that no longer work, etc.. In
these cases, `apt-get update` will still likely fetch the main
distribution package lists, which is what we need, but return a non-zero
exit code.

Change `./installdeps` to not abort on non-zero exit status from
`apt-get -qq update`.
2017-10-05 18:28:42 -07:00
Rafael Kitover 1fc0966384 minor code cleanup
Change one instance of a dummy local variable to a C++11 temporary via
CLASS{param}.
2017-09-23 15:29:35 -07:00
Rafael Kitover f069f0c02d default LTO to OFF on 64 bit MinGW
64 bit MinGW (e.g. msys2 64 bit) produces a binary that immediately
segfaults when built with LTO.

Make ENABLE_LTO default to OFF on 64 bit MinGW (32 bit will still
default to ON.)
2017-09-22 00:42:49 -07:00
ZachBacon 75ef0aa26d Added executable extension
* Allows the SDL binary to be installed if it's cross compiled from
within linux or macOS for windows for packaging purposes.
2017-09-22 02:46:20 -04:00