1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-28 11:55:53 +00:00
Commit graph

2677 commits

Author SHA1 Message Date
Matt Kilgore 1fa5b8af10
Merge branch 'main' into generate-license-file 2022-10-02 16:25:57 -04:00
Matt Kilgore 38bba69185
Merge pull request #203 from mkilgore/fix-manpage-flags
Add and fix options listed in manpage
2022-10-01 20:55:46 -04:00
Matthew Kilgore 2fc4950d41 Add and fix options list in manpage
Fixes: #199
2022-10-01 20:19:01 -04:00
github-actions[bot] 70b4c1aa5d Automatic update of ./internal/source 2022-10-01 19:14:39 +00:00
Matthew Kilgore 9e4d77d614 Fix license_stbvorbis.txt line endings
This file was checked-in with Windows line endings, but it should have
Unix/Linux ones. Windows will automatically convert it into Windows line
endings when checking the file out, so it's not a problem in that case.
2022-10-01 15:08:01 -04:00
Matthew Kilgore d876f1bb22 Add license tests
This adds logic for testing the new license generation functionality.
This is done by having the expected license for a variety of
tests that use different dependencies, and then comparing that against
the license QB64-PE actually produces when compiling these test files.

Note that because the actual used dependencies changes depending upon
the OS, we have separate expected licenses for each of Linux, Windows,
and Mac OS. This required some build changes to accomidate, in addition
to the testing logic changes themselves.
2022-10-01 15:08:01 -04:00
Matt Kilgore 085444f9c2
Merge pull request #202 from mkilgore/fix-string-bit-n-length
Fix `String * n` and `Bit * n` when used with `Static` arrays.
2022-10-01 14:58:05 -04:00
Matthew Kilgore 908585aa2e Generate .license.txt file with license information
This gives QB64-PE the ability to automatically generate a text file
comprising all of the licenses that apply to your QB64 program. This
file can then be distributed with your program to meet the requirements
of those licenses, and also examined to understand what licenses apply
to your program.

The generation is controlled via a configuration flag, settable either
via the `Run` dialog, or via a new `-f` setting on the comamnd line.

Fixes: #145
2022-10-01 14:46:00 -04:00
Matthew Kilgore b4d6f52909 Add testsuite of built-in Types 2022-10-01 14:18:53 -04:00
Matthew Kilgore 335ff451bc Fix 'Bit * n' syntax in some cases.
There's some logic for handling `Bit * n` types that doesn't properly
handle NoPrefix. There's both a faulty error check which only works for
the `_` version (It was using `OR` so it always failed), and then also
the code that pulls out the number only works if the `_` is present.
Both of those are fixed in this commit.
2022-10-01 14:18:53 -04:00
Matthew Kilgore 855b8dfce7 Fix declare Static array as 'String * n'
The original issue comes from b87dde8. Fellippe was fixing using
NoPrefix types with Declare Library, which uses some of the same logic
as Static arrays. Unfortunately, his change broke the `String *n` syntax
and `Bit * n` syntax because he stopped using LEFT$() to check only the
prefix of the type. Cory fixed the issue over in QB64Official/qb64#35
by reverting the code to use LEFT$() again and I pulled some of that
logic in here.

Note that I've modified his solution a bit. During testing of that fix I
noticed that `_Unsigned Integer64` no longer worked, because is because
it aliases with `_Unsigned Integer` and the shorter type gets checked
first. This may have been what Fellippe was trying to fix (since
removing the LEFT$() avoids this issue) but it's hard to say.

I addressed that issue by only applying $LEFT() to the two types that
are allowed to have text after them (`Bit` and `String`). The rest of
the types continue to use the direct string comparison that requires an
exact match. Additionally I reorganized the checks a bit to make them
easier to read and also easier to confirm all combinations are checked.
2022-10-01 14:18:53 -04:00
github-actions[bot] 18f746018b Automatic update of ./internal/source 2022-10-01 17:41:56 +00:00
Matt Kilgore bdcb8f1b4d
Merge pull request #201 from mkilgore/compile-relative-bas
Fix compiling bas files relative to the CWD
2022-10-01 13:25:01 -04:00
Matthew Kilgore 21b7d60f44 Fix -o to be relative to _STARTDIR$ when source file is
In 094a8c82 we added the ability to compile a source file relative to
_STARTDIR$ instead of the location of the qb64pe executable. This change
fixes `-o` so that it is also treated as relative to _STARTDIR$ when the
provided source file is.

Note that this is not a real behavior change because if the provided
source file is relative to the qb64pe executable then `-o` will be as
well, which matches the previous behavior. The cases where it is made
relative to _STARTDIR$ all produced errors until 094a8c82 was done, so
there was no previous defined behavior.
2022-10-01 04:24:54 -04:00
Matthew Kilgore 094a8c82b2 Fix compiling bas files relative to the CWD
Fix was pulled from QB64Official/qb64#17 by Cory Smith, I just added
tests around it.

Most (all?) compilers allow you to run the compiler from a separate
directory than the compiler itself is located in and compile source
files relative to that directory. QB64-PE however does not allow that,
for a variety of reasons it always search for the provided source file
relative to the location of the QB64-PE compiler rather than the CWD it
was run from. This is pretty unexpected behavior in a lot of cases, and
also doesn't give very helpful error messages either.

This change has us check if the source file exists at the given CWD
location, and if it does we will prepend the CWD to produce the correct
path to the file.

To test that this behavior works as expected I modified
`compile_test.sh` to compile from within the test directories using a
relative path directly to the test file, this fails with current QB64-PE
versions because it can't find the source file.

Additionally, I was unsure of whether this would impact the behavior of
`'$include`, so I added some tests around include that uses various
combinations of paths relative to QB64-PE and relative to the source
file being compiled, and they all find the files as expected so I think
it's fine.
2022-09-30 17:13:43 -04:00
github-actions[bot] e93e389e03 Automatic update of ./internal/source 2022-09-30 16:21:22 +00:00
Matt Kilgore 78bfe5ca28
Merge pull request #197 from mkilgore/fix-consts
Fix various CONST issues and add CONST testsuite
2022-09-30 12:04:47 -04:00
Matthew Kilgore a7cd7884a9 Add CONST tests 2022-09-30 11:23:34 -04:00
Matthew Kilgore 59dd8d3c51 Fix undefined variables in CONST expressions to trigger an error
Overall this is fairly straight forward, `evaluateconst$` has type
information on the parameters for its expressions, but it's not actually
checking that both parameters have a proper type. The result is that
expressions with nonsense values such as undefined variable names end up
just trying to use that nonsense value as an integer.

Fixes: #177
2022-09-26 02:47:08 -04:00
Matthew Kilgore 47682e91c3 Fix _BLUE in CONST
_BLUE is one of the few functions that requires multiple parameters, but
it was not included in the list of functions that require them. The
result is that gets get parsed incorrectly and _BLUE did not work.
Adding it to the check of functions that accept multiple parameters
allows it to work as expected.

Fixes: #195
2022-09-26 02:46:37 -04:00
Matthew Kilgore 53dc4e0467 Fix using _RGBA in CONST
Fairly simple, the order of functions meant that `_RGBA` got picked up
as `_RGB` instead, with the `A` then considered invalid syntax. Fixing
the order allows `_RGBA` to work as expected.

Fixes: #194
2022-09-26 02:46:37 -04:00
github-actions[bot] 2f509a192c Automatic update of ./internal/source 2022-09-24 17:47:06 +00:00
Matt Kilgore 56f27557d9
Merge pull request #190 from mkilgore/release-3.2.1
Version 3.2.1
2022-09-24 13:31:07 -04:00
Matthew Kilgore 191db3fb57 Version 3.2.1 2022-09-24 12:17:36 -04:00
Matt Kilgore df59b827ef
Merge pull request #184 from AtomicSlaughter/main
Update setup_lnx.sh
2022-09-24 12:08:19 -04:00
Kevin Strutt 7a6a4a875f
Update setup_lnx.sh 2022-09-20 20:46:52 +01:00
Samuel Gomes eac845792a
Merge pull request #180 from a740g/main
Fix #175
2022-09-19 00:16:56 +05:30
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