Commit Graph

2279 Commits

Author SHA1 Message Date
ZachBacon aec23e3586 builder: re-enable ffmpeg, update dists
Update the following dists:

bzip2, xz, libiconv, gettext, ninja, meson, libgcrypt, libsecret, sdl2,
flac, libogg, libvorbis, wxwidgets

and the following ffmpeg deps:

graphite2, xvidcore, libgsm, opus, libsoxr, libass, libbluray, libvpx,
libx264, libx265

Enable ffmpeg for vbam again as we now have working recording code
thanks to @denisfa.

Disable graphviz and libzvbi for the time being since we don't really
need them.

For mp3lame use the msys2 patch to remove posix code instead of linking
to catgets.

For libogg and libvorbis on mac, add `-include /path/to/stdint.h` to
`CFLAGS` when building.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-28 01:10:04 -07:00
Edênis Freindorfer Azevedo 806dd7daa6 Fix circular `--config` for SDL port.
When using the command line options, we had a circular issue:
- using `LoadConfig()` before `ReadOpts()` would mean the `--config` is
ignored.
- using `ReadOpts()` before `LoadConfig()` would mean the command line
options were ignored in favor of the default ones.

If we want to use a custom `vbam.ini`, we need to load it with
`--config`. Now we only consider params order on command line.
2019-09-25 20:59:37 -01:00
Edênis Freindorfer Azevedo 1aa8afb4dc Drop dead code entirely.
All this code protected by `#if 0` is implemented already one way or
another. Hence the decision to remove it, instead of commenting.

This also removes the need of the branch `arthur/sdl2`.
2019-09-25 20:59:37 -01:00
Edênis Freindorfer Azevedo 531172c4be Fix displaying of link menu when `ENABLE_LINK=NO`.
We disable the items, but not the menu. So, there was an empty list
on `Options` > `Link` > `Type`.
2019-09-16 21:36:44 -01:00
Edênis Freindorfer Azevedo 07107096b8 [Windows] Fix crash when setting weekly updates.
It happens due to our wxRadioButtons having 3 options (indexed by 0, 1
and 2) but we trying to get the index 7 (due to want to check every 7
days).

We should still implement something like WinSparkle for Windows.

- Fix #499.
2019-09-16 21:36:44 -01:00
Edênis Freindorfer Azevedo efa09bdb07 Add faster sqrt code for xBRZ filters.
We use ASM code for Windows `x86` and Linux desktop. The others remains
the same.
2019-09-16 21:36:44 -01:00
Edênis Freindorfer Azevedo 10f5576ecf Fix config file when removing system accels.
We assign the `NOOP` id for every command disabled by the user, but not
the command name (just `NOOP`). When updating the configuration file,
any command with `NOOP` id is valid, even if the label does not match
`NOOP`. Hence this weird issue.

- Fix #502.
2019-09-16 21:36:44 -01:00
Edênis Freindorfer Azevedo 1c6b016853 [Windows] Fix remaining UTF-8 issues.
We were missing some `wxConvLibc` on the output code. This meant crappy
messages on windows.
2019-09-16 21:36:44 -01:00
Rafael Kitover a2f3126e17
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-14 22:22:00 +00:00
Rafael Kitover 1e9d167597
builder: pause before codesigning for win targets
Pause before `pass` asks for the `gpg` passphrase to retrieve the
password to unlock the windows codesigning certificate.

This is so that the user does not have `gpg` time out waiting for the
passphrase.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-14 21:46:01 +00:00
Rafael Kitover 0af5965ee1
builder: work on linux static binary
Merging some work I was doing on trying to make a working mostly static
linux binary a year ago, with some additional minor refactoring.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 16:42:43 +00:00
Rafael Kitover 33c43e3ad4
add -p:BuildInParallel=true to appveyor.yml
Hopefully this will speed up the appveyor builds at least a little bit.

We really need to switch to ninja at some point though.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 16:02:06 +00:00
Rafael Kitover 61141ebd3a
add -p:BuildInParallel=true to VS instructions
Add `-p:BuildInParallel=true` to the Visual Studio instructions for
`msbuild`, to build subprojects in parallel, without which the `-m`
option has no effect, both must be used.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 03:12:15 +00:00
Rafael Kitover 9ee6b54a68
cmake: remove invalid opt /std:c++11 for MSVC
Visual Studio 2017 only allows `/std:c++14` and higher, so remove the
`/std:c++11` option, we'll take the default of C++14 standard.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 03:04:20 +00:00
Rafael Kitover 0f2c8cab08
win: check APPDATA if LOCALAPPDATA is not found
Check for the APPDATA environment variable if there is no LOCALAPPDATA
environment variable for things like reading the config file.

Fix #407.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 03:01:16 +00:00
Rafael Kitover 32fbfec46c
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-10 23:26:00 +00:00
Edênis Freindorfer Azevedo cc51622928 transifex push/pull
Signed-off-by: Edênis Freindorfer Azevedo <edenisfa@gmail.com>
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 528c37f9e0 Allow "Browse" to be translated.
wxWidgets fails to translate some internal strings due to locale issues.

It is not clear how the current locale is detected, but it fails for
cases when the system is different from the set by the user. Eg: the
system is using `en_US`, but the user sets `LANG=pt_BR.utf8` for an
application. Some internal strings are translated because of `LANG`,
while others remain the same because `en_US`.
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo d8c981fb42 Fix toggles for video/audio layer options on menu.
We could not use key shortcuts for this, since it was only checking if
the option was activated on menu. This only happens if you open the
menu and click it, so the key shortcut does not work.
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo c0f96425e6 Show all commands available on menu.
We move from `Other commands` to several places of our main menu. This
way we allow texts to be translated and easier view of them for users.
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 51fa150f1c Adjust MMX menu variable and position.
It should only appear on `x86`.
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 27b038b378 Show messages about operations of state slot. 2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 2e24845711 Allow translation of the words `Open` and `Quit`. 2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 54991c5b14 Add extra keys default input when using GUI.
We also set the extra keys for controller input when using `defaults`
option.
2019-09-10 07:59:56 +00:00
Rafael Kitover b358c051c9 Fix compilation issue when `ENABLE_DEBUGGER=Off`.
We protect all code relevant to disabling this property with either
`BKPT_SUPPORT` or `NO_DEBUGGER`. This is mostly debugging options or
prints scattered around the code.

We also adjust cmake to ignore the specific files surround it, but
allowing the rest of the GUI to work.

- Fix #431.
2019-09-04 14:31:11 +00:00
Rafael Kitover 2a2be95397
builder: msys2 fixes
For cmake, the dependency on `bin2c` when using `HostCompile.cmake` does
not work if it's set to `bin2c.exe`, for whatever reason, so remove the
suffix.

Add `-DCURL_STATICLIB` to `CPPFLAGS` etc. to link to `libcurl`
correctly, needed for `osslsigncode`.

Add `--without-brotli` to curl configure args, because it can try to
link to some existing version and fail.

Add a `gmake` symlink to the system `make` into the `PATH` because some
things like Strawberry Perl install their own copy of `gmake` into the
`PATH`.

Add `pass` to list of msys2 deps, needed to store the windows
codesigning cert password.

Use `$CMAKE_ARGS` instead of `$CMAKE_BASE_ARGS` for building vbam,
adding `-DCMAKE_INSTALL_PREFIX=/usr`, this is necessary for extracting
the locales correctly.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-03 00:14:37 +00:00
Edênis Freindorfer Azevedo f1438e0f0a Check ASAN support when `ENABLE_ASAN=ON`.
We check if the compiler has asan support when the option is enabled.
If it does not, then we stop compiling with the proper message.

To test this, we use `gcc (GCC) 4.4.7` (no asan support) and
`gcc (GCC) 9.1.0` (asan is supported). Call cmake like this:

`cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=On` and
`CXX=g++-4.4 cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=On`

we then check that it fails for the older version and it works for
the newer gcc, like expected.

- Fix #409.
2019-09-02 20:52:08 +00:00
Rafael Kitover ade64db7a6
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-01 20:42:30 +00:00
Rafael Kitover 8b3470507d
cmake: check for ffmpeg >= 4.0.4
Check for the specific `ffmpeg` lib versions in `ffmpeg` `4.0.4` "Wu",

Do not pass `-DENABLE_FFMPEG=OFF` to the xenial travis job, as this is
detected automatically now.

Add a note about the required ffmpeg version to `README.md`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-01 20:37:39 +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 23224fbaac
update factory reset instructions in README.md
Replace the Windows instructions for deleting the config file with the
much simpler `Help -> Factory Reset` option, which does the same thing.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-31 16:23:34 +00:00
Rafael Kitover 381a7bfe78
/std:c++latest for MSVC, fix bool flip, warn opts
Use `/std:c++latest` for Visual Studio because the XBRZ 1.7 code
requires at least C++17.

Replace the use of `bool++` in `GBALink.cpp` which is now apparently an
error with `bool = !bool` to flip the value.

Use `/W4` to enable a good amount of warnings in Debug mode, and `/W0`
to disable warnings entirely in release modes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-30 01:57:01 +00:00
Edênis Freindorfer Azevedo 234f1e9b1a Update to xBRZ `1.7`.
Get files from here `https://sourceforge.net/projects/xbrz/files/xBRZ/`.

Then, update the src to handle pitch params. For our case, the pitch
is necessary because we deal with borders (top and right) of our source
image. Normally, we would want to scale without it, and therefore we
need to adjust the pointers to skip the borders.

If we have a `width + 1 pixel border` per line, the we need to scale
a image with `width` line size, but advancing the pointer for each new
line processed including the border on the count.

Also, since our output pointer also allocates for the border, we need
to adjust the output moving pointer for each line in a custom way.
(output border in this case)

- Fix #164.
2019-08-28 22:07:52 +00:00
Rafael Kitover 290012d1a7
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-21 20:28:47 +00:00
Edênis Freindorfer Azevedo 06a9d786c2 Allow UPS patch for GBA games.
From my very superficial understanding, the `rom[]` resize happens
only when `rom_size` is greater than 0x2000000.

We should probably study this better for an actual explanation.

- Fix #487.
2019-08-21 00:45:46 +00:00
Rafael Kitover 1949cdb37a
transifex push/pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-20 23:24:36 +00:00
Edênis Freindorfer Azevedo 03121c69c0 Add support for autohold buttons.
We implement this in the same way it is being done on `vba-rr`.

- Fix #414.
2019-08-20 23:00:48 +00:00
Edênis Freindorfer Azevedo e87213e369 Fix indentation. 2019-08-20 23:00:48 +00:00
Edênis Freindorfer Azevedo cf47942f09 Fix Autofire {L,R}.
We were using directionals (left and right) instead.
2019-08-20 23:00:48 +00:00
Rafael Kitover 4993cb88dc
remove tea-ci .drone.yml and installer.nsi
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-20 09:24:21 +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 c64dd259b9
Update README.md
Fix Visual Studio instructions.

Add links for all dependencies.

Fix grammar/omissions etc.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-20 07:31:38 +00:00
Rafael Kitover 8ceef90fc4
fix appveyor visual studio build
See #465

To compile the build tool `bin2c`, add a target with `add_executable()`
on visual studio instead of using `HostCompile.cmake` because running
`cl.exe` fails in the appveyor visual studio environment, see:

https://developercommunity.visualstudio.com/content/problem/325122/c1356-unable-to-find-mspdbcoredll.html

Also update the dependencies module to latest.

appveyor build now tested to work.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-20 06:55:07 +00:00
Rafael Kitover a8b7b72dbd
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-19 22:16:33 +00:00
Rafael Kitover f5eabb3514
builder: disable LTO on 64 bit mingw
LTO on 64 bit mingw still produces segfaulting binaries.

Turn off LTO for just that platform and leave it enabled for all other
platforms.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-19 17:23:45 -04:00
Edênis Freindorfer Azevedo fc2eb38fcd Fix behaviour of `Tools` > `Memory Viewer` (#486)
We fix the wxWidgets error message when trying to open the dialog
via menu.

The scrollbar behaviour has been enhanced to adjust itself between
200 and 300 rows from GUI (0x6c0 memory to 0xf9ff - GB example).

Clicking on top or bottom line of the memory values now moves 1 row
position backwards and forward, respectively.

Arrow keys also functional for navigation.

* Remove clicking on top/bottom behaviour.
2019-08-19 19:25:47 -01:00
Rafael Kitover 2958af01ca
builder: mingw improvements + misc.
- default ENABLE_NLS to ON except for vcpkg, broken in e2f06210

- update zlib URL

- use openssl 1.1.1c instead of 1.0.2p, parallel build works now!

- add osslsigncode for mingw to codesign windows binaries, and
  automatically sign in `build_project()`

- add curl (for osslsigncode, which needs libcurl)

- use current master for wxwidgets instead of 3.1.2

- make the `translations.zip` in `build_project()` for windows

- on mac, unlock the login keychain before codesigning (this is
necessary if using e.g. ssh.)

- do not fail if the user does not have codesigning or gpg keys

- fix wxwidgets configure options on mac (need to append to
  `DIST_CONFIGURE_OVERRIDES` instead of `DIST_ARGS`.)

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-19 13:15:01 -07:00
Rafael Kitover 3923b28fc3
transifex pull/push
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-08-18 19:01:10 +00:00
Rafael Kitover 51f61a3afb
Merge remote-tracking branch 'vbam-libretro/master' 2019-08-18 18:46:55 +00:00