Page 1 of 2

PureBasic 6.30 beta 1 is ready !

Posted: Mon Sep 01, 2025 8:10 pm
by Fred
Hello everyone,

I hope the holidays season was good ! The brand new beta of PureBasic is available on your online account. It mostly has features which were hanging on my TODO list since a while, and fix a few long time bugs in the process :). Here we go:

Code: Select all

- Added: Brand new HID library !
- Added: Add #PB_ListIcon_NoHeaders flag ListIconGadget()
- Added: Add #PB_Explorer_NoHeaders flag ExplorerListGadget()
- Added: Add Unicode() to create a dynamic unicode string like Ascii() and UTF8()
- Added: HeaderSection/EndHeaderSection to put C or ASM code outside the main() function
- Added: #PB_InputRequester_HandleCancel to have a special return for InputRequester() if the user cancelled it
- Added: Gzip encoding support for HttpRequest(), HttpRequestMemory(), RecieveHTTPFile() and RecieveHTTPMemory()
- Added: #PB_Menu_NativeImageSize tot CreateImageMenu() and CreatePopupImageMenu() to allow larger icons in menus (Windows)
- Added: #PB_2DDrawing_FastText for DrawingMode() to use have a faster text rendering (Windows).
- Added: #PB_Mail_NoSSLCheck and #PB_Mail_WeakSSL flags for SendMail() to ease tests.
- Added: Automatic BOM handling to CreateFile() and ReadFile()/OpenFile() with #PB_File_BOM flag
- Added: Changed x,y type for DisplaySprite/DisplayTransparentSprite() from integer to float (Not supported on DX9 or DX11 subsystem)
- Added: Placeholder support for StringGadget() with #PB_String_PlaceHolder flag
- Added: PackerCallback() to monitor and abort compression.

- Updated: Splitted the 2DDrawing lib with function which doesn't needed dependencies

- Changed: CreateImage() background color now takes full RGBA() color for 32-bit picture. #PB_Image_Transparent and #PB_Image_TransparentBlack can be used to set a transparent background with white or black antialising.
Bugfixes for this version:This list was created automatically. All updated bug threads from the date of the last final version have been determined.

Have fun !

The Fantaisie Software Team

Re: PureBasic 6.30 beta 1 is ready !

Posted: Mon Sep 01, 2025 8:18 pm
by Fred
Here is an HID small example, but I don't have an HID device to test, so may be someone can test it. It's based on hidapi: https://github.com/libusb/hidapi . On Linux, it needs udev and libusb1.0 package to work:

Code: Select all

sudo apt install libusb-1.0-0-dev libudev-dev

Code: Select all

#PB_HID_Path             = 1
#PB_HID_VendorId         = 2
#PB_HID_ProductId        = 3
#PB_HID_SerialNumber     = 4
#PB_HID_ReleaseNumber    = 5
#PB_HID_Manufacturer     = 6
#PB_HID_Product          = 7
#PB_HID_UsagePage        = 8
#PB_HID_Usage            = 9
#PB_HID_InterfaceNumber  = 10
#PB_HID_BusType          = 11
OpenConsole()

ExamineHIDs()
While NextHID()
  
  Debug HIDInfo(#PB_HID_Product)
  Debug HIDInfo(#PB_HID_Manufacturer)
  Debug HIDInfo(#PB_HID_VendorId)
  Debug HIDInfo(#PB_HID_ProductId)
  Debug HIDInfo(#PB_HID_Path)
  Debug HIDInfo(#PB_HID_SerialNumber)
Wend

Re: PureBasic 6.30 beta 1 is ready !

Posted: Mon Sep 01, 2025 8:19 pm
by skinkairewalker
awesome, thanks Fred and Team :)

Re: PureBasic 6.30 beta 1 is ready !

Posted: Mon Sep 01, 2025 8:50 pm
by akee
thanks PB team.

if possible, can update LoadMesh() to read mesh files version 1.41?

Re: PureBasic 6.30 beta 1 is ready !

Posted: Mon Sep 01, 2025 9:11 pm
by Andesdaf
Some nice additions, thank you!

Re: PureBasic 6.30 beta 1 is ready !

Posted: Mon Sep 01, 2025 9:49 pm
by idle
Header section
Gzip
HID

Great stuff

now we can include but also compile c and catch the address of the function in a prototype

Code: Select all

HeaderSection 
#include "E:\idle\plmpeg\pl_mpeg-master\writempg.c";
EndHeaderSection 

PrototypeC pwrite_mpeg(fn,*rgbx,width.l,height.l,fps.l);
Global write_mpeg.pwrite_mpeg 

!g_write_mpeg = &pl_write_mpeg;

Debug @write_mpeg 


Re: PureBasic 6.30 beta 1 is ready !

Posted: Mon Sep 01, 2025 10:07 pm
by skinkairewalker
I can’t wait to release more 3D features.

Re: PureBasic 6.30 beta 1 is ready !

Posted: Mon Sep 01, 2025 11:46 pm
by User_Russian
Fred wrote: Mon Sep 01, 2025 8:18 pmHere is an HID small example, but I don't have an HID device to test
Yes, it works. This code found USB keyboard, mouse and built-in hardware in motherboard from the manufacturer.
Thank you.

I copied the file "HID" from folder "PureLibraries" to PureBasic 6.04 Win x64 and the compiler reported a strange error.
---------------------------
PureBasic - Compiler Error
---------------------------
PureLibrary 'HID' is too old and isn't handled anymore by PureBasic 5.20 or above.
Probably the library is not compatible, but the error sounds strange.

Re: PureBasic 6.30 beta 1 is ready !

Posted: Tue Sep 02, 2025 12:04 am
by spacebuddy
Hi Fred,

Will there be fixes for Mac OS/X Tahoe, none of the 2d and 3d examples work.

Thanks

Re: PureBasic 6.30 beta 1 is ready !

Posted: Tue Sep 02, 2025 1:35 am
by kenmo
Very nice! I noticed HeaderSection added to the IDE and wondered what that was about...

Re: PureBasic 6.30 beta 1 is ready !

Posted: Tue Sep 02, 2025 4:13 am
by jacdelad
Heavy breathing!

Re: PureBasic 6.30 beta 1 is ready !

Posted: Tue Sep 02, 2025 9:11 am
by PeDe
I briefly tested the new HID library with Windows 7 x64 and PB x86. Communication with a Brymen BC-86X adapter for a digital multimeter works.

Peter

Code: Select all

EnableExplicit

Define iHidNumber.i
Define fResult.i
Define iResult.i
Define c.i

Dim aaData.a(4 - 1)
Dim aaBuffer.a(3 * 9 - 1)

aaData(0) =$00	; ReportNumber.
aaData(1) =$00	; Command 1
aaData(2) =$86	; Command 2
aaData(3) =$66	; Command 3

iHidNumber = OpenHID(#PB_Any, $0820, $0001)

fResult = Bool(iHidNumber)
If Not fResult
	Debug("Error OpenHID: " + HIDError())
EndIf

If fResult
	iResult = WriteHIDData(iHidNumber, @aaData(0), 4)
	fResult = Bool(iResult)
	If Not fResult
		Debug("Error WriteHIDData: " + HIDError())
	Else
		Debug("iResult WriteHIDData: " + iResult)
	EndIf
EndIf

If fResult
	For c = 0 To 2
		iResult = ReadHIDData(iHidNumber, @aaBuffer(c * 9 + 1), 8, 1000)
		If Not iResult
			Debug("Error ReadHIDData: " + HIDError())
			Break
		Else
			Debug("iResult ReadHIDData: " + iResult)
		EndIf
	Next
	ShowMemoryViewer(@aaBuffer(0), 27)
EndIf

If iHidNumber
	CloseHID(iHidNumber)
EndIf

Re: PureBasic 6.30 beta 1 is ready !

Posted: Tue Sep 02, 2025 9:14 am
by Fred
Glad to hear !

Re: PureBasic 6.30 beta 1 is ready !

Posted: Tue Sep 02, 2025 9:17 am
by marcoagpinto
Thanks, Fred and Team!

<3 <3 <3 <3 <3

Re: PureBasic 6.30 beta 1 is ready !

Posted: Tue Sep 02, 2025 9:26 am
by Fred
User_Russian wrote: Mon Sep 01, 2025 11:46 pm PureLibrary 'HID' is too old and isn't handled anymore by PureBasic 5.20 or aboverobably the library is not compatible, but the error sounds strange.
Yes, the lib format has changed and old PB version doesn't support it. The error message is not right tough, I will check