PureBasic 6.30 beta 1 is ready !

Developed or developing a new product in PureBasic? Tell the world about it.
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

PureBasic 6.30 beta 1 is ready !

Post 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
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.30 beta 1 is ready !

Post 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
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Dec 04, 2015 9:26 pm

Re: PureBasic 6.30 beta 1 is ready !

Post by skinkairewalker »

awesome, thanks Fred and Team :)
akee
Enthusiast
Enthusiast
Posts: 498
Joined: Wed Aug 18, 2004 9:52 am
Location: Penang, Malaysia

Re: PureBasic 6.30 beta 1 is ready !

Post by akee »

thanks PB team.

if possible, can update LoadMesh() to read mesh files version 1.41?
Andesdaf
User
User
Posts: 84
Joined: Sun Mar 22, 2009 2:53 pm
Location: GER, Saxony

Re: PureBasic 6.30 beta 1 is ready !

Post by Andesdaf »

Some nice additions, thank you!
User avatar
idle
Always Here
Always Here
Posts: 5887
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PureBasic 6.30 beta 1 is ready !

Post 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 

User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Dec 04, 2015 9:26 pm

Re: PureBasic 6.30 beta 1 is ready !

Post by skinkairewalker »

I can’t wait to release more 3D features.
User_Russian
Addict
Addict
Posts: 1525
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: PureBasic 6.30 beta 1 is ready !

Post 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.
spacebuddy
Enthusiast
Enthusiast
Posts: 361
Joined: Thu Jul 02, 2009 5:42 am

Re: PureBasic 6.30 beta 1 is ready !

Post by spacebuddy »

Hi Fred,

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

Thanks
User avatar
kenmo
Addict
Addict
Posts: 2043
Joined: Tue Dec 23, 2003 3:54 am

Re: PureBasic 6.30 beta 1 is ready !

Post by kenmo »

Very nice! I noticed HeaderSection added to the IDE and wondered what that was about...
User avatar
jacdelad
Addict
Addict
Posts: 2004
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: PureBasic 6.30 beta 1 is ready !

Post by jacdelad »

Heavy breathing!
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PeDe
Enthusiast
Enthusiast
Posts: 281
Joined: Sun Nov 26, 2017 3:13 pm

Re: PureBasic 6.30 beta 1 is ready !

Post 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
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.30 beta 1 is ready !

Post by Fred »

Glad to hear !
User avatar
marcoagpinto
Addict
Addict
Posts: 1050
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: PureBasic 6.30 beta 1 is ready !

Post by marcoagpinto »

Thanks, Fred and Team!

<3 <3 <3 <3 <3
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.30 beta 1 is ready !

Post 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
Post Reply