Commit Graph

2502 Commits

Author SHA1 Message Date
Rafael Kitover 2ba0d316cd
cmake: Include .pdb in zips of debug builds.
Include the visualboyadvance-m.pdb file alongside the .exe for Visual
Studio debug builds.

Visual Studio generates this file with the debug symbols for debug
builds. The file is not generated for release builds. It is also
generated for RelWithDebInfo builds.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-09 04:28:52 +00:00
Rafael Kitover 2fe84053e1
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-09 02:36:26 +00:00
Rafael Kitover f1099a213a
Check return value of soundInit().
soundInit() returns a bool to indicate success, and failure inevitably
leads to crashes as the emulator tries to use a NULL soundDriver.

On false, popup an error dialog saying that the sound driver failed to
initialize, this is at least better than crashes, which will also need
to be fixed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-07 13:30:28 +00:00
Mystro256 410ede543c
Check for null pointer in soundReset().
Check that soundDriver is defined.
2020-03-07 13:08:44 +00:00
negativeExponent 9d1d707c01
Limit ROM size to 32 MiB.
Limit the utilLoad() function in src/Util.cpp to 32 MiB.

This function loads a file from disk and returns a memory image of it.

This is only used to load ROMs currently.
2020-03-07 11:45:19 +00:00
negativeExponent fd319d2184
GB: Check header for a valid ROM file.
Check some magic numbers in the ROM header to detect Game Genie and Game
Shark ROMs, and check for the Nintendo logo in the header in normal
ROMs.
2020-03-07 11:43:00 +00:00
Rafael Kitover 2f23467245
cmake: When replacing old tags, use origin.
Fetch new set of tags from the origin remote explicitly rather than
whatever remote is associated with the current branch.

In this way, old tags on other remotes get overwritten as well.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-07 11:36:40 +00:00
Rafael Kitover 20f57587e2
cmake: Replace old git tags if found.
Detect old badly formatted git tags we used in the user's git clone, and
if found delete all tags and fetch them from the origin.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-05 15:04:19 +00:00
Rafael Kitover e220c9bc91
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-04 15:29:57 +00:00
Rafael Kitover c258f6c1c8
Remove libpng from dependencies in README.md.
Followup on 05bd2a95 and 513af13d.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-02 19:15:38 +00:00
Rafael Kitover 995c2cb706
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-01 14:03:10 +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 f2e81b8e4b
Clarify direct commit policy in manual.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-01 12:50:52 +00:00
Edênis Freindorfer Azevedo 513af13ddc Replace `libpng` code for `stb_image` one.
It is a very straightforward replacement calls.
2020-03-01 09:54:43 +00:00
Edênis Freindorfer Azevedo 8f48c1f01d Fix weird `wxWidgets>=3.0` error message.
ASSERT INFO:
/usr/include/wx-3.0/wx/object.h(160): assert "wxDynamicCast(ptr, T)"
failed in wxCheckCast(): wxStaticCast() used incorrectly
2020-03-01 09:54:43 +00:00
Edênis Freindorfer Azevedo 7f1a3a932c Add stb_image headers to cmake. 2020-03-01 09:54:43 +00:00
Edênis Freindorfer Azevedo 4da422d02b Update stb_image headers to latest version.
We are going to remove our libpng for stb_image.
2020-03-01 09:54:43 +00:00
Rafael Kitover 3ca35d9ca6
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-29 02:31:11 +00:00
Rafael Kitover 0a451d11d3
Tranisfex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-27 00:12:03 +00:00
Rafael Kitover 229bf815e0
Revert f1abbc5f, vcpkg upgrade is fixed.
vcpkg upgrade is fixed via:

f6d52648ec

Use upgrade --no-dry-run again to install the first package to upgrade.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-25 20:40:22 +00:00
Rafael Kitover 5c0903d651
Add developer manual.
Start a developer manual for the project where we will keep policies,
guides and processes for the project in DEVELOPER-MANUAL.md.

Describe the policies for receiving and resolving github issues.

Describe the policy for git commit messages on pull requests and add git
notes for collaborating on a branch.

Describe the policy for commits from maintainers.

Describe how to set up a native windows powershell development
environment and some powershell tips.

Describe the requirements and steps for the current release process.

Replace the CONTRIBUTING section of the README.md with a link to this
manual.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-25 19:51:53 +00:00
Rafael Kitover 32e7c69726
Gettext pot update improvements.
Extract strings from all wx sources, not just the enabled ones.

Ignore comments in the generated pot when checking if it was updated, we
don't care about just changes in line numbers.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-24 21:06:23 +00:00
Rafael Kitover 2f0653824e
Enable XAudio2 for Windows vcpkg build.
Add necessary headers to the dependencies submodule and default the
cmake option to on.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-24 20:49:01 +00:00
Rafael Kitover ba14cadba1
Fix 0e8e46f0 for gcc.
gcc (mingw) does not allow converting a const char*[] to a char**
without -fpermissive. Make some adjustments to the string handling to
execute the cmd.exe command to delete the temp file.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-24 19:46:50 +00:00
Rafael Kitover 0e8e46f0b7
Windows: Fix deleting tempfile for winsparkle dll.
Trying to delete the temp file for the winsparkle dll after unloading
the dll would still produce an access denied error, presumably because
for whatever reason not all resources used by the dll were freed.

Instead of trying to immediately delete the file, start an asynchronous
cmd.exe process to sleep for 2 seconds and delete the file. This gives
the app time to exit, after which the file can be deleted.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-24 13:17:32 +00:00
Rafael Kitover 89d378eb71
cmake: Fix gettext pot update check.
When the feature was added in d93f6350, I did not adequately test for
the normal case when the pot is not updated.

This does not work because the pot has a timestamp in the
POT-Creation-Date: field.

Fix check-pot-update.cmake to ignore the pot timestamp and not report
the pot as changed when it has not been.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-20 23:46:09 +00:00
Rafael Kitover 2504596140
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-19 23:55:25 +00:00
Rafael Kitover 06b3affeef
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-19 10:49:47 +00:00
Rafael Kitover 4b4b770495
Transifex push/pull.
pot made using new cmake code from d93f6350.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-17 09:13:08 +00:00
Rafael Kitover d93f6350d0
cmake: Generate gettext pot automatically.
Remove po/update_pot.sh and generate the gettext .pot source
automatically in cmake on every build instead.

If the .pot is actually updated, print a loud message at the end of the
build to commit the result and push to transifex.

Fix the gettext tools and package loading block to only run when
ENABLE_NLS is enabled and find the xgettext and msginit binaries in the
Windows case as well. xgettext is used to generate the .pot.

Refactor the SRC_WX/HDR_WX/RES_WX/XRC_SOURCES handling to use only
relative paths and move all generated files into RES_WX. This was
necessary to generate the .pot from cmake.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-17 08:34:32 +00:00
s520 a320377040
Fix: a issue with loading e-Reader dot code (#608)
Fix issues with {sav,load}ing e-Reader `Dot Code`.

If `Dot Code` file is not specified, it tries to continually read it and does not accept input.

In Japanese (very likely other languages as well), the path of `Dot Code` file is garbled
internally due to failing conversion to UTF-8.
2020-02-15 14:02:53 -03:00
Rafael Kitover 951e8e0ebe
cmake: Check UPDATE_APPCAST before TAG_RELEASE.
Check for UPDATE_APPCAST being set before checking for TAG_RELEASE, as
the UPDATE_APPCAST script may be run in the same build directory where
TAG_RELEASE was just run.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-08 23:22:31 +00:00
Rafael Kitover 9475474ee6
cmake: Add UPDATE_APPCAST script for appcast.xml.
Add the -DUPDATE_APPCAST=TRUE option to invoke the UpdateAppcast.cmake
script, which clones the github pages repo and sets the version in the
appcast.xml to the last tag, presumably made with -DTAG_RELEASE.

The script prints out a final set of instructions to actually push the
change to git.

If the option -DUPDATE_APPCAST=UNDO is used, the clone is removed and no
changes are made.

Also use the correct method of splitting the tag list output into
multiple lines.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-08 22:53:53 +00:00
Rafael Kitover 19dff6c911
Make win32 dependencies submodule point to master.
Use the new git feature to point dependencies submodule to the tip of
its master.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-08 21:46:22 +00:00
Rafael Kitover 0b419ee849
Revert snap store badge change.
It seems only the svg version is available.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-08 04:42:12 +00:00
Rafael Kitover 00cd19f640
README.md: remove snap status, small store badge.
Remove snap build status since we are not using that anymore.

Use the png instead of the svg for the snap store badge as it's not as
large.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-08 04:33:30 +00:00
Rafael Kitover 83614290be
Turn on winsparkle update checking support.
Default to ON on Windows for x64 or x86.

Set new appcast URL, this will be in the github pages repo.

We will need to get everything ready for the next release.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-08 04:26:50 +00:00
Rafael Kitover f1abbc5f83
cmake: Use vcpkg remove/install instead of upgrade.
vcpkg upgrade is currently broken, see:

https://github.com/microsoft/vcpkg/issues/9916

Use remove followed by install, which does practically the same thing,
as a workaround.

Hopefully fix current appveyor build failures.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-05 17:56:05 +00:00
Rafael Kitover 4aab08c47b Set link timeout default to 500ms, fix prev. dflt.
Default the linkTimeout ConfigManager variable to 500 (milliseconds.)

Detect if the previous default is set, which 1, and set to 500, to
repair existing configurations.

This may reduce the amount of reports about link being broken, as some
people have certainly not checked this setting, and the default should
not be so wrong.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-04 23:01:11 +00:00
Rafael Kitover 136c094f0c Add option to set link network port.
Add field for the network port to the start link dialog, default is 5738
as before.

The port is stored in the user's options config.

Add TextCtrl support to UIntValidator for this.

Related: #594.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-04 23:01:11 +00:00
Rafael Kitover 98f3948ea8
cmake: Add dep on catalogs for translations.zip.
This doesn't work to pick up changes from changed translations files
though, because git does not store file timestamps.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-03 18:10:29 +00:00
Rafael Kitover 1d6342d6cb
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-03 15:38:23 +00:00
Edênis Freindorfer Azevedo 789cd2d0f0
Revert "Enable layers in non-tile modes."
We need to use proper documented behaviour when coding the
core, therefore this should be reverted until a proper
solution is done.

This reverts commit ca3b63d64c.
2020-02-03 07:38:26 -03: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 bb23357d47
builder: disable libwebp in libtiff.
Fixes mac build.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-02 08:13:13 -08:00
Edênis Freindorfer Azevedo ca3b63d64c
Enable layers in non-tile modes.
The current code is very messy as far as GFX goes. There are more
elegant ways of tackling this issue, but they are very difficult with
our current code.

The idea behind this issue is that the backgrounds are not switching
properly for the lcd. So we enable the layers accordingly to
`layerSettings & DISPCNT` on every `CPUUpdateRenderBuffers`.

The bits of `layerSettings` enconde each layer and objs.
We actually only need 2 of these, but I can't do much more here
unsupervised.

- Fix #376.
2020-02-02 15:49:02 +00:00
Rafael Kitover 213f47ec96
builder: minor fixes for mingw.
Search the lib-prefixed names of intl/iconv/charset libraries first to
avoid dlls being linked.

Update toolchain files to include the common source by full path, fixes
using them as toolchains for other projects broken in 3edd9ba7.

Update URL for nasm, use newer jpeg-turbo, tiff and wx.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-02 03:35:26 +00:00
Rafael Kitover 3ca67b9d5d
builder: disable openal for 32 bit mingw.
XP users may not have openal, and it's not an important feature.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-02 03:32:24 +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 ba9c10d566
cmake: Make FileIterator more correct, add eg..
Add macro fi_check_done() to set fi_done if leftover contents is empty,
use it in both fi_open_file() and fi_get_next_line().

This fixes the behavior when the opened file is empty and makes the code
cleaner.

Add a usage example to top comment.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-01-26 23:35:09 +00:00