Recent

Author Topic: Lazarus Release Candidate 2 of 4.0  (Read 13402 times)

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 198
    • http://www.lazarus.freepascal.org
Lazarus Release Candidate 2 of 4.0
« on: January 09, 2025, 10:02:24 am »

The Lazarus team is glad to announce the second release candidate of Lazarus 4.0.

This release was built with FPC 3.2.2.

Here is the list of changes for Lazarus and Free Pascal:
http://wiki.lazarus.freepascal.org/Lazarus_4.0_release_notes
http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

Here is the list of fixes for Lazarus 4.x:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commits/fixes_4/

The release is available for download on SourceForge:
http://sourceforge.net/projects/lazarus/files/

Choose your CPU, OS, distro and then the "Lazarus 4.0RC2" directory.

Checksums for the SourceForge files:
https://www.lazarus-ide.org/index.php?page=checksums#4_0RC2

Minimum requirements:

Windows:
  2k, 32 or 64bit, Qt, Qt5, Qt6 (64bit only)

FreeBSD/Linux:
  gtk 2.24 for gtk2, qt4.5 for qt, qt5.6 for qt5, Qt6.2 for qt6, 32 or 64bit.

Mac OS X:
  Cocoa (64bit) 10.12, Carbon (32bit) 10.5 to 10.14, Qt and Qt5 (32 or 64bit), Qt6 (64bit only).

The gitlab page:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/lazarus_4_0RC2

For people who are blocked by SF, the Lazarus releases from SourceForge
are mirrored at:
https://download.lazarus-ide.org/
ftp://ftp.freepascal.org/pub/lazarus/releases/

== Why should everybody (including you) test the release candidate? ==

In the past weeks the Lazarus team has stabilized the 4.0 fixes branch. The resulting 4.0RC2 is now stable enough to be used by any one for test purposes.

While we have tested those ourselves, there may still be problems that only occur with very specific configurations or one project in a million.

Yes, it may be that you are the only person with a project, that will not work in the new IDE. So if you do not test, we can not fix it.

Please do not wait for the final release, in order to test. It may be too late. Once the release is out we will have to be more selective about which fixes can be merged for further 4.x releases. So it may be, that we can not merge the fix you require. And then you will miss out on all the new features.

== How to test ==

Download and install the 4.0 RC2.
- On Windows you can install as a 2ndary install, that will not affect your current install:

http://wiki.lazarus.freepascal.org/Multiple_Lazarus#Installation_of_multiple_Lazarus
- On other platforms, if you install to a new location you need to use --primary-config-path

In either case you should make backups. (including your primary config)

Open your project in your current Lazarus, and use "Publish Project" from the project menu. This creates a clean copy of your project.

You can then open that copy in the 4.0RC2. Please test:
- If you can edit forms in the designer
   - rename components / change properties in Object inspector / Add new events
   - Add components to form / Move components on form
   - Frames, if you use them
- If you can navigate the source code (e.g. jump to implementation)
- Auto completion in source code
- Compile, debug and run
- Anything else you use in your daily work

salvadordf

  • Jr. Member
  • **
  • Posts: 52
    • BriskBard
Re: Lazarus Release Candidate 2 of 4.0
« Reply #1 on: January 09, 2025, 10:03:43 am »
Great job!!! :D

I'll test it as soon as I can.
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

RayoGlauco

  • Full Member
  • ***
  • Posts: 194
  • Beers: 1567
Re: Lazarus Release Candidate 2 of 4.0
« Reply #2 on: January 09, 2025, 12:05:54 pm »
Great job! Congratulations!
To err is human, but to really mess things up, you need a computer.

tbebekis

  • New member
  • *
  • Posts: 7
Re: Lazarus Release Candidate 2 of 4.0
« Reply #3 on: January 09, 2025, 12:27:35 pm »
Great job.

Many thanks.

silvercoder70

  • Full Member
  • ***
  • Posts: 125
    • Tim Coates
Re: Lazarus Release Candidate 2 of 4.0
« Reply #4 on: January 09, 2025, 12:59:13 pm »
Well done to those responsible for the next version. I will certain check those things you mentioned in the "testing" section. And maybe a video to show it happening.
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

hukka

  • New Member
  • *
  • Posts: 36
    • Github
Re: Lazarus Release Candidate 2 of 4.0
« Reply #5 on: January 09, 2025, 04:09:07 pm »
Problems I found switching from 3.0RC2 to 4.0RC2:

Jumping to a method's implementation does not work for me. I have set up middle click to jump to an identifier's implementation but 4.0RC2 jumps to its declaration in the interface section instead. Same problem with the Code Explorer and the Jump to Procedure toolbar button.

Also something seems to have changed with the font rendering: my preferred font was Office Code Pro but in 4.0RC2 there is additional space between the glyphs. This happens with "Extra character spacing" set to 0 in settings.
« Last Edit: January 09, 2025, 04:12:22 pm by hukka »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10689
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #6 on: January 09, 2025, 04:30:51 pm »
OS?

Problems I found switching from 3.0RC2 to 4.0RC2:

Jumping to a method's implementation does not work for me. I have set up middle click to jump to an identifier's implementation but 4.0RC2 jumps to its declaration in the interface section instead. Same problem with the Code Explorer and the Jump to Procedure toolbar button.
Did you "update" => that is make a default install and keep using your old config? Or did you make a new (maybe 2ndary) Install with new config? Or delete the old config?

If you have a new config, then did you change the setting "Jump directly to method body" in "Codetools > General" ?
Because it defaults to OFF.

If you did use the old config (in that case you would have been asked, if you wanted to upgrade. If you weren't asked when starting 4.0RC2 for the first time, then you did not use the old config), then still check if the setting is enabled.
If it is not, and if you are certain it was on before, and if you did get asked the update question => then report that the update "looses" that setting.

If the setting is on... Report and attach your settings.
It does work for me (at least the normal jump, that I just tested on Win-10).


Quote
Also something seems to have changed with the font rendering: my preferred font was Office Code Pro but in 4.0RC2 there is additional space between the glyphs. This happens with "Extra character spacing" set to 0 in settings.

Is that a strict mono spaced font? Googling says yes... But then it depends if it has all the Glyphs. At least on Windows => If a font misses some chars, then Windows substitutes them.

If you are on Windows, then the spacing usually means that Windows reported some char to have a different width.

If you paste the following lines into an editor using that font
//MW@Xmi:' Ta
//XXXXXXXXXXX

Are they of the same length, and are all chars proper aligned between the 2 lines?

Start the IDE with
lazarus.exe --debug-log=C:\lazlog.txt

and attach the logfile please.
« Last Edit: January 09, 2025, 04:37:58 pm by Martin_fr »

chinaliu

  • Newbie
  • Posts: 4
Re: Lazarus Release Candidate 2 of 4.0
« Reply #7 on: January 09, 2025, 04:31:19 pm »
thanks.

hukka

  • New Member
  • *
  • Posts: 36
    • Github
Re: Lazarus Release Candidate 2 of 4.0
« Reply #8 on: January 09, 2025, 06:27:03 pm »
Thanks for the reply!

OS?

Windows 11 Pro 64-bit.

If you have a new config, then did you change the setting "Jump directly to method body" in "Codetools > General" ?
Because it defaults to OFF.

That was the culprit! I'm using my configs from 3.0RC2 but had neglected to copy over the CodeTools config.

If you paste the following lines into an editor using that font
//MW@Xmi:' Ta
//XXXXXXXXXXX

Are they of the same length, and are all chars proper aligned between the 2 lines?

Yes, they are the same length and aligned.

attach the logfile please.

SetPrimaryConfigPath NewValue="C:\fpc\config_lazarus4"
Hint: (lazarus) Using config file: "C:\fpc\lazarus4\lazarus.cfg"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="C:\fpc\config_lazarus4"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="C:\fpc\lazarus4"
Hint: (lazarus) [TMainIDE.DoOpenProjectFile] "O:\Projects\CaniView\src\CaniView.lpi"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-win64--win32 New=x86_64-win64--win32 Changed: OS/CPU=True LCL=False
Note: (lazarus) [TMainIDE.DoFixupComponentReferences] UNRESOLVED BEFORE loading 0 Root=ThumbsView:TThumbsView RefRoot=FormMain Refs="ImageList"
LoadLFM Creating designer for hidden component of O:\Projects\CaniView\src\forms\Form.Main.pas
InitOpenedProjectFile select form in designer: FormMain:TFormMain TDesigner
******** Highlighter.NeedScan ************
----------------
TNonFormProxyDesignerForm.Destroy: Self=_Designer_ThumbsView:TFrameProxyDesignerForm, LookupRoot=nil
TFrameDesignerForm.Destroy: Self=TFrameDesignerForm, LookupRoot=nil
LAZARUS END - cleaning up ...
FreeFormEditor: FormEditor1=TFormEditor
Hint: (lazarus) [TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
Hint: (lazarus) [TMainIDE.Destroy] END


Attached is a side-by-side screenshot of the font rendered in 3.0RC2 (left) versus 4.0RC2 (right). As you can see it's rendered wider on the right. As far as I could see the issue is specific to this font, though - other monospace fonts like Hack and Courier New seemed to render fine. I suppose a simple fix would be to allow negative values for the extra glyph spacing setting.

JohnnieK

  • New Member
  • *
  • Posts: 31
Re: Lazarus Release Candidate 2 of 4.0
« Reply #9 on: January 09, 2025, 08:35:34 pm »
I have been running Lazarus with fpc 3.3.1 since Sept 2024. I first used Lazarus 3.99 from around the Sept 2024 time. When Lazarus $ RC1 came out I downloaded the source and compiled it with the 3.3.1 fpc. Been working great.
So I downloaded the RC2 source code and "make bigide" fails with the below error:
Code: Pascal  [Select][+][-]
  1. lazarus\lcl\interfaces\win32\win32wsdialogs.pp(385,53) Error: (5000) Identifier not found "CC_ANYCOLOR"

Comparing the RC1 code with the RC2 code it seems like below is new code:
Code: Pascal  [Select][+][-]
  1. class function TWin32WSColorDialog.ColorDialogOptionsToFlags(Options: TColorDialogOptions): DWORD;
  2. {$if fpc_fullversion < 30301}
  3. const
  4.   CC_ANYCOLOR = $00000100;
  5. {$endif fpc_fullversion < 30301}
  6. begin
  7.   Result := 0;
  8.   if cdFullOpen in Options then Result := Result or CC_FULLOPEN;
  9.   if cdPreventFullOpen in Options then Result := Result or CC_PREVENTFULLOPEN;
  10.   if cdShowHelp in Options then Result := Result or CC_SHOWHELP;
  11.   if cdSolidColor in Options then Result := Result or CC_SOLIDCOLOR;
  12.   if cdAnyColor in Options then Result := Result or CC_ANYCOLOR;
  13. end;
  14.  

and that is causing the error. Should I log a bug even though I am using fpc 3.3.1 ?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10689
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #10 on: January 09, 2025, 08:36:05 pm »
About the font.

Which version of the font did you install? It comes in various formats.

I just installed the otf  (and the version without "P" at the end of the name). And it works fine.  (At size 12).

I took an image of your old, your new, win-notepad and my Lazarus 4 IDE => except for "your new" they are all the same.

---
Also, what DPI/PPI settings do you use for your monitor?  100%? Or scaled?
« Last Edit: January 09, 2025, 08:40:46 pm by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10689
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #11 on: January 09, 2025, 08:38:28 pm »
I have been running Lazarus with fpc 3.3.1 since Sept 2024. I first used Lazarus 3.99 from around the Sept 2024 time. When Lazarus $ RC1 came out I downloaded the source and compiled it with the 3.3.1 fpc. Been working great.
So I downloaded the RC2 source code and "make bigide" fails with the below error:
Code: Pascal  [Select][+][-]
  1. lazarus\lcl\interfaces\win32\win32wsdialogs.pp(385,53) Error: (5000) Identifier not found "CC_ANYCOLOR"

Is your 3.3.1 uptodate? Did you recently update it?

3.3.1 changes all the time. When it changes then Lazarus (main branch) gets update to work with the latest 3.3.1.  Lazarus 4.0 would therefore require a newer 3.3.1 than older Lazarus.

zeljko

  • Hero Member
  • *****
  • Posts: 1690
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus Release Candidate 2 of 4.0
« Reply #12 on: January 09, 2025, 08:39:45 pm »
CC_ANYCOLOR is recently added to 3.3.1 afair.

TRon

  • Hero Member
  • *****
  • Posts: 3811
Re: Lazarus Release Candidate 2 of 4.0
« Reply #13 on: January 09, 2025, 08:53:26 pm »
CC_ANYCOLOR is recently added to 3.3.1 afair.
about 1 month ago by this commit so @JohnnieK so in case your current FPC is older then it is needed to update (or use FPC 3.2.2 or 3.2 fixes instead)
I do not have to remember anything anymore thanks to total-recall.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10689
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #14 on: January 09, 2025, 08:55:26 pm »
About the font.

Please open the file   components\synedit\syntextdrawer.pp

And go to line 744
That is the last line in
Procedure TheFontStock.CalcFontAdvance(DC: HDC; FontData: PheFontData;

And that line is
Code: Pascal  [Select][+][-]
  1.   FontData^.NeedETO := ETO;

Change it to
Code: Pascal  [Select][+][-]
  1.   FontData^.NeedETO := False;

And rebuild the IDE.

See if that makes any difference. (This is not a fix, this may have side effects, leading to small paint errors / but I want to check if the issue is related to this).


When you rebuild, please also compile with
Code: Text  [Select][+][-]
  1. -dSYNFONTDEBUG
(in custom options, of Configure build Lazarus).

Then run from console again to get the log again.




And please open an issue for this. Or start a new thread, so it does not get mixed with all the other comments.
« Last Edit: January 09, 2025, 09:14:56 pm by Martin_fr »

 

TinyPortal © 2005-2018