1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-08-05 13:30:25 +00:00
Commit graph

2953 commits

Author SHA1 Message Date
Samuel Gomes
385807b024
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-11-24 17:51:44 +05:30
Roland Heyder
d40fb02731
Merge pull request #252 from QB64-Phoenix-Edition/wiki-dev
Wiki dev
2022-11-24 13:19:54 +01:00
Samuel Gomes
50c1430456
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-11-24 07:17:04 +05:30
Roland Heyder
65371dad0f Wiki download finalized
- restore default back to https:
- ask user for fallback, if required
- final adjustments for new behavior
2022-11-23 22:54:04 +01:00
Roland Heyder
b153a86d7e
Merge branch 'main' into wiki-dev 2022-11-23 11:02:28 +01:00
Matthew Kilgore
c84220055f Add FreeGLUT warning function
Registering a warning function keeps FreeGLUT from writing warnings to
the console (which is not desirable since it conflicts with our own
console output).
2022-11-22 23:53:04 -05:00
github-actions[bot]
cff575e722 Automatic update of ./internal/source 2022-11-22 23:53:31 +00:00
Matt Kilgore
ebd95d24b8
Merge pull request #250 from mkilgore/refactor-curl
Add HTTP and HTTPS support to `_OPENCLIENT()`
2022-11-22 18:31:13 -05:00
Roland Heyder
81d4983219 Wiki update refactoring
Some changes/fixes in the update flow.
2022-11-22 18:22:10 +01:00
Roland Heyder
87a234b45b Wiki download changes
Using built-in TCP/IP and HTTP protocol via manual request headers.
2022-11-22 18:20:48 +01:00
Matthew Kilgore
11a5b8be8e _OpenClient() should return zero on connection failure, not error 2022-11-20 18:44:24 -05:00
Matthew Kilgore
445408d95b _StatusCode() should give the correct error on invalid handle type
Passing a handle of the invalid type (Ex. TCP) to _StatusCode should
give error 52, but it gies error 9.
2022-11-20 04:38:03 -05:00
Matthew Kilgore
12c9c35db5 Add _StatusCode command for HTTP handles
The _StatusCode command returns the status code on the HTTP response
when given a HTTP handle from _OpenClient().
2022-11-20 04:04:02 -05:00
Matthew Kilgore
610c914d36 compile_tests.sh does not display compilelog.txt
Due to a typo, compile_tests.sh was not displaying the compilelog.txt
contents on a test failure.
2022-11-19 15:13:26 -05:00
Matthew Kilgore
1438c882d2 Update webfactory/ssh-agent 2022-11-19 15:13:26 -05:00
Matthew Kilgore
e8ebf56a2f Add basic http tests
These tests cover basic HTTP functionality via _OPENCLIENT(), and also
that it fails to work without `$Unstable:Http` in place.
2022-11-19 15:13:26 -05:00
Matthew Kilgore
77e0a369af Add $Unstable entry for Http
This effectively adds Http support to QB64-PE via adding $Unstable:Http
which will trigger building with DEP_HTTP, which enables Http support in
libqb.
2022-11-19 15:13:26 -05:00
Matthew Kilgore
ffdf9db390 Add libqb.cpp stream support for HTTP
Modifies libqb.cpp to add support for opening HTTP connections via
_OPENCLIENT(). This makes use of the libqb_http API in ./libqb, which is
backed by libcurl.

This also includes a bit of refactoring for some of the code that
required additions. I replaced a few of the integer values with enums,
and added a new entry for Http and then implemented it in all the
necessary locations. In addition to `_OPENCLIENT()`, there is also
support for using HTTP connections with `EOF()`, `LOF()`, `GET #`
(variable and fixed length), and `CLOSE`.

I additionally fixed an issue of parsing the colon parts of the
`_OPENCLIENT()` parameter, where having too many colons would cause the
program to crash. Since we only allow so many parts to begin with it I
simply limited the max number of parts it will split to 10.

Fixes: #98
Fixes: #46
2022-11-19 15:13:26 -05:00
Matthew Kilgore
45d52271da Add libqb_http API for HTTP connections
This adds the libqb_http API, which is designed to support HTTP and
HTTPS usage from QB64-PE source.

The design consists of a single thread which services all the HTTP(s)
connections. There are then various libqb_http APIs exposed that allow
interacting with this thread to create a new connection, query
connection status, read data, or close the connection.

Internally the thread makes use of the curl_multi interface to allow a
single thread to service multiple HTTP(s) connections in parallel. This
means you can _OPENCLIENT() multiple HTTP connection in a row and all of
them will be serviced at the same time in whatever order data is
available.

HTTP is optional and selected via a Makefile setting. A stub is swapped
in if HTTP support is not used, which avoids need to add another build
flag to libqb.cpp.
2022-11-19 15:13:26 -05:00
Matthew Kilgore
848aa6b5d2 Pin versions of build agents
This ensures that our build will continue to use the same versions of
our OSs even if GitHub updates them.
2022-11-19 01:55:20 -05:00
Matthew Kilgore
1994ca3f73 Install libcurl on Linux build agent 2022-11-19 01:55:20 -05:00
Matthew Kilgore
d8a3ec75fd Run tests with -O2
Since we do allow users to use optimization, it's worth running our
tests with it to verify at least those work.
2022-11-19 01:55:20 -05:00
Matthew Kilgore
b066c641f4 Add the libcurl license 2022-11-19 01:55:20 -05:00
Matthew Kilgore
1eec789114 Specify the XCode SDK version 2022-11-18 01:50:28 -05:00
Samuel Gomes
4c5072e0aa Enable PulseAudio on Linux 2022-11-18 10:46:58 +05:30
Matt Kilgore
ba6e5f6438
Merge pull request #246 from mkilgore/add-libcurl-to-repo
Add libcurl to the repository
2022-11-17 22:31:44 -05:00
Matthew Kilgore
34a7df535e Add libcurl to the repository
This copy is used for building on Windows. For Linux and OS X we used
the system-provided copy.
2022-11-17 22:03:41 -05:00
Samuel Gomes
bc522b8a80
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-11-16 11:56:05 +05:30
github-actions[bot]
5e3fa2d6c2 Automatic update of ./internal/source 2022-11-16 06:19:29 +00:00
Matt Kilgore
249750bcbd
Merge pull request #249 from mkilgore/release-3.4.1
Version 3.4.1
2022-11-16 01:01:20 -05:00
Matthew Kilgore
1aac3b1955 Version 3.4.1 2022-11-15 23:47:34 -05:00
github-actions[bot]
de63331a19 Automatic update of ./internal/source 2022-11-16 04:41:13 +00:00
Matt Kilgore
0cfb01c6bb
Merge pull request #247 from SteveMcNeill/main
Swap in Optional New Load File Dialog
2022-11-15 23:24:33 -05:00
Matt Kilgore
4ff9edbf9d
Merge branch 'main' into main 2022-11-15 22:55:06 -05:00
Matthew Kilgore
65cfbda3b7 Rename 'New Dialogs' to 'GUI Dialogs', Persist setting
The 'New Dialogs' menu option was renamed to 'GUI Dialogs' to better
explain what it does. Additionally the setting of which dialogs to use
is saved to the config.ini file so that it presists across multiple runs
of QB64-PE.
2022-11-15 22:21:29 -05:00
Samuel Gomes
96e2c92bd6
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-11-16 08:13:26 +05:30
Matt Kilgore
bd6ad5fde6
Merge pull request #248 from mkilgore/fix-password-inputbox
Fix password handling in _InputBox$ on Windows
2022-11-15 21:04:30 -05:00
Matthew Kilgore
a28342be99 Fix password handling in _InputBox$ on Windows
We were incorrectly treating the empty string and NULL the same and
using a password dialog for both. It now has the correct behavior of
displaying the password when provided the empty string, but just
displaying a blank input box when provided NULL.
2022-11-14 20:23:41 -05:00
SteveMcNeill
2147911ec3 Swap in Optional New Load File Dialog
And without screwing up the keyword casing this time!  ;)
2022-11-14 17:47:27 -05:00
Samuel Gomes
5cefba8609 Merge branch 'miniaudio-fixes' of https://github.com/a740g/QB64pe into miniaudio-fixes 2022-11-14 23:46:22 +05:30
Samuel Gomes
ea80bddd51
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-11-14 23:33:25 +05:30
Samuel Gomes
884ff158ff
Merge pull request #243 from a740g/setup-win-enhancements
setup_win enhancements
2022-11-14 23:00:09 +05:30
Samuel Gomes
0dd825e5f3 Add -static-libgcc -static-libstdc++ to TEST_CFLAGS-$(win) 2022-11-14 12:15:51 +05:30
Samuel Gomes
cb14a3d4d7
Merge branch 'main' into setup-win-enhancements 2022-11-14 09:54:13 +05:30
Samuel Gomes
2cd889f0ec Update .ci/bootstrap.bat to use setup_mingw.cmd 2022-11-14 09:53:58 +05:30
Matt Kilgore
855eaac864
Merge pull request #245 from mkilgore/dialog-fixes
Improve dialog window association and _InputBox$ support on Windows
2022-11-13 15:41:24 -05:00
Matthew Kilgore
e6964dfc69 Include stdint.h on Windows, change integer defines to use them
It seems we weren't including stdint.h on Windows by mistake. Likely we
were getting it anywy from some other header, but it sounds like that
got changed in newer versions of MinGW and either way we shouldn't rely
on that.

Being that we include stdint.h on all platforms, I also changed os.h to
always use these types when defining the `int32` and friends sized
types. Ideally we get rid of those defines in the future but we can at
least use the stdint.h types going forward (as we already have).
2022-11-12 19:48:26 -05:00
Matthew Kilgore
1509f85719 Improve _InputBox$ support on Windows
This applies various dialog settings so that the dialog is always on
top, and also so that Tab works as expected to move between the
controls. The Edit control is moved first so that it's focused when the
window appears.
2022-11-12 19:48:17 -05:00
Matthew Kilgore
3f709ba65b Add logic to correctly discover our process's Window
Currently we have two different ways of determining what Window handle
to tie our dialogs too - we either use GetForegroundWindow(), or create
a completely new and hidden handle. The associated window determines
what process names shows up on notifications, and also which window
can't be interacted with while a dialog is open.

Both of those approaches aren't really good. In the case of
GetForegroundWindow(), it just returns whatever window the user has in
focus, which might be a completely different process. With the hidden
window, it means the dialog and notification aren't really tied to the
QB64-PE program, so you can still interact with the window even when a
dialog is open, and the notification doesn't show an exectuable name.

To solve this we're now using EnumWindows() to enumerate over all the
Windows on the system and find one associated with our ProcessId. We
then check if it's the top-level window and return it if it is.

If that process fails to find a window (such as if this is a
console-only program, or $SCREENHIDE is used) then we check if
GetConsoleWindow() gives us a handle and use that.

If neither approach works, then we fall back to creating a hidden window
so that the dialogs can still work.
2022-11-12 19:16:43 -05:00
Samuel Gomes
2229b41e34 Update MINGW download URLs 2022-11-11 18:59:08 +05:30