Sign in Join
Wiki copytemporary

Lazarus 3.0 release notes

LCL Interfaces Changes

Cocoa

Qt

Qt5

Qt6

Gtk3

LCL Changes

TCustomImageList

TCustomImageList made more extensible:

  1. Protected MarkAsChanged method is added, which sets FChanged to true (this allows to make custom triggers for OnChange event).
  2. Virtual protected DoAfterUpdateStarted and DoBeforeUpdateEnded methods are added. They are called in first BeginUpdate and last EndUpdate respectively.

TTaskDialog

TSpeedButton

TLabel.Transparent, .Color and .ParentColor changes

TPanel.VerticalAlignment

TCalendar

TCheckbox, TRadioButton

Grids

TShellTreeView

TShellListView

TTreeView

TTrayIcon gtk2 Only

If using the gtk2 tray icon, a new global variable is available that will allow you to predetermine which of the two TrayIcon models you use. See the Wiki for details. This is, and will only ever be, gtk2 only.

IDE Changes

Character map

Debugger

Project Options

In newly created Debug/Release modes, the Release mode will no longer invoke the debugger by default.

Existing Debug/Release modes must be edited, to enable this.

IDE Dialogs

FpDebug / LazDebuggerFp

LazDebuggerFpLldb (default on MacOS)

See https://wiki.freepascal.org/LazDebuggerFp (MaxMemReadSize, MaxStringLen, MaxArrayLen, MaxNullStringSearchLen)

Limiting the default results for watches/locals/stack-params,... can prevent slow evaluation.

Arrays can then be browsed in the watches window, using the new "paged browser for arrays" (expand via [+])

Floating point properties in the Object Inspector

Reading unit names in lfm

FPC 3.3.1 component writer supports optionally writing types with their unit names as unitname/type. Lazarus can now read this.

Ambiguous Classtypes

You can now register two component classes with the same name, e.g. fresnel.TButton and StdCtrls.TButton. You can even put both on the same form.

Editor

- Highlight for PasDoc

IDE Options

In Tools -> Options -> Environment -> Window page these three settings are now ON by default :

It has been requested by many users. If the IDE's title bar has no info about the active project, a user must open Project Inspector or Project Options to see it, which is inconvenient.

Lazarus Examples

A new approach to Examples that copies an Example to a fresh working area (avoiding the Linux Read Only Problem) and, possibly an easier to use search model.

IDE Interface Changes

Components

TAChart

TDateTimePicker

TDBDateTimePicker

T(Float)SpinEditEx

TCheckListBox

Pas2js

Lazarus Icon Collection

gir2pascal

lazdelphi

An IDE addon adding a parser for the Delphi compiler errors and hints. You can run dcc32.exe as external tool or execute before command in the compiler options and use the Delphi Compiler parser for the output, so that the errors/hints in the Messages window can open the source. See Lazarus Delphi Compiler Tool

Jedi Code Format

DockedFormEditor

In case you are still using the sparta docked form editor, use the dockedformeditor package instead.

Changes affecting compatibility

IDE Settings

Run > Run Parameters (UPDATED FOR 3.2)

The changes originally described introduced a regression. - They do apply to Lazarus 3.0 - As off Lazarus 3.2 (fixes release) the behaviour has been updated

  1. If a non-empty string is set in "run params" \> "working directory", then this will be used as working directory.
This should be "as before"
     1. IDE-Macros are supported in this path.
     2. If that path is relative, then this was not previously supported. It will be resolved against the "Project directory", not the "Output path"
This is, because the "Output path" is only used as default Woring dir, if there is on "Host App". And resolving a relative directory against different bases can more easily lead to mistakes.
Also the "Project dir" is used as base to resolve a relative "Host app" too.
  2. If there is no user-specified "working directory" then the path of the "target exe" is used.
     1. If a host app is given, the path of the host app is used.
        1. Macros in the host app are allowed
        2. A relative host app is resolved against the "Project dir"
     2. If there is no host app, the path of the compiled project executable is used. (This should be the "output patch")
        1. Macros in the "output path" are allowed
        2. A relative path is resolved against the "Project dir"
  3. If that does not return a path (if there is neither a project exe, nor a ho

Also see https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40693#note_1727379327

If your program uses relative paths but the executable is not in the same directory as the main project file (usually with .lpr extension), the IDE will set different current directory for the program as you expected. The current directory set will point to the directory with main project file instead of the directory where the executable is generated, so all relative paths used in the program will be invalid (ParamStr(0) and all other current-directory-specific functions will return wrong path). This happens only if you run your program using IDE (for example, using F9 key). This behavior was modified in the Lazarus 3.0 and breaks the backward compatibility.

The Working-dir is now determined as follows

  1. BuildMode.RunParams "working directory" set by user (New, this can now be relative to project dir)
  2. Project Dir, if not virtual
  3. Directory from Host-App (RunParams), or if (and only if) Host-App is empty from Project.exe (If host app is in %PATH, then there is no "working directory")

The first 2 steps are the same as before the change. The 3rd step was previously only used for "debugging", but "run without debug" did use: "Launch-App", "Host-App", Project.exe.

Change
The path of the "Launch App" is no longer considered.

The Launch-/Host-App location are now determined as follows

  1. An app with absolute path is used as given.
  2. A relative path (including no path at all) is resolved as relative to the Project-dir.
  3. An app without any path at all (if not found in step 2) is searched in the %PATH environment.

Change
Search in %PATH was only done by "run without debug", but not by debug. It is now done by both.

Change
Checking for an exe relative to the project-dir was added.

Remedy
So now, if you need to use relative paths in the program and be able to run/debug your program using IDE, just go to the "Run Parameters" window and set the

$Path($(OutputFile))

string in the "Working directory" field.

LCL incompatibility

TLabel: autosized and right-aligned

TDateEdit/TTimeEdit

The value of NullDate has changed.
Reason:

Cocoa

Some global configuration variables were moved from CocoaInt to CocoaConfig. such as CocoaBasePPI, CocoaIconUse, CocoaToggleBezel, CocoaToggleType etc.

GTK3

GTK3 is no longer supported on earlier Linuxes, such as Ubuntu 20.04. It requires GTK >= 3.24.24 and Glib2.0 >= 2.66

TControl: ChildSizing

LazUtils

Masks unit

The masks unit has been completely rewritten.
Reasons:

New types (for parameters) and a dedicated TMaskWindows class have been added.
TMask.MatchesWindowsMask and the old TMaskOptions type have been deprecated and will be removed in the next release.
===== Ranges and Sets =====

Constructors do not fail anymore on an invalid mask

Translations unit

Added GetLanguageID function. It returns a record with language code (in ISO 639-1 or ISO 639-2) and country code (in ISO 3166) for current system locale.
Added GetLanguageIDFromLocaleName function. It parses Unix locale name and returns a record with language code and country code. It is useful to parse language identifiers passed e. g. via command-line parameters.

Implementation is based on GetLanguageIDs procedure from GetText unit, but is rewritten to have the following properties:

These functions are used now throughout the Lazarus codebase. This greatly improves automatic language detection and loading of correct translations by Lazarus:

LazUTF8 unit

LazUTF8Classes and LazUTF8SysUtils units

Everything in these units was deprecated for a long time and now they were removed. LazUTF8SysUtils was earlier renamed to LazSysUtils and this deprecated version was left for a transit period.

Components incompatibility

LazControls

TSpinEditExBase derived classes
TFloatSpinEditEx

FpVectorial

TurboPower_ipro

Other release notes


From the Free Pascal wiki, page "Lazarus 3.0 release notes", as it stood on 2024-03-17 after a change by Wp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 2, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.