1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00
Commit graph

2650 commits

Author SHA1 Message Date
Samuel Gomes c0e3f3608c Add O2 to build.mk 2022-09-18 23:46:54 +05:30
Samuel Gomes fa0ba3e5d8
Merge branch 'main' into main 2022-09-18 14:49:58 +05:30
github-actions[bot] 8f16eb405d Automatic update of ./internal/source 2022-09-17 23:20:02 +00:00
Matt Kilgore 500bf17279
Merge pull request #182 from mkilgore/fix-devices-console-only
Fix various build issues - #172, #173, #178
2022-09-17 19:02:09 -04:00
Samuel Gomes 9681aa1d30 Update code to use C++ unordered_map 2022-09-18 00:03:08 +05:30
Matthew Kilgore c93da8db72 Add tests for SOUND and PLAY "MB"
These tests were intended to be added by #171, but the Linux build was
having problems. The issues with the build have since been resolved so
the tests are getting added back in.

Fixes: #173
2022-09-17 03:06:24 -04:00
Matthew Kilgore aea4a6058e Fix linking audio when using $CONSOLE:ONLY
A quick fix, but providing `DEPENDENCY_CONSOLE_ONLY` when compiling
audio.cpp tells `common.h` to avoid pulling in `freeglut.h`, which fixes
the linking issue.

Fixes: #172
2022-09-17 03:06:24 -04:00
Matthew Kilgore a4d910207e Link winmm when using _DEVICES on Windows
The _DEVICES command pulls in some stuff that depends on `winmm`.
Normally this isn't a problem, but if `$CONSOLE:ONLY` is used then this
dependency can actually get removed from the `CXXLIBS` and cause linking
to fail.

It's easy enough to fix this by always adding `-lwinmm` if `_DEVICES` is
in use.

Fixes: #178
2022-09-17 03:06:24 -04:00
Matthew Kilgore 581460abbc Remove unused variables 2022-09-17 03:06:24 -04:00
Matthew Kilgore 870e67a99b Add $CONSOLE:ONLY and libz tests
libz tests were missing, I added one to test the libz dependency.

Additionally $CONSOLE:ONLY creates many weird interactions and is
currently broken in some cases. This adds tests for all the dependencies
that can work with $CONSOLE:ONLY to verify that they compile correctly.
2022-09-17 03:06:24 -04:00
Matthew Kilgore 2deac87b60 Fix Linux build agent audio problems
It's still not entirely clear what the underlying issue is, but the ALSA
device provided by pulseaudio stops working after so many tests use it.
I've tried various approaches, but simply restarting pulseaudio after
every test is a bruteforce but successful solution. In practice it also
doesn't have any noticeable performance penalty, so it seems like a file
solution.

The `CI_TESTING` environment variable is used to avoid restarting
pulseaudio if the tests aren't being run in the CI environment (we don't
want to restart your pulseaudio instance if you're running them locally!)
2022-09-17 02:41:22 -04:00
Samuel Gomes bb8bd56689 Merge branch 'main' of https://github.com/a740g/QB64PE 2022-09-17 08:53:38 +05:30
Samuel Gomes a100a434e4 Fix #175 2022-09-17 08:53:32 +05:30
Zachary Spriggs b06e5dd70b
Merge pull request #176 from QB64-Phoenix-Edition/Fix_batch
Fix errorlevel check
2022-09-13 19:29:41 -04:00
Zachary Spriggs bd5e08e0a5
Fix errorlevel check
Since errorlevel wasn't enclosed in percents, it wasn't catching the 64 bit choice. Added percents around it and now it is allowing a 64 bit choice.
2022-09-13 17:31:02 -04:00
github-actions[bot] 4c8dbec69c Automatic update of ./internal/source 2022-09-11 17:00:19 +00:00
Matt Kilgore 6a72a224a4
Merge pull request #174 from mkilgore/release-3.2.0
Version 3.2.0
2022-09-11 12:46:44 -04:00
Matthew Kilgore 443838485e Version 3.2.0 2022-09-11 11:50:16 -04:00
Matt Kilgore c89a66d01e
Merge pull request #161 from mkilgore/fix-mousemove-fullscreen
Fix _MOUSEMOVE when window is resized
2022-09-10 16:02:32 -04:00
Matthew Kilgore 84f1165776 Fix _MOUSEMOVE when window is resized
`sub__mousemove` is trying to use `x_scale`, `y_scale`, `x_offset`, and
`y_offset` to calculate where the mouse should be in the event the
window coordinates are different from the screen coordinates.

Unfortunately, all four of those variables are actually never set in the
program. The real scale values and offsets (in the event of
letterboxing) are stored in `environment_2d__` values. This change
switches `sub__mousemove` to simply use the correct values when
calculating the mouse position.

Because `x_scale` and `y_scale` are not used anywhere else I just
removed them completely. I wanted to remove `x_offset` and `y_offset` as
well but there are a few spots that make use of it. It must be a bug,
since they are never assigned values other than zero, but I'm not sure
if the correct fix for the other locations is to use the
`environment_2d__` value or do nothing, so I'm leaving them for now and
we can address them later.
2022-09-10 15:31:22 -04:00
Samuel Gomes e57ee0d7b3
Merge pull request #171 from a740g/main
Fix #169 & #170
2022-09-11 00:34:43 +05:30
Samuel Gomes 64f0826308 Merge branch 'main' of https://github.com/a740g/QB64PE 2022-09-10 11:31:05 +05:30
Samuel Gomes 9eb8767839 Remove new audio tests to check if CI tests passes 2022-09-10 11:31:01 +05:30
Samuel Gomes 73f1b37c82
Merge branch 'QB64-Phoenix-Edition:main' into main 2022-09-10 09:51:51 +05:30
Samuel Gomes 1c991cbf11 Added tests for bad audio handles and backdround SOUND 2022-09-10 08:54:31 +05:30
github-actions[bot] 39cd2bf3cf Automatic update of ./internal/source 2022-09-10 02:11:00 +00:00
Matt Kilgore 05bcf3939c
Merge pull request #165 from mkilgore/fix-single-quotes-compiling
Fix compiling source files with single quotes in name
2022-09-09 21:56:29 -04:00
Samuel Gomes 8425f117a7 Fix #169 & #170 2022-09-10 04:08:31 +05:30
Matthew Kilgore cebcb11646 Fix compiling source files with single quotes in name
Using single quotes in a file name wasn't working because the Makefile
was using single quotes itself to quote the filename when providing it
to the compiler. The Makefile was switched to use double quotes instead,
which work just as well but are allowed to contain single quotes inside
of them.

Since double quotes are a legal character to have in a file name on
Linux and Mac OS, I added extra logic to start escaping double quote
characters.

I added a test to verify that we can compile source files with single
quotes in the name. I could not add a test for double quotes since such
files cannot exist on Windows and thsu cannot easily be added to the
repository.
2022-09-09 09:59:43 -04:00
github-actions[bot] ee00ce6a7f Automatic update of ./internal/source 2022-09-09 12:19:17 +00:00
Matt Kilgore 7390a089d3
Merge pull request #164 from mkilgore/midi-support-new
Add MIDI support and `Compiler Settings` command line options
2022-09-09 08:05:03 -04:00
Matthew Kilgore cd5e312f5a Revert changes to miniaudio.h, move changes elsewhere
Changing midiaudio.h will make it harder to incorporate new versions
into QB64-PE as they come out. To fix that I have reverted all the
changes to midiaudio.h and moved the few private parts we were using
into a separate 'filepath' API that's part of libqb.
2022-09-08 23:59:19 -04:00
Matthew Kilgore dcc181244c Add test of MIDI unsupported with OpenAL 2022-09-04 23:35:14 -04:00
Matthew Kilgore adb52f4f04 Add support for custom flags on QB64 tests 2022-09-04 23:35:14 -04:00
Matthew Kilgore d928e5d8ba Add command line switches for compiler settings
This adds compiler settings for each of the settings in the
'Compiler Settings' IDE dialog. This makes it easy to supply the
settings per compile without needing to use the IDE to change them (or
edit the `config.ini`).

Fixes: #162
2022-09-04 23:35:14 -04:00
Matthew Kilgore 3e4477521a fix audio midi vtable linking 2022-09-04 23:35:14 -04:00
Matthew Kilgore b301e2acf5 Fix chmod +x when filename has spaces
We were missing some quotes in the command line strings, so if there
were spaces involved `chmod +x` would not work correctly.
2022-09-04 23:35:14 -04:00
Matthew Kilgore 8a20f79fd9 Install dummy sound card on Linux
This adds a fake sound card to the GitHub build agents. The existance of
a fake sound card allows us to run tests using the audio backend on the
build agents without getting errors.
2022-09-04 23:35:14 -04:00
Matthew Kilgore 2b3403745c Add initial MIDI language support
This adds MIDI support to the language as a new unstable feature. There
are two new metacommands that come with this:

$Unstable: Midi
$MidiSoundFont: [Default|"filename"]

The $Unstable command is required to be able to use any of the other
commands, and just signifies that this is not a full part of the
language yet and may change in breaking ways before the API is
finalized.

The $MidiSoundFont command enables MIDI support in the compiled program,
and also specifies what sound font to use to play MIDI files. "Default"
will make use of the soundfont placed at
'./internal/support/default_soundfont.sf2', and otherwise a filename can
be specified to use any soundfont wanted.

In either case, the selected sound font is compiled into the executable
and then loaded at runtime.

Fixes: #115
2022-09-04 23:35:14 -04:00
Matthew Kilgore 65db95c876 Add support for error tests
This adds support for tests of the error output of QB64-PE. The tests
are in the form of a `.bas` file that does not compile, and a `.err`
file containing the expected output of QB64-PE when producing an error
for that file.

Additionally the `compile_tests` now support multiple tests in a single
folder, via using multiple `.bas` files with different names.
2022-09-04 22:43:30 -04:00
Matthew Kilgore 64d86326bf Add testing documentation 2022-09-04 22:41:28 -04:00
Matt Kilgore 170871bf5d
Merge pull request #157 from a740g/main
Fix usage of `mem_block` `type` in `_MEMSOUND`
2022-09-03 20:19:06 -04:00
Samuel Gomes 184db340dc Merge branch 'main' of https://github.com/a740g/QB64PE 2022-09-04 05:16:45 +05:30
Samuel Gomes d3854630cf Fix usage of mem_block type in _MEMSOUND 2022-09-04 05:16:41 +05:30
github-actions[bot] dc0cf1e3d2 Automatic update of ./internal/source 2022-09-03 19:36:01 +00:00
Matt Kilgore 3b31873713
Merge pull request #156 from mkilgore/release-3.1.0
Version v3.1.0
2022-09-03 15:21:40 -04:00
Matthew Kilgore fcc1444910 Version v3.1.0 2022-09-03 14:31:30 -04:00
Matt Kilgore 4449c3c545
Merge pull request #154 from mkilgore/remove-dpi-awareness
Remove DPI Awareness on Windows
2022-09-03 13:23:28 -04:00
Matthew Kilgore f03b55808b Remove DPI Awareness on Windows
DPI Awareness allows a program to tell Windows that it will handle
properly scaling itself for the screen's DPI. Thus when a program is DPI
Aware, it will always see the actual screen size. When a program is not
DPI Aware, then Windows will scale the program according to the
selection by the user, and the reported screen size will match the
scaled size rather than the actual screen size.

Commit 189cdb8e added logic to enable DPI Awareness on Windows, but it
was hidden behind a `WINVER` check. This meant it was not actually in
use because at the time QB64 did not set a `WINVER` high enough to
actually enable that code. As such all Windows versions of QB64
including v2.0.2 were not DPI Aware.

Much later-on, Commit 869e361e declared a `_WIN32_WINNT` of `0x0600`,
which seems to have also declared `WINVER` as the same and thus enabled
the DPI Awareness logic. As a consequence, QB64-PE programs no longer
get scaled even though they don't have a way to acquire the current DPI
to do proper scaling themselves.

Since the behavior change was unintentional and proper language support
is not there, we're considering the addition of DPI Awareness a bug. It
will be added back some time later with more language support to allow
it to be properly used.
2022-09-02 23:50:23 -04:00
github-actions[bot] 480e3c3d6e Automatic update of ./internal/source 2022-09-03 02:27:00 +00:00