Commit Graph

1905 Commits

Author SHA1 Message Date
Rafael Kitover a3ec309bd6 builder: more minor mingw cross fixes
Do not defer evaluating build env variables in mingw-cross.sh, this
interferes with switching them between host/target.

In build_dist() adjust the LDFLAGS and LIBS after pre_build has run,
because host/target env setting happens in pre_build and adjustments get
lost.
2018-11-12 09:48:35 -08:00
Rafael Kitover d725978abf builder: fix openssl parallel make patch
Fix sed regex for the openssl POST_CONFIGURE to work with the mac/BSD
sed (anchor to beginning of line.)
2018-11-12 05:40:24 -08:00
Rafael Kitover cf3ed8f370 builder: fix quoting issues introduced in 37869441
In host_env/target_env/etc. functions, quote all variables values so
that they pass through eval correctly.
2018-11-12 04:47:59 -08:00
Rafael Kitover 37869441d2 builder: msys2 fixes + misc improvements
- Fix leading spaces in build env vars.

- Pass -Dcc="$CC" to the c2man metaconfig, it tries to use cc on msys2
  which fails.

- Pass LDFLAGS to openssl make to fix link errors.

- Change the host_env, target_env and related functions to output a list
  of commands for eval.

- Add a --host-env flag to output the host env for cross build
  environments.

- Ignore symlink failures when installing dists, symlinks fail on msys2
  sometimes for some reason.

- Put libicu in the list of both host and target dists only in
  mingw-cross, the host libicu does not build on msys2, and everything
  works fine without it.

- Add -j1 to openssl make args to disable parallel builds for the msys2
  and cygwin host builds, because they fail otherwise.

- Add "-ldl -lcatgets -lws2_32" to libicu LDFLAGS for the target build,
  ws2_32 may be necessary for 32 bit builds.
2018-11-12 04:07:48 -08:00
Rafael Kitover 975a1866f5 cmake: support linuxbrew mingw toolchain
Add default linuxbrew mingw toolchain root paths to cmake mingw
toolchain files.
2018-11-11 19:33:55 -08:00
Rafael Kitover 453fa0decf add visual studio .vs/ directory to .gitignore 2018-11-04 21:22:29 -08:00
Zach Bacon eee4add6f3 Add localizations to installer, next will be adding portable mode so users can install to a custom location without the shortcuts being installed 2018-11-04 09:24:23 -05:00
Zach Bacon 2e5235af8d Initial rework of the installer framework, this is very incomplete, but it'll hopefully allow individual selection of translations as well as offer a portable mode installer 2018-10-29 18:33:20 -04:00
Rafael Kitover 6f1df2ddea rename mingw include dir mingw-include in deps 2018-10-23 20:07:04 -07:00
Zach Bacon 5e58e4c3e6 when it comes to cross compiling, Most unices like linux are case sensitive 2018-10-23 22:06:18 -04:00
Rafael Kitover 26b15b2c1e add mingw dependencies/include to include path
Older versions of mingw64 do not have the versionhelpers.h header, add
it to the dependencies submodule include/ directory and add it to
include_directories() for mingw in cmake.
2018-10-23 16:32:34 -07:00
Rafael Kitover 9cb9ce86bd fix Windows XP Compatibility #315
Use the IsWindowsVistaOrGreater() function from VersionHelpers.h, which
fortunately is part of mingw, to check for the availability of the
comctl32 LoadIconWithScaleDown API, which we use to fix issues with the
app icon, like the icon being too big in the volume mixer.
2018-10-23 06:19:34 -07:00
Rafael Kitover 1bf51ec1fa builder: 32 bit mingw fixes
Add -lm (the math library) to CFLAGS/CXXFLAGS/OBJCXXFLAGS/LDFLAGS and
LIBS for the cases where it is used but not explicitly linked.

Improve the sed script to override building the openal native tools as
it was failing for mingw 32 bit. Add -lm and remove flags from the
environment.
2018-10-14 21:34:00 -07:00
Rafael Kitover ed8c928adb builder: support gentoo crossdev + misc fixes
Support the gentoo crossdev mingw environment for the mingw cross
builder:

- For the cmake toolchains, add /usr/<arch>/usr to root paths, as this
  is the mingw root for crossdev.

- -Wno-error=all no longer works with gcc 8.2, instead remove all
  -Werror flags in dist_post_configure().

- Also remove all -I/usr/include flags in dist_post_configure().

- Don't prepend ROOT/host/bin to the PATH globally, only in
  set_host_env(). This way the target config scripts are correctly found
  in PATH.

- Bump openssl 1.0.2o -> 1.0.2p, cmake 3.10.3 -> 3.13.0-rc1, gd 2.2.4 ->
  2.2.5 and glib 2.57.2 -> 2.58.1.

- Add libicu unicode handling library, needed by some deps. Put into the
  list of dists that must be built for both the host and the target. Use
  a whole bunch of patches from MSys2 for it.

- Make openssl build in parallel by using a sed script to prepend a + to
  the appropriate make rules.

- Replace fontconfig EXTRA_LIBS with MAKE_ARGS: LIBS="-lintl -liconv"
  because these libs were being stripped out from LIBS and LDFLAGS.

- Add V=1 VERBOSE=1 to all make invocations for extra verbosity (to see
  compile/link invocations.)

- As a consequence, use dist_ninja_args() for ninja, it will still take
  options in DIST_MAKE_ARGS.

- Add CONFIGURE_TYPE "cmakeninja" which is like the "cmake" type except
  with -G Ninja to use the ninja generator and built with ninja. Nothing
  uses this yet.

- Fix dist_patch() output for already applied patches.

- Add -L/usr/<arch>/usr/lib64 to CFLAGS/CXXFLAGS/OBJCXXFLAGS/LDFLAGS,
  because crossdev libpthreads.a is in that directory and it's not in
  gcc search paths. It cannot go into CPPFLAGS because those are used
  for windres invocations, and windres errors out with non-cpp flags.

- Add -DMINGW_HAS_SECURE_API to all flags to fix a problem with the
  mingw headers in crossdev.

- Add -lpthread to a default LIBS env var so that it's often linked last
  against any libraries that may need it, at least for autoconf.

- Set the PKG_CONFIG env var to the path of the built pkg-config binary,
  not exactly sure why this was necessary.

- Overhaul environment variable saving/restoring for set_host_env() so
  that more variables are covered and have good host defaults.

- Add the dlfcn-win32 for mingw for dependencies that need -ldl.

- Add some MSys2 patches for fontconfig.

- Use a sed script to fix the native tools compilation when cross
  compiling openal.

- Replace the fedora glib patches for mingw with MSys2 ones for the
  newer glib.

- Add --with-threads=posix --disable-libelf to glib DIST_ARGS.
2018-10-11 06:55:53 -07:00
ZachBacon b60cd3326f Update openal to use github url 2018-10-07 22:42:59 -04:00
retro-wertz aebda1b706 debian: update dependency
add zip, needed during compile
2018-09-22 07:40:22 -07:00
ZachBacon 58083d9d4a Gonna use universaldxsdk for xaudio 2018-09-16 15:20:06 -04:00
Rafael Kitover 721c1b7c19 Revert "hopefully fix bin2c for msvc"
This reverts commit 01a75e8e6e.

The bin2c executable path is already a full absolute path.
2018-09-16 11:14:49 -07:00
Rafael Kitover 01a75e8e6e hopefully fix bin2c for msvc
Prefix destination bin2c.exe with ${CMAKE_BINARY_DIR} so that it doesn't
try to use whatever its current directory is.
2018-09-16 11:06:48 -07:00
Rafael Kitover b9d0f81843 builder: fix ccache on msys2
Apply msys2 patch for ccache, otherwise it hangs when compiling.
2018-09-16 10:13:04 -07:00
Rafael Kitover be0d49a304 builder: msys2 fixes
Build zlib before ccache so that ccache does not try to use its bundled
zlib, which does not compile cleanly on cygwin/msys2.

A couple of related PRs for ccache:

https://github.com/ccache/ccache/pull/311
https://github.com/ccache/ccache/pull/310

Replace the usage of xzcat/bzcat in archive unpacking with `xz -dc` and
`bzip2 -dc` because @ZachBacon had some issues with xzcat trying to
compress instead of decompress.

When switching msys2 build modes, unset related env vars first,
sometimes they can get mixed up for some reason.
2018-09-12 17:21:40 -07:00
Rafael Kitover 3aa00bfbbf builder: fix libuuid_mingw for mingw cross
Unset UUID_LIBS when building host fontconfig, which contains
-luuid_mingw for the cross fontconfig.

Add trailing semicolons on core POST_BUILD actions.
2018-09-08 19:59:07 +00:00
Rafael Kitover 5b5e319378 builder: don't install cpanm with local::lib
Don't pass -I to cpan when installing App::cpanminus, because that may
ignore our env vars and put things into ~/perl5 .
2018-09-08 19:48:29 +00:00
Rafael Kitover 88f66ef6f8 builder: fix building ccache for win targets
Add ccache as a host dist when compiling with mingw.
2018-09-08 19:08:00 +00:00
Rafael Kitover d1c82cac9e fix typo in builder core
Fix line with a / at the beginning which causes a syntax error.
2018-09-05 12:12:18 -07:00
Rafael Kitover dcd7d5e092 support 32/64 bit mac builds, build improvements
Support building both 32 bit and 64 bit mac binaries, by passing the -32
or -64 flag just like for mingw.

Install libuuid on mac into a private path, because its uuid.h conflicts
with mac APIs when e.g. building python2.

Other improvements:

- add ccache to dists early on to not rely on the dist ccache

- update python2 version

- set python3 version to 3.6.5 until patches are updated

- TODO: rebase python3 patches

- configure cmake with --enable-ccache always

- TODO: remove all ccache optional stuff, make it required

- run cpanm through perl, because of possible issues with the script and
  various paths

- support an install prefix other than /usr via DIST_PREFIX
2018-09-04 08:29:24 -07:00
Zach Bacon b4dd06a148
Merge pull request #302 from retro-wertz/libretro
Libretro: Add GB/GBC cheat support and wram/vram access using retro_get_memory api
2018-08-19 11:49:31 -04:00
retro-wertz 916c091a49 Libretro: Add GB/GBC cheat support...
- Add wram and vram to retro_get_memory* and minor cleanup
2018-08-19 23:34:38 +08:00
retro-wertz 14086d0007 Libretro: Fix crash on some linux systems 2018-08-19 22:19:06 +08:00
Rafael Kitover 0e33861754 update translations, add new langs from transifex
Update the po files with the transifex client and do a msgmerge.

Replace cmake/FindGettext.cmake with the current version, and fix a bug
in it that would not allow files with multiple periods such as
zh_TW.Big5.po. Also disable msgmerge in GETTEXT_CREATE_TRANSLATIONS
otherwise it would create too many very spammy commits.

Replace language list in po/wxvbam/CMakeLists.txt (where the .pot and
.po files are) with a list made with file(GLOB ...), so that all the new
languages are pulled in.
2018-08-11 16:18:15 -07:00
Rafael Kitover e67b513e94 rename mac-localizations to mac-translations.cmake
Rename cmake script to copy .gmo files into the .app introduced in
bf4606fc from mac-localizations.cmake to mac-translations.cmake since
these are really translations and not localizations.
2018-08-11 15:05:12 -07:00
Rafael Kitover bf4606fc18 install translations into mac .app
Add a POST_BUILD hook to run a cmake script to install translations into
the .app.

Tested to work correctly, when system language is different a
translation is loaded.
2018-08-11 14:52:18 -07:00
Rafael Kitover 0092dc16ac msys2: don't try to link msys librt and libpthread
In cmake on Win32, don't try to find librt or libpthread using
find_library(), and on mingw just include -lpthread.

For some reason the msys versions of librt and libpthread were being
picked up when find_library() was being used.
2018-08-10 16:47:17 -07:00
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
Rafael Kitover 6cbad61f36 fix cmake regression introduced in bfe21aee
Before calling list(REMOVE_ITEM ...) check if the variable exists, if it
doesn't cmake throws an error.
2018-08-10 09:37:55 -07:00
Rafael Kitover bfe21aee3e remove -fpermissive compiler flag
Remove -fpermissive from the list of flags passed to gcc and clang.

Remove -fpermissive from the cxxflags from wxWidgets config as well.

When checking wxWidgets ABI compatibility version, temporarily add
-fpermissive to compiler flags on Win32 because minhook requires it.
2018-08-10 06:46:51 -07:00
Rafael Kitover 571ecbe3e8 support mac-hosted mingw builds, misc. fixes
- Add the cross root from the mingw-w64 mac brew to the cmake toolchain
  files.

- Remove strerror_r/strerror_s from ConfigManager.cpp because the
  mingw-w64 brew does not support strerror_s for some reason.

- Strip the vbam executable from the builder script in the build_project
  phase.

- Change the bzip2 URL to the github mirror because the bzip.org domain
  expired.

- Add libuuid as it's required by the new fontconfig, use the mingw
  version for mingw builds, for mingw also set UUID_LIBS to
  '-luuid_mingw -luuid' in mingw.sh for fontconfig, the mingw version
  is called uuid_mingw because uuid is a core win32 library.

- Lower glib version to 2.57.2 stable.

- Update wxwidgets version to current master sha.

- Fix a bug in flex-2.5.3 post_build where it tries to build flex
  current but flex has been removed, and it was just rebuilding 2.5.3.

- Fix "aggressive" relocation and the relocation of .l[ao] and .pc files
  in install_dist to ignore /usr/local, and only match /usr.

- Add a "project" pre_build and post_build hooks.

- Add getopt to host-only dists in mingw-cross.sh.

- Use perl instead of readlink -f to get the absolute path of the cmake
  toolchain files in mingw-cross.sh, as readlink -f is linux-only.

- In mingw-cross.sh, replace the glib post_build to rebuild
  gettext-target instead of gettext --without-included-glib.

- Add overridable functions set_host_env_hook and unset_host_env_hook in
  mingw.sh to override in other scripts, in this case mac-cross-builder.

- Update mingw glib patches to current fedora versions.

- Add tools/win/mac-cross-builder script to build mingw windows binaries
  on mac, it borrows some necessary parts from the mac native builder
  for host dists, and inherits from mingw-cross.sh.

TODO: currently the resulting mac-built binary segfaults due to gcc
8.2.0, just as the msys2-built binary does, this is a separate issue.
2018-08-10 04:31:05 -07:00
retro-wertz e32e7c5de2
installdeps: Add zip to openSuse dependency 2018-08-08 08:51:51 +08:00
retro-wertz f45935af98
Add vbam_libretro.info
to be copied into <retroarch_folder>/<core_info_folder
2018-08-06 13:46:48 +08:00
Rafael Kitover be508eb2fd simplify check for renamed wx-config, fix gentoo
Use find_program() to check for the existance of wx-config-gtk4, then
wx-config-gtk3 and finally wx-config, instead of calling find_package()
for each separately, FindwxWidgets module does not like being called
multiple times, it screws up some cache variables.
2018-08-05 21:16:33 -07:00
Rafael Kitover 3b44a29948 cmake: fix wrong unset syntax #295 from f78d45c0
unset(VAR PARENT_SCOPE CACHE FORCE)

seemed to work on my version of cmake on gentoo, but does not work on
other versions.

Rewrite the function as a macro and use the syntax:

unset(VAR CACHE)

instead.
2018-08-04 13:13:37 -07:00
Rafael Kitover 5644339193 installdeps gentoo: don't eselect wxwidgets
Don't eselect the wxwidgets installation for gentoo because the user may
have their own preferred version and the default should be set correctly
for the only installation.
2018-08-04 05:11:24 -07:00
Rafael Kitover 7a054b4583 installdeps: support gentoo
Add a check for gentoo and the appropriate emerge commands to get the
library and toolchain dependencies.
2018-08-04 04:41:42 -07:00
Rafael Kitover f78d45c038 cmake: fix regression in finding wx from 2efcb620
Clear FindwxWidgets module variables from the cache after each
unsuccessful try with WX_CONFIG_EXECUTABLE set, otherwise the succeeding
find_package(wxWidgets) call with WX_CONFIG_EXECUTABLE unset will fail,
as it does with cmake on gentoo.
2018-08-04 04:34:24 -07:00
Rafael Kitover 594ecc3947 msys2 builder: redo fontconfig patch, bumb wx
Replace fontconfig gperf bug workaround patch with the one worked out in
the upstream bugzilla report.

Bump wxWidgets version up to current sha to fix an incompatibility with
mingw.
2018-08-01 01:48:52 -07:00
ZachBacon 2cece6ac9f Updated Translations, finally added transifex support to pull in new translations 2018-07-31 06:54:10 -04:00
Rafael Kitover 6bc301018f update msys2 builder
Bump freetype2 and fontconfig versions.

Add patch to fix a gperf bug that causes an error in the fontconfig
build to fontconfig (.gperf file must not have blank lines.)

Add -lintl -liconv to extra libs for fontconfig.
2018-07-30 20:50:15 -07:00
Zach Bacon 14d13153b3
Merge pull request #292 from retro-wertz/updates
Updates
2018-07-26 13:33:06 -04:00
retro-wertz ddea50d3c8 GB: Cleanup sound registers
Seems to be left-overs from switching to blargg
2018-07-26 14:39:06 +08:00
retro-wertz faf01db2cf GB: Backport STAT register behavior
http://www.devrs.com/gb/files/faqs.html#GBBugs
2018-07-26 13:45:06 +08:00