Commit Graph

64 Commits

Author SHA1 Message Date
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
Rafael Kitover 327611b7dd installdeps: add gcc-libgfortran to msys2 deps
Add gcc-libgfortran to list of deps, without it gcc-libs may fail to
update.
2019-01-05 13:04:12 -08:00
Rafael Kitover ebd2e74a8a installdeps: fix for a01deb28: use msys2 ccache
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.
2018-12-23 10:58:24 -08:00
Rafael Kitover a01deb28d9 installdeps: also install ccache
Add ccache to list of packages we try to install for any particular
distribution, the vbam cmake code will automatically find and use it.
2018-12-23 10:48:35 -08:00
retro-wertz aebda1b706 debian: update dependency
add zip, needed during compile
2018-09-22 07:40:22 -07:00
retro-wertz e32e7c5de2
installdeps: Add zip to openSuse dependency 2018-08-08 08:51:51 +08: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
Zach Bacon de25e9d76d
include zip for arch based systems 2018-07-22 10:29:28 -04:00
Rafael Kitover 52f5a02b55 fix installdeps for Ubuntu 18
Read libglew version from apt-cache, as it varies between Ubuntu
releases.
2018-07-10 04:44:38 -07:00
Rafael Kitover cc43db35af fix installdeps for Ubuntu
Read names of sfml libs from apt-cache, because version suffixes differ
between Ubuntu releases.
2018-07-10 11:10:25 +00:00
Rafael Kitover fde9d731a8 installdeps: add ccache to list of deps
Add ccache to list of deps for all platforms.
2018-06-27 02:06:28 +00:00
Rafael Kitover 77a3673d04 installdeps: install wx-common for mxe for wxrc
When cross building for win32, native wxrc is needed to generate xrc
files, add wx-common to mxe dependencies which provides it.
2018-06-27 01:58:33 +00:00
Rafael Kitover 90188e8875 installdeps: fix build instructions for mxe
Change cmake executable prefix from `x86-64` to the correct `x86_64` for
the 64 bit architecture.
2018-06-27 01:49:26 +00:00
Rafael Kitover 816aab9939 fix installdeps for ubuntu:trusty
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.
2018-06-27 01:38:43 +00:00
Rafael Kitover 2efcb620bd support and default to wxgtk3 not gtk2 on arch
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.
2018-06-18 02:44:19 -07:00
Rafael Kitover 0dc3e06c99 update installdeps for opensuse
ID_LIKE in /etc/os-release changed from "suse" to "opensuse suse",
change to match *suse* in the string.
2018-06-06 06:47:56 -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
Eleuin 9843af2b5a
Fix cmake directory in installdeps 2018-04-02 09:29:32 -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 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
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 268c638456 improve win32 dependencies git submodule handling
Use `git submodule update --remote --recursive` instead of `git
submodule update --init --recursive` so that the latest version of the
repo is always installed.

Run the command from cmake instead of throwing an error if the submodule
is not checked out. Only throw an error if the checkout failed or the
source tree is not a git checkout.

Don't add the `mingw-xaudio` include directory if using MSVC.

Remove the submodule check from src/wx/CMakeLists.txt, having it in the
main CMakeLists.txt is enough.
2017-09-19 06:11:41 -07:00
Rafael Kitover 5691ac0c0e installdeps: fedora fixes, including m32
Fix some syntax errors and extraneous output in fedora_installdeps().

"Fix" the 32 bit deps installer to try to ignore file conflicts between
i686 and host rpms, by first using rpm --force to install the 32 bit
rpms and then overwriting them with the host ones using --force as well.
This is hackish and fragile, but there aren't any good alternatives
right now.
2017-09-12 13:47:56 -07:00
Rafael Kitover 4b1c9b4e86 installdeps: minor refactoring/cleanup
Break command line argument processing and OS detection off into
functions called from `main()`.

Remove all references to cairo.

For fink, install the SFML package I made instead of turning off link.
2017-09-02 03:59:31 -07:00
Rafael Kitover 1a27f81342 installdeps: use -j$(nproc) not -j8 in info #146
Replace the hardcoded `make -j8` command in the build instructions with
a `-j` parameter that is the number of the host's CPUs minus one.

Subtracting 1 is done to reduce chances of overloading the host.

If the value is `1`, then don't print the `-j` flag at all.
2017-08-31 16:56:06 -07:00
Rafael Kitover 7b0078d2c1 ./installdeps tweaks for fedora/rawhide
When installing rpmfusion repos, try going back up to 3 releases in case
the latest rawhide release does not have an rpmfusion repo, and install
the repo packages with --nodeps so that they don't conflict with
system-release(XX).

If installing rpmfusion repos fails, continue without ffmpeg (and adjust
build instructions accordingly.)

If ffmpeg fails to install for any reason, show a warning and adjust
build instructions.
2017-03-25 04:02:52 -07:00
Rafael Kitover f56794e8a3 fix ./installdeps m32 for Solus
When calculating 32 bit dependencies, look only for -devel packages, and
match only -devel packages when checking for corresponding -32bit-devel
packages.
2017-03-24 01:38:34 -07:00
Rafael Kitover 41ead88dcb 32 bit cross compiling support on Linux
Add the `m32` parameter to ./installdeps to fetch 32 bit multilib
dependencies on Fedora, Arch and Solus linuxes and add a cmake toolchain
file to build with them.

For MSYS2 support both an `m32` and an `m64` to choose deps for 32 bit
or 64 bit mingw targets.

Adjust build instructions from ./installdeps to support both usages.

Other changes:

- use --nogpgcheck --best --allowerasing for dnf invocations for Fedora,
  the --nogpgcheck is necessary when Rawhide is confused about which
  keys it has, and the latter two are needed for upgrades that remove
  unneeded deps etc

- when finding GTK2, first try using pkg-config, and only fall back to
  the cmake script when that fails, pkg-config works better for cross
  builds

- add cairo to dep lists in ./installdeps for the time being

- for arch, list individual packages from base-devel instead of
  base-devel that do not require gcc-libs because of potential conflicts
  between gcc and gcc-multilib
2017-03-23 14:09:17 -07:00
Joshua Strobl 8013d226a0 Simplified Solus installdeps
Multiple previously specified packages are either already in system.devel or are dependencies of items such as libgtk-2-devel or libgtk-3-devel, dependencies of those dependencies, etc.
2017-03-23 02:49:08 +02:00
Rafael Kitover 0dc175cdb4 basic ./installdeps support for Solus Linux
Add basic support for installing deps for a Solus host build and update
README.md .

Support for mingw and 32 bit cross-builds may be added later.
2017-03-19 19:09:33 -07:00
Rafael Kitover 9dc740156b minor doc tweaks
- Add Ubuntu daily PPA link.

- Add link to releases tab for win/mac builds.

- Advise `make -j8` instead of `make -j10`.

- Clarify which dependencies are optional and which are required.

- Add ENABLE_ASM cmake option to the table.

- Replace wxLogDebug with wxString example to use .utf8_str() instead of
  concatenation, this is more correct.
2017-03-06 02:03:15 -08:00
Rafael Kitover ea4056e025 remove intermediate dependencies jpeg and tiff
jpeg and tiff are not direct dependencies and should be pulled in by
direct dependencies such as wx, remove them from README.md and
./installdeps.
2017-02-20 13:43:39 -08:00