BBC BASIC for SDL 2.0 version 1.36a released

New releases of BB4W and BBCSDL, and other updates, will be announced here
Hated Moron

Re: BBC BASIC for SDL 2.0 version 1.36a released

Post by Hated Moron »

JeremyNicoll wrote: Sat 05 Aug 2023, 08:35 in the BB4W editor the length of the selected area is unchanged.
I can't make any sensible comment about the BB4W editor, I don't use it. As best I recall how the code works (which is hardly at all, I haven't looked at it for 15 years or so!) it uses the Uniscribe API to do the heavy-lifting as far as Complex and RTL scripts are concerned. Maybe the behaviour you describe stems from that, but I don't know.

What I can say is that SDLIDE, which of course I'm more familiar with and have had to code at a lower level (SDL2_ttf and Harfbuzz sadly don't provide the same kind of functionality as Uniscribe in Windows), uses the common 'caret and anchor' method for selection. That is, two points within the text are identified: the caret (which is where the flashing cursor appears) and the anchor.

The region between the caret and the anchor is selected (highlighted). Moving the caret (by pretty much any means) with a Shift key held down leaves the anchor position unchanged. Moving the caret without a Shift key held down moves the anchor to the same position as the caret, and therefore removes any selection.

Dragging with the mouse (i.e. holding the left-button) behaves like moving the caret whilst pressing a Shift key.

So you should find that SDLIDE consistently follows this rule, but if you notice any anomalies let me know. Do bear in mind that if you are running in Linux (or a Raspberry Pi) you need SDL_ttf version 2.20.0 or later to have been installed from the repository - or built from source - for the Right-to-Left and Complex Script functionality to work.
Hated Moron

Re: BBC BASIC for SDL 2.0 version 1.36a released

Post by Hated Moron »

By popular demand (well, one person, which is approximately 50% of the active forum membership!) I have made the Windows edition of BBC BASIC for SDL 2.0 available as an (Inno Setup) installer as well as a Zip archive. It can be found at the usual place.

The advantage of an installer is that it automates everything, including the creation of a desktop icon. It runs with administrative privileges (if Windows has been configured to allow that, which will usually be the case on a personal PC) so it can install the app in a 'protected' location such as C:\Program Files (x86)\.

But some people prefer to know exactly what files are being installed and where, especially if they have security concerns, and the Zip archive is better for that. I have come across a number of Windows applications that are similarly made available in both formats.
Hated Moron

Re: BBC BASIC for SDL 2.0 version 1.36a released

Post by Hated Moron »

Hated Moron wrote: Tue 01 Aug 2023, 08:53 I have now updated the Windows edition (only) to v1.36b. In this version standalone executables behave more like those created by BBC BASIC for Windows, in that libraries and DLLs are deleted after the program has terminated rather than been left lying around on the disk.
BBC BASIC for SDL 2.0 standalone executable (.exe) files for Windows are now very comparable with those generated by BB4W. They can be installed in a 'protected' location (such as C:\Program Files (x86)\) with the only special requirement being that if the application has 'resource' files (graphics, sound effects, music etc.) the program must be run once with admin privileges.

Really the only difference of any note is the size of the executable. With BB4W it can be as small as 100 Kbytes or even less, but with BBCSDL the minimum size is about 1.5 Mbytes. This may sound a lot, but once resource files have been added the difference is often relatively small, for example the standalone .exe of David Williams's Forces of Darkness is 14.8 Mbytes in BB4W and 16.8 Mbytes in BBCSDL.