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/311https://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.
Unset UUID_LIBS when building host fontconfig, which contains
-luuid_mingw for the cross fontconfig.
Add trailing semicolons on core POST_BUILD actions.
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
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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
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.
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.
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.
Remove usage of RETRO_MEMORY_RTC - not required since real-time clock is always updated and is using current time and not ingame time.
Add some more rom info to logs during loading
Gb,gbc and sgb enhanced version of roms and savestates working. Bios loading for gb/gbc works too. No save ram / battery handling yet.
Fix offset and pitch issues with vba rendering and when borders are enabled.