Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64PE v4.0 is now live!!
#1
GRAB IT FROM THE GITHUB: https://github.com/QB64-Phoenix-Edition/...tag/v4.0.0

Long time announced, now finally done and the main reason for us to give this release a major version bump, is the deprecation of $NOPREFIX. But no worries, we've added a converter which will automatically transform your old $NOPREFIX using programs back to the regular underscore using syntax as soon as you open such a program. Aside from some subtle side cases, the converter should perfectly do its job without requiring further manual adjustments afterwards.

Moreover the new version got a big audio library update with lots of new features, and a comprehensive new logging system which will help debugging and streamlining your programs. These two had been probably worth a major version bump by itself. Also to highlight is the addition of several new precompiler flags and a huge set of preset constants for use in your programs.

QB64-PE v4.0.0 - Thanks to everyone who contributed to this brand new version.

Breaking changes
#544, #548 - Complete deprecation of $NOPREFIX. - @RhoSigma-QB64
#553 - Added automatic $NOPREFIX to underscore usage converter, triggered when a file using $NOPREFIX is opened in the IDE. If the user agrees to convert, a backup of the file and any includes are made. - @flukiluke

Enhancements
#535 - Relax ALIAS function name validation, closing issue #493. - @a740g
#536, #571, #572 - The "Export As ..." feature now checks for an active selection first. If there is one, only the selected code is exported, otherwise the entire source will be exported as usual. Plus some adjustments for new commands. - @RhoSigma-QB64
#550 - added new _MOUSEHIDDEN function. - @RhoSigma-QB64
#558 - Implements the _QB64PE_ precompiler flag, closing issue #551. - @RhoSigma-QB64
#561 - Various enhancements to the IDE and the Compiler. - @RhoSigma-QB64
Now showing the syntax for all user defined SUBs and FUNCTIONs for better reference in the status messages.
Added lots of preset constants available in every program by default.
Added _MIN, _MAX, _ENCODEURL$ and _DECODEURL$ functions.
#562 - The HTTP support for _OPENCLIENT is stabilized now, $UNSTABLE:HTTP is no longer required. Also added the _DEBUG_ precompiler flag, closing issue #29. - @RhoSigma-QB64
#565 - The big audio library update. - @a740g

Lot of things:
PLAY now ignores the ";" character as QB4.5 did, fixing issue #554
Adds Pink noise, Brownian noise, LFSR noise, pulse, and custom (_WAVE) waveform support to SOUND & PLAY
Adds support for ADSR envelope for SOUND & PLAY
Adds multi-channel (4 voice) support for SOUND & PLAY
Adds SOUND WAIT and SOUND RESUME support for multi-channel for SOUND & PLAY
Adds Amiga Basic like _WAVE command, closing issue #187
Adds support for _SNDRAWBATCH that can push a batch of audio sample frames at once compared to just one frame that _SNDRAW supports
Moves BEEP out of the audio library, i.e. a simple BEEP no longer pull in the entire audio library
Restores CHR$(7) beep support (due to the above change)
New commands and enhancements:
SOUND frequency!, duration![, volume!][, panning!][, waveform&][, waveformParameters!][, voice&]
SOUND WAIT
SOUND RESUME
PLAY voiceCommands1$[, voiceCommands2$][, voiceCommands3$][, voiceCommands4$]
remainingTime# = PLAY([voice&])
_WAVE voice&, waveDefinition%%([index&])[, frameCount&]
_SNDRAWBATCH array!([index&])[, channels&][, handle&][, frameCount&]
PLAY MML language improvements (special thanks to @grymmjack for guidance):
Wn / @n: waveform select (1 = SQUARE, 2 = SAWTOOTH, 3 = TRIANGLE, 4 = SINE, 5 = NOISE_WHITE, 6 = NOISE_PINK, 7 = NOISE_BROWNIAN, 8 = NOISE_LFSR, 9 = PULSE, 10 = CUSTOM_WAVE)
/n: attack (percentage of total note time 0 - 100)
\n: decay (percentage of total note time 0 - 100)
^n: sustain (percentage of MML volume 0 - 100)
_n: release (percentage of total note time 0 - 100)
Yn: extra params for current waveform (percentage 0 - 100 - usually for pulse wave)
Sn: pan position (0 to 100) where 0 is leftmost and 100 is rightmost
R / P: rest / pause
V+ & V-: Volume increment / decrement (single-step & clamped)
S+ & S-: Pan right / left (single-step & clamped)
#566, #583 - Add built-in logging support. - @mkilgore
This adds new logging capabilities to QB64, both internally from libqb and also exposed to the QB64 code. Beyond being a bit nicer than a Print since it captures the function name and line number, a big feature is that logging an error captures a stacktrace of the program at that point. Logging can also easily be turned on without recompilation via environment variables, and can be filtered via various scopes and a couple different logging levels. Overall this should hopefully be a big aid for debugging, as we can ask users to provide us with the logging output of programs when they error.

Below is an example of some logging from a QB64 program (note how the IDE opens a separate console window to display it):
image (see the github release page for image)

The new commands are _LOGTRACE, _LOGINFO, _LOGWARN, _LOGERROR and _LOGMINLEVEL. The first four write out log messages at the indicated log level. The last returns a number indicating the lowest level of logging is enabled, allowing you to skip generating more expensive logging if it won't be displayed.

Logging is enabled via a variety of different environment variables (when run from the IDE these are configured automatically):

QB64PE_LOG_LEVEL - sets the lowest log level to display, options are Trace, Information, Warning, Error
QB64PE_LOG_SCOPES - A comma-separated list of different sets of logging to turn on, allowing basic filtering of what is displayed. Options are:
a. libqb - Some generic logging from libqb, such as error codes when they happen, program startup/shutdown, etc.
b. libqb-image - Logging from the image subsystem (when images are loaded,freed, errors that happen, etc.)
c. libqb-audio - Logging from the audio subsystem
d. qb64 - Logging from the QB64 Program ( _Log* statements)
QB64PE_LOG_HANDLERS - A comma-separated list of the logging handlers to enable. If no handlers are enabled, then no logging is generated. Current options are:
a. console - Logging output is written to the console.
b. file - Writes logs to the file set via the QB64PE_LOG_FILE_PATH environment variable
Currently the IDE just defaults to using Information and enabling all the scopes, in a future update I'd like to have an IDE dialog that lets you pick the log level and scopes.

#567 - Added new function _TOSTR$ which supports the full _FLOAT range. Also added _ASSERTS_, _CONSOLE_, _EXPLICIT_ and _EXPLICITARRAY_ precompiler flags. - @RhoSigma-QB64
#574 - Added the _IIF function for conditional evaluation like the ternary operator in C, with short-circuiting behavior, closing issue #403. - @a740g
#581 - Lifts the restrictions of doing arithmetic with _OFFSET in expressions. Also added the new function _CAST, which works like explicit type casting in C. - @a740g
#582 - Added new function _CLAMP and a set of functions dealing with the HSB colorspace in symmetry with the RGB functions, namely _HSB32, _HSBA32, _HUE32, _SATURATION32 and _BRIGHTNESS32. - @RhoSigma-QB64

Bug fixes
#534 - Allows users to revert to the built-in soundbank by passing an empty string to _MIDISOUNDBANK. Before it was not possible to switch back to the default soundbank once an external one had been used with _MIDISOUNDBANK. - @a740g
#537 - Fixed some wrong Wiki links in exported code. - @RhoSigma-QB64
#546 - Update clipboard library to latest, fixing issue #541. - @a740g
#557 - Fixed a bug where KILL, FILES, and _FILES$ unintentionally shared a static DIR pointer when performing file searches. As a result, calling any of these functions would reset the search state of _FILES$, leading to unexpected behavior. This issue was reported here. - @a740g
#560 - Fixed unary negation when using CONST, closing issue #542. - @mkilgore
#568 - Reloading a MIDI file with a different soundfont now works as expected, also _MEMSOUND now works correctly with fully decoded MEMORY sounds. - @a740g
#570 - Removes the voice range check in _PLAY (function). If the voice is out of range, it now simply defaults to zero, aligning the behavior with QB4.5 standards. - @a740g
#574 - Resolved an issue in _ROL and _ROR, where the second argument could incorrectly be a STRING. - @a740g
Internal changes
#539, #585 - Switch to LLVM MinGW C++ compiler on all Windows architectures. - @a740g
#538, #540, #543, #547 - Enable globbing by default and silence lots of C++ compiler warnings. - @a740g
#548, #550 - Complete removal of rotten Android remains, i.e. $VIRTUALKEYBORD and friends. - @RhoSigma-QB64
#569 - Various libqb refactoring, silence more C++ compiler warnings. - @a740g
#588 - Tidy up the markdown files in the repository - @a740g

GRAB IT FROM THE GITHUB: https://github.com/QB64-Phoenix-Edition/...tag/v4.0.0
Reply
#2
I've installed the new version, but get C++ Compilation failed on all progs... is there another step to take (I took all the files from the new folder and placed them in the old QB64PE folder, where they replaced all 9 items)
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#3
Very nice!
Like the BEEP _LOGERROR, _TOSTR, _ENCODEURL very much  Smile
45y and 2M lines of MBASIC>BASICA>QBASIC>QBX>QB64 experience
Reply
#4
(12-14-2024, 12:37 PM)PhilOfPerth Wrote: I've installed the new version, but get C++ Compilation failed on all progs... is there another step to take (I took all the files from the new folder and placed them in the old QB64PE folder, where they replaced all 9 items)

Hi Phil,
just to make sure I understood you right, you extracted the new v4.0.0 and then copied it's contents over to your old QB64-PE version??

Horror, that's the worst thing you can ever do, but for v4.0.0 it's deathly, because we exchanged the C/C++ compiler, so by copying the new over the old you now have a mix of two different compilers, which obviously can't work.

You should extract v4.0.0 and keep it as is and rather transfer (copy) your own program files (.bas, .bi, .bm and its required resources like images or sounds) from the old version over to the new version.
Reply
#5
First of all, everything works as normal without any problems. Exclamation  The new highlighting of the bar at the top makes it look better now.

[Image: QB64-4-2024-12-14.jpg]

Regarding unpacking: When unpacking with RAR there was an error message, see screenshot. I then unpacked it again with 7z, without any problems.
Then the folder structure apparently changed, so that it is no longer easy to delete them with the "Delete useless folders" program from Race. This is just a hint, just delete it manually.

[Image: RAR-Fehler2024-12-14-143633.jpg]

Thanks to all the developers! 

[Image: Danke-Thanks.jpg]
Reply
#6
I was getting the same errors as Phil but I had a fresh folder and I built from source using the CMD file. Everything failed to compile. I'll try grabbing the release version tonight.
Tread on those who tread on you

Reply
#7
This post is specific to the Windows version of QB64PE only.


About that "Delete useless folders" utility that @KernelPanic mentioned:

PE 4.0.0 uses CLang+LLVM instead of MinGW.  Although CLang is a drop-in replacement for GCC, its folder structure is slightly different.  The "licenses" & "opt" folders do not exist, and "share" contains 140 files occupying just 300K, and I do not know if all those files are disposable.

To be safe, that "Delete useless folders" utility is now deprecated.  Don't use it on QB64PE 4.0.0 or later.


Also, for C/C++ tinkerers:

In a different post I mentioned the "-m32" and "-m64" GCC/G++ compiler options being unusable with PE's included MinGW compiler.

That is true for PE's MinGW compiler, but "-m32" & "-m64" work just fine under PE 4.0.0's Clang/LLVM, which uses a different method of stack unwinding.

The C compiler batch script I posted in that thread should work just fine under the new CLang regime.


If 7Zip complains when decompressing the GitHub .7z archive:

Older versions of 7Zip are not totally happy with the QB64Pe 4.0.0 archives on GitHub.

7Zip version 16.04 complained about an unsupported compression method on 4 files in both the 32-bit and 64-bit .7z archives.  I uninstalled the old 7Zip version and installed the latest 7Zip version (24.09).  Now all is well.

(The reason?  Since Windows on Arm became available, recent versions of 7Zip use special compression tricks to squeeze a few extra bytes out of Arm executables.  Older archivers are not aware of the new compression methods.)

Those 4 files are .DLLs for 64-bit ARM systems, so Windows users on Intel or AMD CPUs will not need them, anyway.


Upgraders:

As @RhoSigma said for the umpteenth time, above, never copy a new PE installation over an old one.  By doing so you open a dimensional rift that allows all sorts of eldritch horrors into our universe.  That's almost as bad as dividing by zero.

For an alternate method, here's a simple screenshot of my current upgrade-in-progress:

   
  • "qb64pe_OLD": This is my PE 3.14.1 installation, renamed so I can set up PE 4.0.0 in a shiny new "qb64pe" folder.
  • "qb64pe": The new PE installation-in-progress.
  • "qb64pe_work": My own little folder for works-in-progress.  Near at hand, but out of harm's way, so I don't need to move any of that stuff when I upgrade.  ("My Documents?!?"  What is this?  Don't you tell me where to put my stuff, Microsoft!)

Next I will move any needed extra files from the old to the new, and when I'm satisfied that the new works, the old will go away.


To conserve disk space, an alternative is to move your "keeper" files to a safe place, make an archive of the old PE folder, then delete the old folder, install the new, copy the keepers over, etc.  When satisfied, dispose of the old archive if you wish.
Reply
#8
Ok,thanks. I'll place everything into an "oldPE" folder, download and install the new version into a new QB64PE folder (directly onto the C drive), then bring in my own files.
Is this what's meant to happen??
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#9
(12-14-2024, 11:10 PM)PhilOfPerth Wrote: Ok,thanks. I'll place everything into an "oldPE" folder, download and install the new version into a new QB64PE folder (directly onto the C drive), then bring in my own files.
Is this what's meant to happen??

That should work, as long as you don't install to the root of the C: drive.  Windows might not tolerate "C:\qb64pe" (or C:\<any_program>).

On my desktop box I have a folder "C:\prog" for compilers & interpreters.  PE is "C:\prog\qb64pe", and Windows has never given me a bit of trouble over it.
Reply
#10
To all the developers:

I've downloaded the QB4PE 4.0.0.7z today. It extracted without no problems. I renamed my old qb64pe folder. Then copied the new qb64pe folder to the Documents folder where the old one was and hit the shortcut on the taskbar to start the IDE. No complaints from it or me. It works very well. Thank you for your hard work that all of you had put into this version. Hope everyone of you are doing well and thanks again.

GareBear
Reply




Users browsing this thread: PhilOfPerth, 4 Guest(s)