Update installdeps and cmake to use windres from gcc binutils from
MINGW64 on MSYS2 CLANG64, because llvm-rc doesn't work sometimes.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update installdeps to support CLANG64/CLANG32 MSYS2 targets.
cmake:
Set POLICY CMP0060 to NEW to not convert full lib paths, this is the
default.
Stop disabling ffmpeg on WIN32+i686.
On MSYS2+clang add windows import libs to CMAKE_PREFIX_PATH.
For static builds on MSYS2 append full paths for static libs for tiff,
jbig and lzma to FFMPEG_LIBRARIES.
Add -Wno-unused-command-line-argument to all CFLAGS/CXXFLAGS so that
clang does not warn about gcc-specific options.
Enable -march/-mtune optimizations by default instead of only for
UPSTREAM_RELEASE.
Update find_wx_util() to search suffixes for WIN32 and add the "static"
suffix for static builds.
Remove all linker flags from wxWidgets_LIBRARIES and translate all wx*
libs as well as jpeg, tiff, jbig lzma and expat to full .a paths for
static builds.
Disable strutil tests on MSYS2+clang, currently does not build.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
I don't know if this is right or not, but I am running an Arch system and tried running `./installdeps` and nothing happened. So I went into the script and figured that it got stuck in the `elif [ -f /etc/os-release ];` block. This file exists on Arch as well, so the block is executed, but arch is not listed in the `case`, so the script exited without doing anything. And it's only checking for pacman after that, so it never ran `arch_installdeps`.
Don't know if this is the 100% correct fix, but it's working for me now and should also catch cases like that in the future.
Add a `default.nix` with the list of dependencies.
Detect NixOS in installdeps and display the `nix-shell` command to
build.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Default to latest, which is bionic, for earlier repositories, match all
intermediate release code names.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Assume an archlinux-like distribution based on the existence of
`/usr/bin/pacman` as the last test.
- Fix#710.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Make sure git is part of the base package list for Win32 builds.
Move the `git submodule update` out of `check_cross()` and into the
Win32 build sections.
Allow it to fail, in case the user is not using a git clone, the cmake
checks will produce an error if the subtree does not exist.
This fixes the problem with the git submodule update failing because git
is not installed yet.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Followup on 513af13d which replaces the use of libpng with the stb_image
headers.
- Remove the use of libpng in cmake.
- Remove libpng from list of vcpkg dependencies.
- Add libpng to list of wxwidgets link libraries when using vcpkg, since
it is no longer linked directly. This is necessary for static builds.
- Remove libpng from all package lists in installdeps.
- Remove libpng-dev from the debian control file.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
For some versions of the mxe ubuntu repositories, the compiler/ccache
packages have a bug where the compiler a broken symlink to ccache.
Make sure the expected symlink to ccache exists.
Add pre-build instructions to add /usr/lib/mxe/usr/bin to the PATH.
Amend the PATH for the mxe travis jobs as well.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use the 3.x wxwidgets mingw package in installdeps.
Add the win64 alias to installdeps for 64 bit mingw builds, like the
win32 alias for 32 bit mingw builds.
Check CROSS_ARCH in Architecture.cmake, set by our mingw toolchains.
Disable LTO by default for all mingw builds, not just amd64, because it
is unfortunately broken on i686 as well now.
Search for heuristically the most appropriate wx-config and set
wxWidgets_CONFIG_EXECUTABLE accordingly in the mingw toolchains.
Refactor the mingw toolchains somewhat, put common code into a common
file, add static toolchains.
For static toolchains, also search for a static zlib and set ZLIB_ROOT.
Change installdeps instructions to use ninja instead of make. Add ninja
to all target dependencies where it was missing, this may be incorrect
in a couple of the rarely used targets, if this is the case the affected
users are free to open an issue.
Also start using ninja on travis instead of make, except for libretro
which uses a GNU Makefile.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add support for the --no-openal and --no-ffmpeg command line options to
installdeps.
Implement them fully or partially depending on the code for that
distribution.
This will help with adding this variant of the build to the travis CI.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Detect and prefer the -gtk3 variants of the libwxgtk3.0 packages on
distros like kali-rolling.
Tested to work on newest kali-rolling and trusty.
Fix#564.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Include xenial and bionic in the travis build matrix, alongside trusty.
In `installdeps` check for the existance of `libswresample-dev` before
installing it because trusty does not have it, it uses libav instead of
ffmpeg. For this reason, ffmpeg is not built on trusty.
Turn off the `xvfb-run` test on bionic and xenial because it fails for
some reason.
Use `-DENABLE_FFMPEG=OFF` for xenial because the ffmpeg code currently
fails to compile with that version.
Stop trying to cache `/usr/local` for the mac build, storing the build
archive takes longer than installing the homebrew packages.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix the cmake ffmpeg detection and make it not print the detection
messages twice.
Add `-D__STDC_FORMAT_MACROS` to compiler flags, some versions of ffmpeg
require this.
Redefine `static_assert(x)` to the `static_assert(x, msg)` form in
`xbrz.cpp`. This is a C++17 feature and some versions of gcc wrongly set
`__cpp_static_assert` even though they do not support it.
Also we want to stick to C++11 for the time being, until there is
consensus to support a newer a version.
For that reason, change the MSVC flag `/std:c++latest` to `/std:c++11`
as well.
Remove `-DENABLE_OPENAL=ON` and `-DENABLE_LINK=ON` from travis config,
as these are now automatic.
In `installdeps` remove the hacks for supporting the `https://` apt url
for mxe and use an `http://` url instead. This works perfectly on Ubuntu
14 (trusty).
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
In cmake detect if the dependencies for link (sfml), recording (ffmpeg)
and openal are installed and default the features to `ON` if they are,
otherwise to `OFF`.
This simplifies the cmake usage.
Update the default column in the `README.md` table to `AUTO` as well.
Remove the cmake options from `installdeps` instructions, since they are
auto-detected.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The default Mac OS environment on travis no longer has brew bottle
support, so jobs time out.
Add the `osx_image` key to specify Mac OS 10.14 and Xcode 10.2.1.
Also try to re-enable link support using SFML.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Currently the SFML brew does not compile in the travis mac environment,
so do not install SFML via `./installdeps` for brew if `$TRAVIS` is set,
and add `-DENABLE_LINK=OFF` to cmake options for the mac travis job.
Also try to cache the `/usr/local` directory, to make the brew installs
faster, if this even works.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Make some changes to support out-of-the-box builds on FreeBSD:
- set cmake OpenGL type to `LEGACY`, the new `GLVND` type produces
unusable binaries on FreeBSD
- on FreeBSD add -I/usr/local/include to compiler flags, why this is
necessary I don't know
- look for llvm tools such as `llvm-ar` in `/usr/local/llvm-devel/bin`,
LTO works
- improve the `find_wx_util()` cmake function to handle `wx-config`
scripts named in the form e.g. `wxgtk3u-3.1-config`
- add FreeBSD support to `installdeps`
- make some minor changes to included headers based on macros such as
`__FreeBSD__` to compile on FreeBSD, including adding a `BSD.h` header
with some defines for e.g. `fseeko64`
- move the cmake X11 detection to before the wx compile tests, because
otherwise the extra compile flags for the wx tests make the X11 tests
fail
- make some minor changes to fix wx 2.8 compatibilty again, we don't
actually use 2.8 for FreeBSD but I was testing it
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Do not install the wxGTK-devel package on centos, as the wxGTK3-devel
package does come with a wxrc named wxrc-3.0.
This is a followup on 2097b5aa.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add support for RHEL/centos to installdeps. There is no SFML package.
Add some string compatibility stuff so that everything builds on wx 2.8
unicode builds.
TODO: add travis slaves for 2.8, with and without unicode
Disable the game frame spacer code on 2.8 because it does not work (the
frame does not expand.)
cmake improvements:
- set ENABLE_LTO=OFF for Debug builds by default
- set ENABLE_LINK=OFF if SFML cannot be found and continue
- use better logic for finding wx utilities wx-config and wxrc
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Closes#395Closes#297
The mxe package server key has been removed from the keyservers, allow
apt-key to fail and add `--allow-unauthenticated` to the apt-get
options.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
`stretch` mxe binaries are failing due to missing libraries like
`libssl.so.1.1`, try to use the `trusty` repo instead.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Disable the `--help` test for now, for some reason the exit code is 255,
something is still not quite working there.
Update installdeps to force a partial upgrade from trusty to xenial on
travis to get a newer version of libcurl-gnutls, which is necessary to
use the mxe package server.
Fix mxe package server repo url.
Add `mirror.mxe.cc` to list of apt hostnames to ignore SSL errors for.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The mxe pkg server seems to be back online with some changes, and an
invalid SSL certificate.
Also thanks to @denisfa's work on 7373da15 we can re-enable the `--help`
check on travis.
Let's see if this works.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
For msys2 dependencies in installdeps, make sure to only install msys2
layer ccache and NOT the mingw ccache, because the mingw ccache is
completely broken.
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.
Add some dependencies for the linux build that apt errors out on,
hopefully this won't affect newer ubuntu or debian.
Do an apt-get update before trying to install mxe dependencies for win32
cross builds, or the packages cannot be found.
Change installdeps to install wxgtk3 on arch instead of the wxgtk
package which uses gtk2.
Update the cmake code to check for the renamed wx-config executable
wx-config-gtk3 on arch, first checking for wx-config-gtk4 for the
future.