Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Lazarus / Re: Lazarus Release 3.4
« Last post by loaded on Today at 09:44:19 am »
Thanks so much for your work.
2
Lazarus / Lazarus Release 3.4
« Last post by mattias on Today at 09:38:42 am »
The Lazarus team is glad to announce the release of Lazarus 3.4.

This is a bugfix release and was built with FPC 3.2.2.

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

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

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

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

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

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).

Note: Since Macos Sonoma 14 debugging takes some time to start the application, especially on first start.
3
Windows / Re: Access Violation on Procedure Exit
« Last post by Zvoni on Today at 09:38:00 am »
Line 11, last Parameter looks fishy to me.
shouldn't that be @tmp[0]?
tmp is dynamic array of char, and first char should be in Member 0
4
It's actually thread-specific on Windows. Only messages for windows that are created within the same thread are handled. This allows you to implement MDI applications. But last time when I checked, it was working wrong way in Lazarus.
5
Linux / Re: [tech tip] TIdIcmpClient on Linux
« Last post by MarkMLl on Today at 09:34:27 am »
Actual i am not so good in using Linux, but is it possible to create a 'special' group with the needed evelates rigths for using ICMP ?!

I don't believe so, the POSIX capabilities are much finer-grained than the traditional user/group ownership model. Reverting to something that was user/group based would be much the same as the traditional setuid root, and the last time I looked GTK refused to run anything treated like that.

If the IDE can set capabilities, it will be not working for enviroments like mine. I have to work under Windows, make a crosscompile to Linux (and RaspBian) and transfer the files with scp to the target. After this i have to set the capabilities every time i have tranfered a new version.

In terms of the final installation stage, they don't really work for anybody. However because they allow just about every security/robustness precaution to be bypassed there's really no alternative to restricting them to whoever has responsibility for the local system... certainly until Linux has some sort of proper code signing.

There's things like Selinux which do- AIUI- have some level of sensitivity to where the binary is running from, but again there really should be some proper signing so that a binary can be traced end-to-end.

MarkMLl
l
6
Graphics / Re: How to make a PNG with text and transparency;
« Last post by jipété on Today at 09:34:23 am »
Hello,

Code: Pascal  [Select][+][-]
  1.           Intf.TColors[i,j]:=Intf.TColors[i,j] or $FF000000;

With Linux/Debian 64bits FCP 3.2.2 Laz 3.2 and Gtk2, that line must be modified as
Code: Pascal  [Select][+][-]
  1.           Intf.TColors[i,j]:=Intf.TColors[i,j] or integer($FF000000);

If not, you'll get a RangeCheckError...
(not tried the previous code, must be the same)

HTH,
7
General / Re: Lazarus 3.2 on RasberryPi5
« Last post by zeljko on Today at 09:32:19 am »
You are right, thanks. I didn't even know I'm on Wayland.

There is a small how to move to X11 on Raspberry Pi:

- open a terminal
- enter sudo raspi-config
- go to Advanced options -> Wayland and hit Enter
- there you can choose between X11 and Wayland, choose X11 and hit Enter
- then move to Finish and hit Enter, you'll be asked for a reboot

After the reboot, you'll be using X11 and Lazarus + all Lazarus applications will work.

Thank you for your help.

hmmm...accurate frame should not trigger under wayland, that's lcl gtk2 bug. Please open an issue against gtk2 ws.

8
Windows / Access Violation on Procedure Exit
« Last post by therealhades on Today at 09:28:13 am »
Hello everyone,

i have the following problem and hope that somebody has an idea what i'm doing wrong.

I defined a record:
Code: Pascal  [Select][+][-]
  1. TStringVar = record
  2.     VarName: String;
  3.     Handle: LongWord;
  4.     Data: String;
  5. end;
  6.  

and a procedure to read a String Value from a PLC:
Code: Pascal  [Select][+][-]
  1. procedure TfrmMain.ReadStringVar(var aVar: TStringVar);
  2. var
  3.   tmp: array of char;
  4.   ads: longint;
  5. begin
  6.   if aVar.Handle = 0 then
  7.     ads:= AdsSyncReadWriteReq(@AMS, ADSIGRP_SYM_HNDBYNAME, $0000, sizeof(aVar.Handle), @aVar.Handle, Length(aVar.VarName) + 1, @aVar.VarName[1])
  8.   else ads:= 0;
  9.   SetLength(tmp, 255);
  10.   if ads = 0 then
  11.     ads:= AdsSyncReadReq(@AMS, ADSIGRP_SYM_VALBYHND, aVar.Handle, Length(tmp), @tmp[1]);
  12.   if ads = 0 then aVar.Data:= PlcStringToString(tmp);
  13.   ShowMessage('in Procedure: ' + aVar.Data);
  14. end;
  15.  

I call this procedure in another procedure (btn[0] is of type TStringVar):
Code: Pascal  [Select][+][-]
  1. ReadStringVar(btn[0]);
  2. ShowMessage('after procedure: ' + btn[0].Data);
  3.  

Now i have the following Situation:
If i compile this code for Win32 or Win64 everything works fine. But if I compile this code for WinCE, only the ShowMessage inside the ReadStringVar procedure is called (with the correct Value from PLC) and then I got an Access Violation and the ShowMessage from the original procedure is not called.

Can anybody tell me what I'm doing wrong? As I said, this only happens with WinCE, on Win32 everything works like a charm.

Best regards
Bjoern

PS: Lazarus Version is 3.2, fpc is 3.2.2


9
Graphics / Re: Incorrect behavior writing pixels[x,y] to a TImage
« Last post by Zvoni on Today at 09:23:43 am »
I started writing code for making a rubber band on a TImage using pixels[].  No matter what I did it wanted to draw only light gray lines.  So I created a very simple piece of test code on a pre-existing image (so it's initialized already):
Can you post that pre-existing image here?
It could be the cause of the problems.
For example if it has a weird color palet then the pixels need to be in that palet.
Maybe that pre-existing Picture has a set Alpha-Channel?
10
Graphics / Re: Incorrect behavior writing pixels[x,y] to a TImage
« Last post by rvk on Today at 09:20:04 am »
I started writing code for making a rubber band on a TImage using pixels[].  No matter what I did it wanted to draw only light gray lines.  So I created a very simple piece of test code on a pre-existing image (so it's initialized already):
Can you post that pre-existing image here?
It could be the cause of the problems.
For example if it has a weird color palet then the pixels need to be in that palet.

As I wrote: that is the wrong approach, use canvas lineto etc.
Will add example later.
Using lineto would be more appropriate for drawing a box... but isn't the issue here.
If you want to manipulate direct pixels on the canvas, the coloring should work too, and it doesn't in this case... that's the issue.

Could you create your example where you manipulate pixels directly, setting a certain color for a pixel?

Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018