PureBasic 4.30 Beta1 released!

Developed or developing a new product in PureBasic? Tell the world about it.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

PureBasic 4.30 Beta1 released!

Post by freak »

The big day has come. PureBasic 64bit finally sees the light of day! (although Windows only for now)
As promized, this version also brings an OSX x86 version, as well as the long promised Ogre updates.

From now on, even alpha and beta releases are done for all platform simultanously, and with the introduction of the 3DEngine functions and OnError library for all platforms, the amount of platform-specific functions in PureBasic has dropped below 9% giving a great boost to the crossplatform-capabilities of PureBasic.

There are many smaller news as well, so lets get to it...

Note: We had to make some incompatible changes to make developping programs in 32bit and 64bit versions easier and while we were at it, we also made some other chanes as well, so existing code may need a little adjustment to work with the 4.30 version.

To make the transition easier, we introduced "deprecated functions". Where possible, a renamed or removed function still exists and compiles, but the compiler will issue a warning about it each time the function is used. This feature shoud not be an excuse to keep using the old functions however. Deprecated functions are likely to be removed entirely sometime in the future, so you are doing yourself a favor by adapting your code sooner than later.


Here is the list of changes in this Version:

Code: Select all

- new PureBasic 64bit Windows version
- new PureBasic x86 version for OSX
- Ogre update, and many new commands (see below)
- Complete restructuring of the Debugger for better stability and support of the new platforms
- Added: OnError support for all platforms
- Added: Support for multiple Joysticks
- Added: Compiler warning support 
- Added: Debugger warning support
- Added: Language support for Compiler and Debugger (only the compiler is translated in beta 1)
- Added: support for And/Or in CompilerIf statements
- Added: Compiler constant: #PB_Compiler_Processor (= #PB_Processor_x86, ..._x64, ..._PowerPC, ..._mc68000)
- Added: New integer type ".i" which is long/quad for 32bit/64bit respectively
- Added: Improved memory allocation for LinkedList and some other libraries

New features in the Libraries:
- Added: ArraySize()
- Added: CatchModule()
- Added: UseJPEG2000ImageDecoder() and UseJPEG2000ImageEncoder()
- Added: DesktopX(), DesktopY()
- Added: Semaphore commands (CreateSemaphore(), FreeSemaphore(), SignalSemaphore(), WaitSemaphore(), TrySemaphore())
- Added: Window events #PB_Event_WindowMaximize, #PB_Event_WindowMinimize, #PB_Event_WindowRestore
- Added: WindowBounds() to set the minimum/maximum Window size
- Added: #PB_Ignore support to AddStatusBarField()
- Changed: new style parameter for FontRequester()
- Changed: InitScintilla() parameter is now optional
- Changed: Hex(), Bin() have an optional type parameter (use #PB_Long, #PB_Quad) to change the behavior for negative numbers 

Incompatible changes:
- Renamed: CountList() to ListSize()
- Renamed: ClearGadgetItemList() to ClearGadgetItems()
- Renamed: CameraProjection() to CameraProjectionMode() 
- Renamed: #Byte, #Long, #Word etc to #PB_Byte, #PB_Long, #PB_Word (for StrU, Hex, Bin) 

- Removed: CreateGadgetList() - OpenWindow() now calls this implicitly. UseGadgetList() can be used for API windows
- Removed: ChangeListIconGadgetDisplay() - use SetGadgetAttribute(#Gadget, #PB_ListIcon_DisplayMode, Mode) instead 
- Removed: StrQ(), HexQ(), BinQ(), ValQ(), IntQ(). Just use Str(), Hex(), Bin(), etc. instead, they now work with quad
- Removed: Backward compatibility behavior in ButtonImageGadget() (now works as documented since 4.20 only)

- Changed: AddElement() and similar LinkedList functions return the data pointer now (not the list header) 
- Changed: OnError lib rewritten, with some commands renamed or remove (see below)
- Changed: RotateEntity(), RotateCamera() and RotateBillboard() x,y rotation axis
- Changed: The Joystick commands have an extra #Joystick parameter now. InitJoystick() returns the number of available Joysticks
- Changed: The ComboBoxGadget() "Height" parameter now affects the entry field height, not the dropdown box.
- Changed: Read now does not determine its type by the variable used, but as other commands with "Read.l", "Read.s" etc.
           NOTE: "Read x.b" will now read an integer, as the default type will be used for the Read, and then converted to byte! 

Renamed and new OnError library commands:
  OnErrorExit()                - Exit the program if an error occurs
  OnErrorCall(@ErrorHandler()) - Call the given error handler if an error occurs
  OnErrorGoto(?LabelAddress)   - Continue execution at the given label if an error occurs
  OnErrorDefault()             - Uninstall any error handler so the default OS action is taken on further errors 
  ErrorCode()                  - Returns the current error code
  ErrorMessage([ErrorNumber])  - Returns a string message for the current error or the given error number
  ErrorLine()                  - Returns the line number at which the current error occured
  ErrorFile()                  - Returns the source filename in which the current error occured
  ErrorAddress()               - get the Code address at which the error happened
  ErrorTargetAddress()         - get the Memory address for a memory access error.
  ErrorRegister(Register)      - get the content of a register at the time of the error 
  RaiseError(ErrorNumber)      - Raise the given error and call the error handler or exit
  - Note: Resuming the code after the OnErrorCall() handler is no longer possible

Commands removed from the OnError lib wihout replacement:
  OnErrorResume()
  DisASMCommand()
  GetDisASMString()
  GetCurrentEIP()
  GoToEIP()
  ClearError()
  GetErrorDLL() 
  GetErrorCounter()
And here are some news from the Ogre front:

PureBasic 4.30 was promized to be a so called 'Ogre update release'. So let's start from the beginning. The major problem when dealing with third part projects like Ogre, is the number of dependencies needed and their maintenance/upgrade path. Up to now, we took various archives here and here and build them from their own scripts (VC solutions/nmake on Windows, ./configure makefile on linux and so on). That takes an hell of time and you ever wonder if the final build (with all the dependencies linked into a single DLL) will work at all. And basically you need to repeat these steps everytime a new version of Ogre or one of its dependencies are updated. By dependencies, we mean internal one (like the various Ogre plugins: renderer, hydrax, ogreAL, ogreODE etc.) and external one (pcre, CEGUI, FreeType, FreeImage etc.).

So we needed to find a way to maintain it, as easy and upgradable as possible. Main Ogre source repository lastly switched to SVN, so we just did a raw checkout, and we're done. To update to lastest revision is now straightforward. That's the step 1, and we repeated it for every dependencies which offer a SVN access. For other, we took the lastest source versions, and avoid every binary distribution. That's heading us to step 2: build everything yourself. Yes, that's easy to use the provided scripts when building libs one time and for one plateform, but the more PB evolves, the more different plateform we need to support. PureBasic 4.30 introduces OS X x86 and Windows x64, which mades 5 differents OS to build OGRE on. And we definitely don't want to manually do that. Our PureBasic source repository uses basic but very portable makefiles, which allow to compile every libs from the same sources to every supported plateforms. So the idea was obvious: forget the provided build scripts and redo everything with our makefiles. And for a project of the size of Ogre, it's not straightforward. It took almost a whole week to have them completed and working on the 5 plateforms. That's it, our current implementation of Ogre works on Windows x86/x64, Linux, and OSX x86 and PowerPC. And other plateform, if any, will come for free. As a special note, we reduced the Windows dependencies to the maximum, so there is only one DLL needed, no more two. Here ends the technical part of the story.

Now, we had to improve the PureBasic Ogre support. First, we updated Ogre itself, so indeed, we got immediately better internal engine and new functionalities (FSAA, DirectX9, better shadow etc.). Then, we included new plugins: 3D sound management in relation with the 3D world (basically you can create a sound and place it in the world, it will automatically handle the volume, etc.), native GUI functions to create a window and gadgets, on top of the 3D world (the commands duplicates the original PureBasic gadget and window functions), a water plane (with nice sun handling), and a new 'node' library which allow to easily groups and stack various objects like sound, entities and node. For input, we provide an easy 'mouse picking' support, so it's now easy to interact with 3D scene using the mouse. We hope it will help you to do quite some interesting applications or games.

Command list:

Code: Select all

Code:
  * AddGadget3DItem
  * ButtonGadget3D
  * CheckBoxGadget3D
  * ClearGadget3DItemList
  * CloseGadget3DList
  * ContainerGadget3D
  * CountGadget3DItems
  * CreateGadgetList3D
  * DisableGadget3D
  * EditorGadget3D
  * Frame3DGadget3D
  * FreeGadget3D
  * Gadget3DHeight
  * Gadget3DID
  * Gadget3DWidth
  * Gadget3DX
  * Gadget3DY
  * GadgetType3D
  * GetActiveGadget3D
  * GetGadget3DAttribute
  * GetGadget3DData
  * GetGadget3DItemData
  * GetGadget3DItemState
  * GetGadget3DItemText
  * GetGadget3DState
  * GetGadget3DText
  * HideGadget3D
  * ImageGadget3D
  * IsGadget3D
  * ListViewGadget3D
  * OpenGadget3DList
  * OptionGadget3D
  * PanelGadget3D
  * ProgressBarGadget3D
  * RemoveGadget3DItem
  * ResizeGadget3D
  * ScrollAreaGadget3D
  * ScrollBarGadget3D
  * SetActiveGadget3D
  * SetGadget3DAttribute
  * SetGadget3DData
  * SetGadget3DItemData
  * SetGadget3DItemState
  * SetGadget3DItemText
  * SetGadget3DState
  * SetGadget3DText
  * SpinGadget3D
  * StringGadget3D
  * TextGadget3D
 
 
Window3D
  * CloseWindow3D
  * DisableWindow3D
  * EventGadget3D
  * EventType3D
  * EventWindow3D
  * GetActiveWindow3D
  * GetWindowTitle3D
  * HideWindow3D
  * IsWindow3D
  * InputEvent3D()
  * OpenWindow3D
  * ResizeWindow3D
  * SetActiveWindow3D
  * SetWindowTitle3D
  * WindowEvent3D
  * WindowHeight3D
  * WindowID3D
  * WindowWidth3D
  * WindowX3D
  * WindowY3D
 
 
Sound3D
  * FreeSound3D
  * InitSound3D
  * IsSound3D
  * LoadSound3D
  * PlaySound3D
  * SoundID3D()
  * SoundVolume3D
  * StopSound3D
  * SoundRange3D(Min, Max)
  * SoundCone3D()
 
 
Node
  * CreateNode()
  * FreeNode() - and all its children objects
  * IsNode()
  * NodeID()
  * LocateNode()
  * RotateNode()
  * NodeX()
  * NodeY()
  * NodeZ()
  * MoveNode()
  * AttachNodeObject() - Can be a node, sound, billboard, entity, camera (allow easy grouping)
  * DetachNodeObject()
 
Entity:
  * EntityID()
 
World
  * MousePick(#Camera, x, y) - return the entity under the mouse (or a special constant for the World/Terrain)
  * ShowGUI()
  * CreateWater()
  * AntialiasingMode()
  * PointPick()
  * MousePick()
  * PickX/Y/Z()
  * CameraProjectionX/Y()
 
Various:
  * Added absolute/relative rotation for all rotate commands
  * Added absolute move for physic body (see the Shooter.pb test or SimpleCollision.pb)

And here is an archive to test the new engine: http://www.purebasic.com/Ogre1.6.zip


As usual, the documentation for these new things is done during the beta phase, so if you have questions concerning these features, just ask on the forum and the alpha testers and team members can help you.

Please test this new version as much as you can and report any problems. Make sure you read the "Incompatible changes" section above carefully before reporting a bug, as what you think is a bug could well just be a change made on purpose.

You can download the new beta version on your personal account:
http://www.purebasic.com/securedownload/Login.php

We hope you enjoy these changes and updates.

The PureBasic Team
Last edited by freak on Tue Sep 16, 2008 3:45 pm, edited 2 times in total.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

FIRST! :D

Thank you! :D
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

I love Monday :wink:

thanks :D
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

i cant install it on vista64... both installers (32bit & 64bit) create only the "PureBasic.chm", "unins000.exe", "unins000.dat" and two empty folders "PureLibraries", "UserLibraries". :?:

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

Yeah! That's it :lol:
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
maw

Post by maw »

YES!!! Very, very nice! Thank you!!
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

nco2k wrote:i cant install it on vista64... both installers (32bit & 64bit) create only the "PureBasic.chm", "unins000.exe", "unins000.dat" and two empty folders "PureLibraries", "UserLibraries". :?:

c ya,
nco2k
True, i got that as well. I'm on it.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

[edit by fred]

This is so very, very sweet! Image

Now PureBasic should be unstoppable. Best language ever!

freak + Fred > the 'Hoff Image
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

Fred wrote:
nco2k wrote:i cant install it on vista64... both installers (32bit & 64bit) create only the "PureBasic.chm", "unins000.exe", "unins000.dat" and two empty folders "PureLibraries", "UserLibraries". :?:

c ya,
nco2k
True, i got that as well. I'm on it.
Select the 'Full Installation' and all works (german help is currently not part of the Beta)
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
aaron
Enthusiast
Enthusiast
Posts: 267
Joined: Mon Apr 19, 2004 3:04 am
Location: Canada
Contact:

Post by aaron »

Image

Woo hoo!
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

thanks PB Team
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Incredible! The list of changes and new stuff is astonishing. Thank you for bringing us the best programming language ever.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Marco2007
Enthusiast
Enthusiast
Posts: 638
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Post by Marco2007 »

Great! Thx a lot!

...just tried SkyDome.pb and SkyBox.pb...there`s a problem, when moving mouse!
PureBasic for Windows
User avatar
Michael Vogel
Addict
Addict
Posts: 2666
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post by Michael Vogel »

Thanks!

I'm also satisfied that special integer functions (e.g. for ABS) will follow (as written in the help file) :lol:

Michael
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Excellent work. Thank you! :D
Post Reply