Commit Graph

96 Commits

Author SHA1 Message Date
Rafael Kitover ce7cc4e223
build: add FAudio to MSYS2 deps
In preparation for FAudio support, add the dependency to ./installdeps
for MSYS2 toolchains.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-03-30 17:37:20 +00:00
Rafael Kitover 404e9a1a55
build: add clang to ./installdeps for MSYS2
Add clang when installing for CLANG* environments in MSYS2 because this
package is no longer included by default in the set of packages we
install.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-03-08 23:13:32 +00:00
beef 9e4c8e1753 build: fix gentoo dependency namespaces
Change sys-devel to dev-build to match current gentoo package naming
convention. Also add --ask flag to prompt for confirmation before
merging packages.

Signed-off-by: Mohamad Issawi <68k@segv.moe>
2024-02-20 06:20:07 -08:00
Rafael Kitover 60fc096f1a
build: add libglu-devel for solus in installdeps
Add libglu-devel to the list of dependencies for solus in installdeps,
this is required for wxWidgets and OpenGL.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-02-05 17:32:45 +00:00
Rafael Kitover 3c5348983b
build: add Alpine Linux support to installdeps
Add basic support for Alpine Linux to installdeps.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-12-23 09:46:47 +00:00
Rafael Kitover 7a7778c644
build: fix installdeps for new Debian wx packages
Update installdeps for Debian to find the new version wx packages, but
still use the -gtk3 variants on very old versions of Debian.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-09-04 20:41:17 +00:00
Rafael Kitover 6a4115ca45 ci: fix macOS runner
It seems the GitHub Actions macOS image has a conflicting python in
/usr/local, invoke:

brew -v install python
brew link --overwrite python

, before installing dependencies.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-12-29 20:29:53 -08:00
Rafael Kitover e10bf7bc4b
installdeps: check for newest wx on Fedora
For Fedora ./installdeps support, install either wxGTK-devel or
wxGTK3-devel, depending on which has a higher version.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-12-24 06:41:00 +00:00
Fabrice de Gans 297d7c06c4 [hidpi] Use wxWidgets 3.2 on Windows
* Remove the custom handling for pre-3.1.4 builds on Windows since
  both the mingw and msvc builds now use 3.2.
* Remove wxDPIChangedEvent handling, since this triggers a resize,
  which has the same effect.
* Implement main/WinMain ourselves, rather than relying on wxWidgets
  macros. This allows us to initialize the console earlier in the
  process.
* Add an explicit dependency on the manifest file to trigger a link
  when it is modified.
2022-10-15 22:25:54 +00:00
Rafael Kitover e140ba816c
installdeps: remove wxgtk2 for Arch on failure
The wxgtk2 package being installed may prevent the installation of the
newer wxwidgets-gtk3 package, remove it on pacman failure and try again.

See:

https://archlinux.org/news/wxwidgets-32-update-may-need-manual-intervention/

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-03 09:34:05 +00:00
Deen O'Connor 76bf554161
installdeps: use correct package name for libsdl2
The actual package name for libsdl2 is libsdl2-2.0-0 not libsdl2-2.0 in
Debian/Ubuntu and probably others, and this only worked by accident
due to apt doing a regex search for packages.

Get the correct package for the latest version of libsdl2 from
apt-cache.

Also fix the other lib package searches via apt-cache to return the
latest version.

Resolve #882.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-07-04 19:32:09 +00:00
Rafael Kitover b28982a89a
installdeps: support UCRT64 on MSYS2
Same as MINGW64, works fine.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-04-19 03:58:01 +03:00
Rafael Kitover 1fc449b2c7
installdeps: don't link mac brew ffmpeg
Stop linking brew ffmpeg, it links itself by default.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-03-20 18:10:37 +00:00
Rafael Kitover 1a6f40a79c
installdeps: re-enable ffmpeg for mac brew
Thanks to @ZachBacon in 1e0eea3c (recording: fix ffmpeg5 compat, 2022-03-18) the build works with ffmpeg5 from brew.

Update build instructions from installdeps to not disable ffmpeg
anymore.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-03-20 13:53:32 +00:00
Rafael Kitover 2810f4b228
installdeps: update for mac brew
Replace wxmac obsolete package with wxwidgets.

Use brew install -f (--force) to install all deps.

Unlink and relink gettext, wxwidgets and ffmpeg for every invocation.

Add -DENABLE_FFMPEG=FALSE to cmake invocation instructions because brew
has ffmpeg 5 and we cannot build with it yet.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-03-18 19:19:23 +00:00
Rafael Kitover 8caea3ae6c
installdeps: add -DCMAKE_BUILD_TYPE=Release
Add -DCMAKE_BUILD_TYPE=Release to cmake invocation in build instructions
in installdeps.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-03-18 19:18:08 +00:00
Rafael Kitover a7eeb17645
Use gcc binutils for rc compiler on MSYS2 CLANG64.
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>
2022-02-04 04:18:36 +00:00
Rafael Kitover 347df44497
Add ccache to pkg list in installdeps for MSYS2.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-02-04 04:16:26 +00:00
Rafael Kitover fa56242669
Add MSYS2 CLANG64/32 support.
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>
2022-01-31 03:26:52 +00:00
Leon Tepe 276689edda
Fix Arch installdeps
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.
2021-08-08 12:33:19 +02:00
Rafael Kitover e55ed5c0f4
installdeps: Support NixOS.
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>
2021-02-27 05:10:55 +00:00
Rafael Kitover 0ddd50273c
Fix mxe apt repo selection.
Default to latest, which is bionic, for earlier repositories, match all
intermediate release code names.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-29 21:51:32 +00:00
Rafael Kitover 2727f683f1
Support archlinux derivatives in installdeps.
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>
2020-09-03 16:31:25 +00:00
Rafael Kitover 9c8604c58c
installdeps: Move git mod checkout after git inst.
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>
2020-08-23 06:13:46 +00:00
Rafael Kitover bfab4321cb
Improve gentoo support for installdeps.
- Use gtk3 slot for wxWidgets.

- Fully qualify all ebuilds.

- Only rebuild if necessary.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-01 12:24:41 +00:00
Rafael Kitover 05bd2a95cd
Remove libpng direct dependency.
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>
2020-03-01 13:56:29 +00:00
Rafael Kitover 7bbbf04716
installdeps: fix mxe compiler ccache symlinks.
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>
2020-02-03 01:41:37 +00:00
Rafael Kitover 3edd9ba756
cmake: Fix fedora mingw build + misc improvements.
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>
2020-02-01 16:43:08 +00:00
Rafael Kitover ed14c7bc76
installdeps: Add --no-openal and --no-ffmpeg #563.
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>
2019-11-13 01:34:46 +00:00
Rafael Kitover f3282ef0a9
installdeps: debian: detect gtk3 version of wxgtk
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>
2019-11-12 18:45:43 +00:00
Rafael Kitover e113508593
installdeps: fix git submodule update
Add `--init`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-11-03 00:24:18 +00:00
Rafael Kitover 252d3f65ab installdeps: detect correct mxe apt repo
Try to guess the correct mxe apt package repository based on
`lsb_release` codename.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-17 22:25:56 +00:00
Rafael Kitover 0b9c771027
travis: more ubuntu dists, fix mac cache
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>
2019-08-31 23:50:15 +00:00
Rafael Kitover d9e4a0874d
build fixes: ffmpeg, xbrz, travis, C++ version
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>
2019-08-31 22:58:59 +00:00
Rafael Kitover d9a7e0c964
cmake: auto-detect sfml, ffmpeg and openal
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>
2019-08-20 08:21:38 +00:00
Rafael Kitover f54dd25bb8
travis: fix gettext on mac + brew
cmake cannot find gettext, force link the gettext brew.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-04 03:51:00 +00:00
Rafael Kitover 3490620e0f
travis: use Mac OS 10.14 and Xcode 10.2.1
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>
2019-05-29 23:26:46 +00:00
Rafael Kitover 500506cbd4
travis: disable link/SFML for mac
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>
2019-05-22 21:06:42 +00:00
Rafael Kitover 2fedaa63a6
support FreeBSD
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>
2019-04-25 16:22:07 +00:00
Rafael Kitover 6ec46678c5
installdeps: centos: do not install wx 2.8
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>
2019-03-28 22:20:16 +00:00
Rafael Kitover 2097b5aaa5
wx 2.8 compat fixes, centos support, cmake fixes
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 #395
Closes #297
2019-03-28 21:45:06 +00:00
Rafael Kitover 6ca59412a8
travis: disable mxe pkg key
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>
2019-03-15 04:44:45 -07:00
Rafael Kitover 513b0559ce
minor travis update for mingw jobs
Use the right gpg key id for the mxe apt server and remove the
`--allow-unauthenticated`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-12 19:32:14 -07:00
Rafael Kitover 36fbf71527
travis update attempt 5
`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>
2019-03-08 20:52:09 -08:00
Rafael Kitover 77bcbbf445
travis update attempt 4
Pass --allow-unauthenticated to apt when installing mxe packages,
perhaps the gpg key changed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-08 20:03:17 -08:00
Rafael Kitover 7b3a3a0c4f
travis update attempt 3
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>
2019-03-08 19:55:10 -08:00
Rafael Kitover 8f0a578ade
travis update attempt 2
Use `xvfb` as per instructions at:

https://docs.travis-ci.com/user/gui-and-headless-browsers/

to run the `--help` check on linux.

Try https url for `pkg.mxe.cc`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-08 17:13:48 -08:00
Rafael Kitover dbd1d8c1f8
attempt to re-enable travis mingw slaves
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>
2019-03-08 16:56:46 -08:00
Rafael Kitover 91ee8cad9c installdeps: check gtk3-classic on arch/manjaro
Don't try to install gtk3 if the user has gtk3-classic installed on arch
and manjaro.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-24 14:43:48 +00:00
Rafael Kitover 3c28a18976 installdeps: support -m32 builds on opensuse
Also allow specifying target as "-m32" instead of "m32".

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-21 22:33:14 +00:00