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

877 commits

Author SHA1 Message Date
github-actions[bot] 7f14714b02 Automatic update of ./internal/source 2022-06-23 22:45:10 +00:00
github-actions[bot] 802f67d6cf Automatic update of ./internal/source 2022-06-15 05:28:32 +00:00
Matthew Kilgore 94c2b56b69 Use mutex guard in completion implementation 2022-06-14 23:58:04 -04:00
Matthew Kilgore 298331e490 posix mutex shouldn't allow NULL
We shouldn't allow mutex lock/unlock to silently do nothing if NULL is
passed, as that is very likely a bug. Beyond that the Windows version
doesn't do this, so it's inconsistent as well.
2022-06-14 23:56:17 -04:00
Matthew Kilgore 869e361ee4 Move QB64 compiler settings to libqb-common.h
This moves a lot of the preprocessor flags for what compiler/platform
we're using into a libqb-common.h header inside the libqb/include
folder. This gets included at the top of every libqb .cpp file, and is
intended to be fairly small, providing only necessary things like
_WIN32_WINNT (which needs to be defined before including <windows.h> or
friends).
2022-06-12 00:28:16 -04:00
Matthew Kilgore cde7afef30 Use libqb_mutex in libqb.cpp
libqb_mutex can replace the existing Mutex handling we do in libqb.cpp
2022-06-11 22:47:06 -04:00
Matthew Kilgore 4052b8cc19 Add append-only buffer API
The Buffer API implements an append-only buffer, where you can write to
the end or read from the beginning. Data that is read is discarded from
the buffer, and you can query the buffer to get the current amount of
data inside.

Internally the buffer API is implemented as a chain of separate buffers.
This is done to avoid having to resize the existing buffer, which is
expensive. We keep track of where the reading currently is, and discard
the internal buffers after all the data in them is read.
2022-06-11 22:47:06 -04:00
Matthew Kilgore ecfc71ef95 Add completion API
Completions are basically a oneshot flag, which provide a `wait()` call
that blocks until 'finish()' has been called on the completion.

The nice aspect of completions is that because it is a oneshot the order
does not matter - if 'finish()' is called before 'wait()' then 'wait()'
returns immediately. It makes the logic for waiting until a thread is
done finishing up some work easy to implement.
2022-06-11 22:47:06 -04:00
Matthew Kilgore 7ef15653fd Add generic thread, mutex, and condvar API
This adds generic APIs to libqb for handling thread's, mutex's, and
condition variables. On Linux and OSX these are implemented via the ones
provided by pthreads. On Windows they're implemented via the ones
provided by the Win32 API.

For compiling, the code itself is not conditional, but the Makefile
includes logic to decide which implementation to pick.

Note that it would have been nice to simply use std::thread and friends
from C++11, however using them on MinGW appears to be a bit messy. Since
using the Windows ones directly isn't that hard this was an easy compromise.
2022-06-11 22:47:06 -04:00
Matthew Kilgore eb815c4220 Prepare for separate libqb, define C++ standard
This sets up a few different flags we'll need for the conditional
compiling, and also sets the C++ standard to gnu++11, which effectively
just matches what we were implicitly using before.
2022-06-11 22:47:05 -04:00
github-actions[bot] df24714a49 Automatic update of ./internal/source 2022-06-12 02:46:10 +00:00
Matthew Kilgore 76c437288a Remove leftover build file 2022-06-11 20:42:23 -04:00
Matthew Kilgore f99407f251 Revert existing libqb split 2022-06-11 20:42:23 -04:00
github-actions[bot] e6a5d4744c Automatic update of ./internal/source 2022-06-11 16:32:22 +00:00
github-actions[bot] 7d06ff2400 Automatic update of ./internal/source 2022-06-10 21:39:18 +00:00
github-actions[bot] 85cdcb2249 Automatic update of ./internal/source 2022-06-10 20:16:55 +00:00
github-actions[bot] 3057adf4dd Automatic update of ./internal/source 2022-06-10 15:12:32 +00:00
Matthew Kilgore 62ec4ebdbd Fix compilation with DEP_DEVICEINPUT
The Makefile changes broke compiling with device input support. This got
missed because no test case for DEP_DEVICEINPUT got added.

Fixes: #100
2022-06-09 21:30:37 -04:00
github-actions[bot] 578268e3a5 Automatic update of ./internal/source 2022-06-08 14:08:37 +00:00
github-actions[bot] 2be869c263 Automatic update of ./internal/source 2022-06-07 21:38:41 +00:00
github-actions[bot] 931d3f5f24 Automatic update of ./internal/source 2022-06-07 16:46:41 +00:00
github-actions[bot] 3816f39bb9 Automatic update of ./internal/source 2022-06-04 10:44:40 +00:00
github-actions[bot] 54f77c2884 Automatic update of ./internal/source 2022-06-01 00:20:31 +00:00
github-actions[bot] c240a71186 Automatic update of ./internal/source 2022-05-31 03:52:23 +00:00
github-actions[bot] fd3cf1ab9f Automatic update of ./internal/source 2022-05-23 04:59:49 +00:00
github-actions[bot] b2226bfe4d Automatic update of ./internal/source 2022-05-22 10:09:52 +00:00
Roland Heyder 77642ba91b Merge branch 'main' into wiki-dev 2022-05-22 01:04:02 +02:00
github-actions[bot] 88ff173309 Automatic update of ./internal/source 2022-05-21 23:02:30 +00:00
Roland Heyder bec7e9cdf4 Merge branch 'main' into wiki-dev 2022-05-21 00:23:32 +02:00
Roland Heyder aeb9c0668b Updates help files for use with new Wiki parser (2nd try)
Note: Many files were removed (not yet existing/empty pages). The parser will try to download them on demand and will auto-generate text for missing pages (eg. most _gl pages).
2022-05-21 00:18:31 +02:00
Roland Heyder df867d5654 Updates help files for use with new Wiki parser
Note: Many files were removed (not yet existing/empty pages). The parser will try to download them on demand and will auto-generate text for missing pages (eg. most _gl pages).
2022-05-20 23:56:53 +02:00
github-actions[bot] 15622d1f0c Automatic update of ./internal/source 2022-05-20 21:50:26 +00:00
Matthew Kilgore fc7c48bb29 Remove unnecessary files from ./internal/source
searched.bin was added in error and should not show up when updating
./internal/source.

The symbol files are useless since the coresponding executable is not
something we preserve, and due to them changing practically every build
they result in unnecessary updates of ./internal/source
2022-05-20 16:58:18 -04:00
Matthew Kilgore 95c57c182c Supply a default version label when no version has been calculated
When building directly from the repo (either from a git clone or a
download of the zip of the repository) the version reported is very
misleading because it will not have a version label, suggesting it is
actually a 'release' version when in fact it could be anything.

The ./.ci/calculate-version.sh logic is already setup to delete an
existing ./internal/version.txt during a detected release build, so we
can just place one in the repositroy and it won't impact the versioning
of CI and release builds, but will show up when building locally.

Fixes: #63
2022-05-20 16:57:45 -04:00
github-actions[bot] 6fde9c6b5f Automatic update of ./internal/source 2022-05-19 13:49:23 +00:00
Matthew Kilgore 437cfc3ab7 Remove old build system
Mostly old build scripts and helper files that are now covered by the
Makefile.

A notable deletion is the glew dll and lib files. These are unnecessary
because we compile `glew.c` directly rather than link against the dll or
lib copies we have.
2022-05-19 09:17:13 -04:00
Matthew Kilgore e0ef818522 Change purge scripts to use make clean 2022-05-19 09:17:13 -04:00
github-actions[bot] b7f05e73ff Automatic update of ./internal/source 2022-05-18 16:50:57 +00:00
Steve McNeill da1978915a
Merge branch 'main' into main 2022-05-18 12:14:17 -04:00
github-actions[bot] 306994663e Automatic update of ./internal/source 2022-05-18 14:36:18 +00:00
SteveMcNeill bd3b673996 test change to IdeAddSearched 2022-05-18 07:10:59 -04:00
github-actions[bot] 0c19b70a1b Automatic update of ./internal/source 2022-05-18 09:42:56 +00:00
github-actions[bot] b44bd54db9 Automatic update of ./internal/source 2022-05-17 11:59:50 +00:00
SteveMcNeill ecfa18a109 change numerics to more descriptive constants 2022-05-17 05:04:41 -04:00
SteveMcNeill 8574c1f921 Change to _screenwidth and _screenheight
Having windows call GetSystemMetrics without relying on glutGet, gets rid of the seg fault that can occur at program start up.  screenicon was restored to it's previous state so that larger issues with it can be addressed at a future date.
2022-05-16 11:37:58 -04:00
SteveMcNeill acbeca81b9 Fix to _desktopwidth, _desktopheight, _screenicon
Fixes the issue as brought up on the forums here: https://qb64phoenix.com/forum/showthread.php?tid=408

Also added a small set of logic so we don't end up inside an endless loop if the screen is hidden (via _SCREENHIDE), or if it doesn't exist for whatever reason.
2022-05-16 07:55:08 -04:00
github-actions[bot] 4ad1816507 Automatic update of ./internal/source 2022-05-15 20:28:21 +00:00
Matthew Kilgore 8c0fc1b3d2 Fix quoting in Windows-specific files
This issue was fixed in 4d61ff79, but due to how ./internal/source is
updated the new ./internal/source files were compiled using a QB64
without the fix, producing files with the wrong quoting. Previously this
was worked around because the build process overwrote these files, but
the `Makefile` build requires them to be fixed.

./internal/source itself is fine, so it's easy enough to simply fix the
files by hand. Since ./internal/source now contains a compiled QB64 that
contains the fix from 4d61ff79 it's generated files will have proper
quoting and won't need to be manually updated.
2022-05-14 17:09:02 -04:00
github-actions[bot] c3cd310f72 Automatic update of ./internal/source 2022-05-14 20:59:49 +00:00
Matthew Kilgore 7a5ca0c49c Cleanup unused Makefile stuff 2022-05-14 12:13:00 -04:00