From mailinglists at geldenhuys.co.uk Fri Nov 1 00:04:50 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 31 Oct 2019 23:04:50 +0000 Subject: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why? In-Reply-To: References: <2pclret98b5rh2slotdi6l48ipngnt1qpf@4ax.com> Message-ID: <52ce7e72-7730-5e8f-65ff-b3ea05eeadc9@geldenhuys.co.uk> Hi Bo, On 31/10/2019 10:02 pm, Michael Van Canneyt via lazarus wrote: > If the 'interfaces' unit is in the uses clause of your program, try > removing it. In addition to what Michael said, you can also run `ldd /path/and/program` and Linux will tell you your executable is dependent on X11 libraries. If so, then "nogui" might still be pulling in dependencies without your knowledge. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From sysrpl at gmail.com Fri Nov 1 02:27:42 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 31 Oct 2019 21:27:42 -0400 Subject: [Lazarus] gdb problems on ubtuntu 19.10 Message-ID: I know this problem is not entirely Lazarus related, but I'm hoping someone here might be able to provide some insight. On a fresh install of Ubuntu 19.10 when running projects from Lazarus with gdb debugging, any and all projects take anywhere from 20 to 30 seconds to become interactive after a project has been compiled and run. That is, the visual forms either do not appear when running, or appear but an unresponsive for 20-30 seconds. If I run without the debugger the programs start almost instantly. When I run the same program from a terminal using gdb manually, I get the same unresponsive delay. Does anyone know what the problem might be and how to fix it? I've done a little google foo searching and have come up empty. Thanks for your help. Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Fri Nov 1 02:49:05 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 1 Nov 2019 02:49:05 +0100 Subject: [Lazarus] gdb problems on ubtuntu 19.10 In-Reply-To: References: Message-ID: <03225365-2604-2325-5180-5c1f50137be2@mfriebe.de> On 01/11/2019 02:27, Anthony Walter via lazarus wrote: > I know this problem is not entirely Lazarus related, but I'm hoping > someone here might be able to provide some insight. > > On a fresh install of Ubuntu 19.10 when running projects from Lazarus > with gdb debugging, any and all projects take anywhere from 20 to 30 > seconds to become interactive after a project has been compiled and > run. That is, the visual forms either do not appear when running, or > appear but an unresponsive for 20-30 seconds. If I run without the > debugger the programs start almost instantly. > > When I run the same program from a terminal using gdb manually, I get > the same unresponsive delay. > > Does anyone know what the problem might be and how to fix it? I've > done a little google foo searching and have come up empty. > Don't know, but maybe a guess and a question. Does gdb output anything during this time? GDB loads info about libraries used (watch mem usage), though over 20 secs seems long   set auto-solib-add off There may be other such hidden work of gdb, but I wouldn't be aware of it.... (there is follow forks, but that must be off) ----- If you strip the executable, and then run it in gdb what happens? You can't debug, obviously. But gdb has less work to do. From sysrpl at gmail.com Fri Nov 1 05:53:03 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 1 Nov 2019 00:53:03 -0400 Subject: [Lazarus] gdb problems on ubtuntu 19.10 In-Reply-To: <03225365-2604-2325-5180-5c1f50137be2@mfriebe.de> References: <03225365-2604-2325-5180-5c1f50137be2@mfriebe.de> Message-ID: Stripping debug symbols from my test program has no effect. The gdb program still takes 20-30 seconds to open my text programs written using Lazarus. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Fri Nov 1 11:24:18 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 1 Nov 2019 11:24:18 +0100 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <7A2DDAE9-C10F-4973-9C49-A6B2030EE868@gmail.com> References: <20191031134047.757c4be8@limapholos.matflo.wg> <7A2DDAE9-C10F-4973-9C49-A6B2030EE868@gmail.com> Message-ID: <20191101112418.782ac690@limapholos.matflo.wg> On Thu, 31 Oct 2019 10:30:03 -0500 Dan Star via lazarus wrote: >[...] > > I upgraded from Mojave to Catalina > > > > executed "xcode-select --install" > > > > And then to find the crt1.10.5 I changed in /etc/fpc.cfg the -Fl > > behind "#ifdef cpux86_64" from > > -Fl/Applications/Xcode.app/Contents/Developer/Toolchain... > > to > > -Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/ > > > > Now Lazarus can compile itself. > > What are the correct file permissions on /etc/fpc.cfg? root wheel 644 Mattias From nc-gaertnma at netcologne.de Fri Nov 1 12:20:54 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 1 Nov 2019 12:20:54 +0100 Subject: [Lazarus] Lazarus Release 2.0.6 Message-ID: <20191101122054.3409e534@limapholos.matflo.wg> The Lazarus team is glad to announce the release of Lazarus 2.0.6. This release was built with FPC 3.0.4. The previous release Lazarus 2.0.4 was built with FPC 3.0.4 as well. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.0.4 Here is the list of fixes for Lazarus 2.0.x: http://wiki.freepascal.org/Lazarus_2.0_fixes_branch The release is available for download on SourceForge: http://sourceforge.net/projects/lazarus/files/ Choose your CPU, OS, distro and then the "Lazarus 2.0.6" directory. Checksums for the SourceForge files: http://www.lazarus-ide.org/index.php?page=checksums#2_0_6 Minimum requirements: Windows: 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. FreeBSD/Linux: gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. Mac OS X: 10.5 to 10.12; Carbon (32bit), Cocoa (64bit), qt and qt5 (32 or 64bit). The svn tag is http://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_6 For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/ and later at (after some time for synchronization) http://mirrors.iwi.me/lazarus/ Mattias From sam_herzog at yahoo.com Fri Nov 1 12:24:06 2019 From: sam_herzog at yahoo.com (Samuel Herzog) Date: Fri, 1 Nov 2019 11:24:06 +0000 (UTC) Subject: [Lazarus] Lazarus Release 2.0.6 In-Reply-To: <20191101122054.3409e534@limapholos.matflo.wg> References: <20191101122054.3409e534@limapholos.matflo.wg> Message-ID: <712649402.221246.1572607446315@mail.yahoo.com> Great! Many thanks to all of you!Vielen Dank an alle! Happy coding  and a nice day. Sam Frische Musik für deine Ohren. DJ Duke Am Freitag, 1. November 2019, 12:21:10 MEZ hat Mattias Gaertner via lazarus Folgendes geschrieben: The Lazarus team is glad to announce the release of Lazarus 2.0.6. This release was built with FPC 3.0.4. The previous release Lazarus 2.0.4 was built with FPC 3.0.4 as well. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.0.4 Here is the list of fixes for Lazarus 2.0.x: http://wiki.freepascal.org/Lazarus_2.0_fixes_branch The release is available for download on SourceForge: http://sourceforge.net/projects/lazarus/files/ Choose your CPU, OS, distro and then the "Lazarus 2.0.6" directory. Checksums for the SourceForge files: http://www.lazarus-ide.org/index.php?page=checksums#2_0_6 Minimum requirements: Windows:   2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. FreeBSD/Linux:   gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. Mac OS X:   10.5 to 10.12; Carbon (32bit), Cocoa (64bit), qt and qt5 (32 or   64bit). The svn tag is http://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_6 For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/ and later at (after some time for synchronization) http://mirrors.iwi.me/lazarus/ Mattias -- _______________________________________________ lazarus mailing list lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Fri Nov 1 12:46:50 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 1 Nov 2019 12:46:50 +0100 (CET) Subject: [Lazarus] Lazarus Release 2.0.6 In-Reply-To: <20191101122054.3409e534@limapholos.matflo.wg> References: <20191101122054.3409e534@limapholos.matflo.wg> Message-ID: First of all: congratulations, I downloaded the version at once ! 2 small notes: The offered 'latest version' on sourceforge for mac 64-bit is 2.0.4: lazarus-2.0.4-i686-macosx.dmg So I searched and installed lazarus-2.0.6-i686-macosx.dmg instead. When I install that version, it says: i386-darwin-carbon Is this correct ? So this is not yet a cocoa-based release, ready for Catalina ? Michael. On Fri, 1 Nov 2019, Mattias Gaertner via lazarus wrote: > The Lazarus team is glad to announce the release of Lazarus 2.0.6. > > This release was built with FPC 3.0.4. > The previous release Lazarus 2.0.4 was built with FPC 3.0.4 as well. > > Here is the list of changes for Lazarus and Free Pascal: > http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes > http://wiki.lazarus.freepascal.org/User_Changes_3.0.4 > > Here is the list of fixes for Lazarus 2.0.x: > http://wiki.freepascal.org/Lazarus_2.0_fixes_branch > > The release is available for download on SourceForge: > http://sourceforge.net/projects/lazarus/files/ > > Choose your CPU, OS, distro and then the "Lazarus 2.0.6" directory. > > Checksums for the SourceForge files: > http://www.lazarus-ide.org/index.php?page=checksums#2_0_6 > > Minimum requirements: > > Windows: > 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. > > FreeBSD/Linux: > gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. > > Mac OS X: > 10.5 to 10.12; Carbon (32bit), Cocoa (64bit), qt and qt5 (32 or > 64bit). > > The svn tag is > http://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_6 > > For people who are blocked by SF, the Lazarus releases from SourceForge > are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/ > and later at (after some time for synchronization) > http://mirrors.iwi.me/lazarus/ > > Mattias > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus From nc-gaertnma at netcologne.de Fri Nov 1 13:30:42 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 1 Nov 2019 13:30:42 +0100 Subject: [Lazarus] Lazarus Release 2.0.6 In-Reply-To: References: <20191101122054.3409e534@limapholos.matflo.wg> Message-ID: <20191101133042.31a86269@limapholos.matflo.wg> On Fri, 1 Nov 2019 12:46:50 +0100 (CET) Michael Van Canneyt via lazarus wrote: > First of all: > congratulations, I downloaded the version at once ! > > 2 small notes: > > The offered 'latest version' on sourceforge for mac 64-bit is 2.0.4: > lazarus-2.0.4-i686-macosx.dmg It seems sourceforge has some trouble at the moment. I get random error messages "Oh snap...". > So I searched and installed lazarus-2.0.6-i686-macosx.dmg instead. > > When I install that version, it says: > i386-darwin-carbon > > Is this correct ? > So this is not yet a cocoa-based release, ready for Catalina ? I'm working on a Catalina dmg. Mattias From michael at freepascal.org Fri Nov 1 13:36:20 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 1 Nov 2019 13:36:20 +0100 (CET) Subject: [Lazarus] Lazarus Release 2.0.6 In-Reply-To: <20191101133042.31a86269@limapholos.matflo.wg> References: <20191101122054.3409e534@limapholos.matflo.wg> <20191101133042.31a86269@limapholos.matflo.wg> Message-ID: On Fri, 1 Nov 2019, Mattias Gaertner via lazarus wrote: > On Fri, 1 Nov 2019 12:46:50 +0100 (CET) > Michael Van Canneyt via lazarus wrote: > >> First of all: >> congratulations, I downloaded the version at once ! >> >> 2 small notes: >> >> The offered 'latest version' on sourceforge for mac 64-bit is 2.0.4: >> lazarus-2.0.4-i686-macosx.dmg > > It seems sourceforge has some trouble at the moment. I get random error > messages "Oh snap...". Good luck, then... >> So I searched and installed lazarus-2.0.6-i686-macosx.dmg instead. >> >> When I install that version, it says: >> i386-darwin-carbon >> >> Is this correct ? >> So this is not yet a cocoa-based release, ready for Catalina ? > > I'm working on a Catalina dmg. I don't have catalina yet, so no hurry on my account. Michael. From bo.berglund at gmail.com Fri Nov 1 15:02:12 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 01 Nov 2019 15:02:12 +0100 Subject: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why? References: <2pclret98b5rh2slotdi6l48ipngnt1qpf@4ax.com> <52ce7e72-7730-5e8f-65ff-b3ea05eeadc9@geldenhuys.co.uk> Message-ID: <99eore1l10839a6s9gtaiv3ij0f1spaf47@4ax.com> On Thu, 31 Oct 2019 23:04:50 +0000, Graeme Geldenhuys via lazarus wrote: >Hi Bo, > >On 31/10/2019 10:02 pm, Michael Van Canneyt via lazarus wrote: >> If the 'interfaces' unit is in the uses clause of your program, try >> removing it. > > >In addition to what Michael said, you can also run >`ldd /path/and/program` and Linux will tell you your executable is >dependent on X11 libraries. If so, then "nogui" might still be pulling >in dependencies without your knowledge. Does this mean that the program may still only run on a Pi where there is an installed desktop? For example if I move the application to an RPi4 with Raspbian Lite installed, will it possibly barf at me then? With nogui it so far seems to work OK, but I have only tested very little. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Fri Nov 1 15:16:13 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 01 Nov 2019 15:16:13 +0100 Subject: [Lazarus] Lazarus Release 2.0.6 References: <20191101122054.3409e534@limapholos.matflo.wg> Message-ID: On Fri, 1 Nov 2019 12:20:54 +0100, Mattias Gaertner via lazarus wrote: >The Lazarus team is glad to announce the release of Lazarus 2.0.6. > >This release was built with FPC 3.0.4. THanks for the upgrade! I have downloaded the sources via svn and am building bigide on Rasdpberry Pi4 as I write this. Happy to be part of an active community!! :-) -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Fri Nov 1 22:10:36 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 01 Nov 2019 22:10:36 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... Message-ID: I installed Lazarus 2.0.6 a few hours ago into a fully updated Raspbian Buster on an RPi4B 4GB system. Interfacing to it using RealVNC to my Windows7 laptop. I opened the current project and checked that it would build etc. No problems. Then I started write a section of description comments at the top of a source file and when I was almost done and clicked in the editor window a few lines down to move the cursor, Lazarus suddenly just unloaded on me!!! Desktop still there and all seemingly working OK except Lazarus had disappeared. All edits lost when I restarted Lazarus. :-( I have never before encountered a crash like this, could it be because the IDE is so "fresh out of the presses"? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Fri Nov 1 22:25:33 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 01 Nov 2019 22:25:33 +0100 Subject: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B References: <6ef11cc4-dbc7-84a6-a2b4-0a04470c36a8@mfriebe.de> <2bc39306-bd66-be25-2df4-a5433f559087@mfriebe.de> Message-ID: On Tue, 17 Sep 2019 22:27:13 +0200, Martin Frb via lazarus wrote: >Can you please retest with >Revision: 61896 >Date: 17 September 2019 22:21:38 >EditorMacroScript: Use "internal" (none-native) calling for object methods > >Making sure you remove your editormacroscript.xml file, or re-request >the self-test from the options page, please. I just installed Lazarus 2.0.6 from sources and when I started it on Raspbian Buster I did get the dialog again. I assume your change is in 2.0.6? Help/About reports revision 62151. On Lazarus startup it created the file and following starts are OK. If I remove the file the error box re-appears (once) on Lazarus start. -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Fri Nov 1 22:56:32 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 1 Nov 2019 22:56:32 +0100 Subject: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B In-Reply-To: References: <6ef11cc4-dbc7-84a6-a2b4-0a04470c36a8@mfriebe.de> <2bc39306-bd66-be25-2df4-a5433f559087@mfriebe.de> Message-ID: On 01/11/2019 22:25, Bo Berglund via lazarus wrote: > I just installed Lazarus 2.0.6 from sources and when I started it on > Raspbian Buster I did get the dialog again. I assume your change is in > 2.0.6? Help/About reports revision 62151. > > No, the change was a bigger change, which will only be in 2.2 From lazarus at mfriebe.de Fri Nov 1 23:03:16 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 1 Nov 2019 23:03:16 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: Message-ID: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> On 01/11/2019 22:10, Bo Berglund via lazarus wrote: > I installed Lazarus 2.0.6 a few hours ago into a fully updated > Raspbian Buster on an RPi4B 4GB system. Interfacing to it using > RealVNC to my Windows7 laptop. > > I opened the current project and checked that it would build etc. No > problems. > > Then I started write a section of description comments at the top of a > source file and when I was almost done and clicked in the editor > window a few lines down to move the cursor, Lazarus suddenly just > unloaded on me!!! > Desktop still there and all seemingly working OK except Lazarus had > disappeared. > > All edits lost when I restarted Lazarus. :-( > > I have never before encountered a crash like this, could it be because > the IDE is so "fresh out of the presses"? Good question "why". That can't be answered easily. And the issue could be new or old. Unfortunately more info would be needed. So it depends how reproducible the issue is. It could easily be something related to RP (and then may happen again).  Or Gtk (2 or 3 ?). Is there a core file? If yes, try to get a trace with gdb. If it can be reproduced, try getting a stacktrace. If the IDE is build with debug info, and run from console (or with --debug-log=file) then it will in most cases print a trace of the crash. If it does not print a trace, then running the IDE (still with debug info) under gdb can help. Well and a "autosave" feature might be nice, but needs to be written... From sysrpl at gmail.com Sat Nov 2 03:04:38 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 1 Nov 2019 22:04:38 -0400 Subject: [Lazarus] gdb problems on ubtuntu 19.10 In-Reply-To: References: <03225365-2604-2325-5180-5c1f50137be2@mfriebe.de> Message-ID: An update. I installed Linux Mint 19.2 on the same laptop and re-ran my install script. The problem previously described with gdb did not present itself. This leads me to believe there is some kind of problem with gdb in Ubtuntu 19.10, the prior OS I was testing. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Sat Nov 2 06:00:44 2019 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 2 Nov 2019 06:00:44 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> Message-ID: <6a5f25a9-b2fd-c5e3-7b2f-1821316df7e1@kluug.net> On 01.11.2019 23:03, Martin Frb via lazarus wrote: > Well and a "autosave" feature might be nice, but needs to be written... The project is always automatically saved when you compile it. Ondrej From michael at freepascal.org Sat Nov 2 10:10:00 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 2 Nov 2019 10:10:00 +0100 (CET) Subject: [Lazarus] gdb problems on ubtuntu 19.10 In-Reply-To: References: <03225365-2604-2325-5180-5c1f50137be2@mfriebe.de> Message-ID: On Fri, 1 Nov 2019, Anthony Walter via lazarus wrote: > An update. I installed Linux Mint 19.2 on the same laptop and re-ran my > install script. The problem previously described with gdb did not present > itself. This leads me to believe there is some kind of problem with gdb in > Ubtuntu 19.10, the prior OS I was testing. It might be a good idea to report it. Michael. From bo.berglund at gmail.com Sat Nov 2 11:02:01 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 02 Nov 2019 11:02:01 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <6a5f25a9-b2fd-c5e3-7b2f-1821316df7e1@kluug.net> Message-ID: On Sat, 2 Nov 2019 06:00:44 +0100, Ondrej Pokorny via lazarus wrote: >On 01.11.2019 23:03, Martin Frb via lazarus wrote: >> Well and a "autosave" feature might be nice, but needs to be written... > >The project is always automatically saved when you compile it. > Yes, I know that and it works fine. But this happened while I was busy writing a description of the application data file usage and where what goes where. I put this into the comment section I always have at the top of the file (below the unit name line). Luckily I did not have any actual code changes at the time so only my comments were lost and had to be re-created. It was my first code editing after installing the needed packages into Lazarus 2.0.6 -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sat Nov 2 11:10:32 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 02 Nov 2019 11:10:32 +0100 Subject: [Lazarus] Lazarus code editor improvement? Message-ID: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> When I am working on a multi-unit application I very often want to check the implementation of a function which is called from somewhere. So I right click the function name in the code line and select "Find Declaration of " This brings me invariably to the interface section function declaration from which I have to jump to the actual implementation (Ctrl-Shift-Downarrow). I would like to avoid this 2-step process if possible by having a second right-click command: "Find Implemnentation of " Is this possible already (but hidden in the standard config of Lazarus) or is it a new feature noone has requested before? When I work in other IDE:s for different languages this is a common feature I use a lot when troubleshooting.... -- Bo Berglund Developer in Sweden From michael at freepascal.org Sat Nov 2 11:23:32 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 2 Nov 2019 11:23:32 +0100 (CET) Subject: [Lazarus] Annoying code completion failure Message-ID: Hi, TStrings has a property property Values[const Name: string]: string read GetValue write SetValue; The setter is defined as: procedure SetValue(const Name, Value: string); Note that both arguments are 'const' When adding a new property, and pressing 'CTRL-C', the IDE adds the new property, but also insists on adding a new SetValue: procedure SetValue(const Name: string; AValue: string); Note the missing const on the second parameter. It does this of course not only for TStrings, but for all such properties. Michael. From karl-michael.schindler at physik.uni-halle.de Sat Nov 2 11:26:44 2019 From: karl-michael.schindler at physik.uni-halle.de (Karl-Michael Schindler) Date: Sat, 02 Nov 2019 11:26:44 +0100 Subject: [Lazarus] Separation of source code and compiled units Message-ID: Hi I am working on the package description for lazarus for MacPorts and are struggling with the following: $PREFIX/share/lazarus contains the source code as well as the compiled units. In case lazarus is recompiled the directory $PREFIX/share/lazarus needs to be writable by all users. At least this is as far as I got. Is there a way to keep the source files readonly and place the compiled files somewhere separate? How has this been dealt with for linux? Greetings - Michael. From pascaldragon at googlemail.com Sat Nov 2 11:47:12 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 2 Nov 2019 11:47:12 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> Message-ID: Bo Berglund via lazarus schrieb am Sa., 2. Nov. 2019, 11:10: > Is this possible already (but hidden in the standard config of > Lazarus) or is it a new feature noone has requested before? > Tools -> Options -> Codetools -> General -> Jump directly to method body Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Sat Nov 2 11:49:47 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 2 Nov 2019 11:49:47 +0100 Subject: [Lazarus] Separation of source code and compiled units In-Reply-To: References: Message-ID: Karl-Michael Schindler via lazarus schrieb am Sa., 2. Nov. 2019, 11:27: > Hi > > I am working on the package description for lazarus for MacPorts and are > struggling with the following: $PREFIX/share/lazarus contains the source > code as well as the compiled units. In case lazarus is recompiled the > directory $PREFIX/share/lazarus needs to be writable by all users. At least > this is as far as I got. Is there a way to keep the source files readonly > and place the compiled files somewhere separate? How has this been dealt > with for linux? > If I remember correctly then Lazarus recompiles itself into a directory in the user's home directory if the original isn't writable. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl-michael.schindler at physik.uni-halle.de Sat Nov 2 12:21:44 2019 From: karl-michael.schindler at physik.uni-halle.de (Karl-Michael Schindler) Date: Sat, 02 Nov 2019 12:21:44 +0100 Subject: [Lazarus] Separation of source code and compiled units In-Reply-To: References: Message-ID: <8B1D5DF3-34C9-4398-8B6B-BE05DE5E92D6@physik.uni-halle.de> Am 02.11.2019 um 12:00 schrieb Sven Barth via : > Karl-Michael Schindler via lazarus schrieb > am Sa., 2. Nov. 2019, 11:27: > >> Hi >> >> I am working on the package description for lazarus for MacPorts and are >> struggling with the following: $PREFIX/share/lazarus contains the source >> code as well as the compiled units. In case lazarus is recompiled the >> directory $PREFIX/share/lazarus needs to be writable by all users. At least >> this is as far as I got. Is there a way to keep the source files readonly >> and place the compiled files somewhere separate? How has this been dealt >> with for linux? > > If I remember correctly then Lazarus recompiles itself into a directory in > the user's home directory if the original isn't writable. > > Regards, > Sven I looked into that and I might even manage to bend it, in order to use $PREFIX/var/lib/lazarus and keep $PREFIX/share/lazarus readonly. But before going down that way with all the time for testing, i would appreciate opinions on that? Regards - Michael. From giuliano.colla at fastwebnet.it Sat Nov 2 12:51:44 2019 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sat, 2 Nov 2019 12:51:44 +0100 Subject: [Lazarus] Separation of source code and compiled units In-Reply-To: References: Message-ID: Il 02/11/2019 11:26, Karl-Michael Schindler via lazarus ha scritto: > I am working on the package description for lazarus for MacPorts and are struggling with the following: $PREFIX/share/lazarus contains the source code as well as the compiled units. In case lazarus is recompiled the directory $PREFIX/share/lazarus needs to be writable by all users. At least this is as far as I got. Is there a way to keep the source files readonly and place the compiled files somewhere separate? How has this been dealt with for linux? As Sven pointed, in Linux when the $PREFIX/lazarus directory is not writable, the compiled files and the executable are put into the user's home directory under ~/.lazarus (which is also the default path for user configuration files). Executable in ~/.lazarus/bin, compiled units in ~/.lazarus/lib and ~/.lazarus/units. That's the default behaviour, but you may also select a different target directory for your recompiled copy from Tools->Configure "Build Lazarus"->Target directory. Moreover, startlazarus will check if the lazarus copy in $PREFIX/lazarus is newer than your local recompiled lazarus, which happens if you update to a new version. In that case it will ask you which one you want to start. If you make $PREFIX/lazarus writable, you will always have only one copy of Lazarus. If you don't, you will have two copies: the original one, and your recompiled one. Giuliano -- Do not do to others as you would have them do to you.They might have different tastes. From bo.berglund at gmail.com Sat Nov 2 14:48:39 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 02 Nov 2019 14:48:39 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> Message-ID: <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> On Fri, 1 Nov 2019 23:03:16 +0100, Martin Frb via lazarus wrote: >> I have never before encountered a crash like this, could it be because >> the IDE is so "fresh out of the presses"? >Good question "why". That can't be answered easily. And the issue could >be new or old. > >Unfortunately more info would be needed. So it depends how reproducible >the issue is. >It could easily be something related to RP (and then may happen again).  >Or Gtk (2 or 3 ?). > >Is there a core file? If yes, try to get a trace with gdb. > >If it can be reproduced, try getting a stacktrace. If the IDE is build >with debug info, and run from console (or with --debug-log=file) then it >will in most cases print a trace of the crash. >If it does not print a trace, then running the IDE (still with debug >info) under gdb can help. Now it happened again! I was compiling the program then executing it inside a terminal (external to Lazarus) and then repeating this to find my bug. When I found it I doubleclicked the name of my logging component to copy its name, but instead instanly Lazarus disappeared! I will now revert back to Lazarus 2.0.4 instead. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sat Nov 2 14:58:52 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 02 Nov 2019 14:58:52 +0100 Subject: [Lazarus] Lazarus code editor improvement? References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> Message-ID: On Sat, 02 Nov 2019 11:10:32 +0100, Bo Berglund via lazarus wrote: I just found another strange IDE "feature": If I am in a tab to the right (not the left-most tab) with the cursor anywhere in the code and I want to add say a { character, I need to press AltGr (the right hand Alt key) and the 7 key. This normally results in a { character being output at the cursor. But in Lazarus the focus immediately shifts to a different tab when AltGr is pressed!! How did that happen? All European languages to my knowledge uses the AltGr key to compose special chars like {[]}\|~ Why is Lazarus stealing the AltGr key? -- Bo Berglund Developer in Sweden From pascaldragon at googlemail.com Sat Nov 2 15:04:15 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 2 Nov 2019 15:04:15 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> Message-ID: Bo Berglund via lazarus schrieb am Sa., 2. Nov. 2019, 14:59: > On Sat, 02 Nov 2019 11:10:32 +0100, Bo Berglund via lazarus > wrote: > > I just found another strange IDE "feature": > > If I am in a tab to the right (not the left-most tab) with the cursor > anywhere in the code and I want to add say a { character, I need to > press AltGr (the right hand Alt key) and the 7 key. This normally > results in a { character being output at the cursor. > > But in Lazarus the focus immediately shifts to a different tab when > AltGr is pressed!! > How did that happen? All European languages to my knowledge uses the > AltGr key to compose special chars like {[]}\|~ > Why is Lazarus stealing the AltGr key? > Check the key mappings in Lazarus' options. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Sat Nov 2 15:34:02 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 02 Nov 2019 15:34:02 +0100 Subject: [Lazarus] Lazarus code editor improvement? References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> Message-ID: <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> On Sat, 2 Nov 2019 15:04:15 +0100, Sven Barth via lazarus wrote: >Bo Berglund via lazarus schrieb am Sa., 2. >Nov. 2019, 14:59: > >> On Sat, 02 Nov 2019 11:10:32 +0100, Bo Berglund via lazarus >> wrote: >> >> I just found another strange IDE "feature": >> >> If I am in a tab to the right (not the left-most tab) with the cursor >> anywhere in the code and I want to add say a { character, I need to >> press AltGr (the right hand Alt key) and the 7 key. This normally >> results in a { character being output at the cursor. >> >> But in Lazarus the focus immediately shifts to a different tab when >> AltGr is pressed!! >> How did that happen? All European languages to my knowledge uses the >> AltGr key to compose special chars like {[]}\|~ >> Why is Lazarus stealing the AltGr key? >> > >Check the key mappings in Lazarus' options. > Nothing to see there (don't even know how the AltGr key would be listed). But now I have tested all threee versions I have on the RPi4 (2.0.2, 2.0.4 and 2.0.6) and all of them do this... So I started my 2.0.4 on the Windows7 laptop (that is where I started the console project), and this does NOT happen there. No tab switching just inserting the correct characters. Also started a text editor on the RPi4 and typed in my commands there to create the special chars. Worked like a charm. No problems there at all. So it seems like Lazarus on Raspbian (maybe also on Debian in general) will hook into the AltGr key and do something unexpected with it. The fact that I am using RealVNC to access the desktop from Windows does not really matter because then it would be a problem also in text editor outside of Lazarus, which it isn't. Right now in RPi4 I have to use a text editor window from which I can copy the needed special chars and paste them into Lazarus since Lazarus itself is unable to handle them correctly... Funny note: If I am on the leftmost tab in Lazarus on RPi4, then I can compose the special chars just fine... So another workaround would be to move the tab holding the file to edit to the leftmost position before editing... -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Sat Nov 2 15:37:23 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sat, 2 Nov 2019 15:37:23 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> Message-ID: <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> On 02/11/2019 14:48, Bo Berglund via lazarus wrote: > > Now it happened again! > I was compiling the program then executing it inside a terminal > (external to Lazarus) and then repeating this to find my bug. > > When I found it I doubleclicked the name of my logging component to > copy its name, but instead instanly Lazarus disappeared! > > I will now revert back to Lazarus 2.0.4 instead. It would be really helpful if you could try to get a trace. (see my last reply) Otherwise this issue may be present for a lot of future versions. From lazarus at mfriebe.de Sat Nov 2 15:42:54 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sat, 2 Nov 2019 15:42:54 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> Message-ID: On 02/11/2019 15:34, Bo Berglund via lazarus wrote: > On Sat, 2 Nov 2019 15:04:15 +0100, Sven Barth via lazarus > wrote: > >> Bo Berglund via lazarus schrieb am Sa., 2. >> Nov. 2019, 14:59: >> >>> If I am in a tab to the right (not the left-most tab) with the cursor >>> anywhere in the code and I want to add say a { character, I need to >>> press AltGr (the right hand Alt key) and the 7 key. This normally >>> results in a { character being output at the cursor. >>> >>> But in Lazarus the focus immediately shifts to a different tab when >>> AltGr is pressed!! >>> How did that happen? All European languages to my knowledge uses the >>> AltGr key to compose special chars like {[]}\|~ >>> Why is Lazarus stealing the AltGr key? >>> >> Check the key mappings in Lazarus' options. >> > Nothing to see there (don't even know how the AltGr key would be > listed). > But now I have tested all threee versions I have on the RPi4 (2.0.2, > 2.0.4 and 2.0.6) and all of them do this... > Alt - n (1-9) is "goto source editor n" (switch to tab n) Why this triggers on altgr for you, I am not sure From bo.berglund at gmail.com Sat Nov 2 16:10:39 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 02 Nov 2019 16:10:39 +0100 Subject: [Lazarus] Lazarus code editor improvement? References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> Message-ID: <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> On Sat, 2 Nov 2019 15:42:54 +0100, Martin Frb via lazarus wrote: >Alt - n (1-9) is "goto source editor n" (switch to tab n) >Why this triggers on altgr for you, I am not sure OK, but then where in Key Mappings do I find it so I can disable it? It is very confusing for me not having used these before. I go to Tools/Options/Editor/Key Mappings And here I find a bewildering number of functions... SourceNotebookCommands/GoToPriorEditor is set to use Ctrl+Shift+Tab And this does exactly what the AltGr key by itself does, except it wraps around from the first tab to the last (rightmost) when used in the leftmost tab. AltGr does not do that, it stops at he leftmost tab. Very confusing.... -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Sat Nov 2 16:29:21 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sat, 2 Nov 2019 16:29:21 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> Message-ID: <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> On 02/11/2019 16:10, Bo Berglund via lazarus wrote: > On Sat, 2 Nov 2019 15:42:54 +0100, Martin Frb via lazarus > wrote: > >> Alt - n (1-9) is "goto source editor n" (switch to tab n) >> Why this triggers on altgr for you, I am not sure > OK, but then where in Key Mappings do I find it so I can disable it? > It is very confusing for me not having used these before. > I go to Tools/Options/Editor/Key Mappings > And here I find a bewildering number of functions... You can search for the name (left filter edit).  Though there is a space "Go to source editor" Or you can search by key (button "Find Key combination") In this case the entries are in "Source Notebook commands" if you look at the main tree nodes. > SourceNotebookCommands/GoToPriorEditor is set to use Ctrl+Shift+Tab > > And this does exactly what the AltGr key by itself does, except it > wraps around from the first tab to the last (rightmost) when used in > the leftmost tab. AltGr does not do that, it stops at he leftmost tab. > I have no idea what your alt-gr key does.... You mention using  RealVNC in another mail. IIRC there were some very strange key effects reported with vnc in the past (no idea if that applies to RealVNC). From distant memory, vnc sends control keys with a timestamp that does not match the interpretation that I would have from the doc of this field.... That said I have no idea if vnc is right or not. There is an argument that it works with other apps, but that is void, because other apps may not use this (timestamp) field at all, and then if it was wrong they would ignore that. Not sure what happened with regards to this entire story. From freedos.la at gmail.com Sat Nov 2 16:34:42 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Sat, 2 Nov 2019 08:34:42 -0700 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> Message-ID: <5bd3b09e-5667-7b3a-d8d0-0ef527d352ac@gmail.com> On 11/2/2019 7:42 AM, Martin Frb via lazarus wrote: > Alt - n (1-9) is "goto source editor n" (switch to tab n) > > Why this triggers on altgr for you, I am not sure I am almost certain that this is an issue with the access VNC, and would not occur on the RPi if you connect a keyboard to it and test it thus directly... Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From pascaldragon at googlemail.com Sat Nov 2 17:29:30 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 2 Nov 2019 17:29:30 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> Message-ID: Martin Frb via lazarus schrieb am Sa., 2. Nov. 2019, 16:29: > You mention using RealVNC in another mail. > > IIRC there were some very strange key effects reported with vnc in the > past (no idea if that applies to RealVNC). > From distant memory, vnc sends control keys with a timestamp that does > not match the interpretation that I would have from the doc of this > field.... That said I have no idea if vnc is right or not. > There is an argument that it works with other apps, but that is void, > because other apps may not use this (timestamp) field at all, and then > if it was wrong they would ignore that. Not sure what happened with > regards to this entire story. > I myself had reported something similar with VNC, so it's indeed likely to be the culprit. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sat Nov 2 17:46:09 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 2 Nov 2019 17:46:09 +0100 (CET) Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> Message-ID: On Sat, 2 Nov 2019, Sven Barth via lazarus wrote: > Martin Frb via lazarus schrieb am Sa., 2. > Nov. 2019, 16:29: > >> You mention using RealVNC in another mail. >> >> IIRC there were some very strange key effects reported with vnc in the >> past (no idea if that applies to RealVNC). >> From distant memory, vnc sends control keys with a timestamp that does >> not match the interpretation that I would have from the doc of this >> field.... That said I have no idea if vnc is right or not. >> There is an argument that it works with other apps, but that is void, >> because other apps may not use this (timestamp) field at all, and then >> if it was wrong they would ignore that. Not sure what happened with >> regards to this entire story. >> > > I myself had reported something similar with VNC, so it's indeed likely to > be the culprit. Yes. I've found Lazarus or any LCL app to be unworkable with VNC :( Michael. From l at c-m-w.me.uk Sat Nov 2 18:21:34 2019 From: l at c-m-w.me.uk (C Western) Date: Sat, 2 Nov 2019 17:21:34 +0000 Subject: [Lazarus] gtk2 font sizes Message-ID: I have just upgraded to Fedora 31, and noticed some odd effects with font sizes. With some investigation the cause seems to be that the underlying font sizes can be a non-integer number of pixels; with a 'MonoSpace' example looking at gtk2widgetset.inc:5919: TextMetric.tmAscent := pango_font_metrics_get_ascent(APangoMetrics) div PANGO_SCALE; evaluates as 11406/1024 = 11.129 which is truncated to 11 TextMetric.tmDescent := pango_font_metrics_get_descent(APangoMetrics) div PANGO_SCALE; evaluates as  2898/1024 = 2.83 which is truncated to 2. The effective font height seems to be 2 pixels larger in this case, ot at least that is what is required to fix previously working code. I wonder if these calculations should be rounded up rather than down? Colin From sysrpl at gmail.com Sat Nov 2 18:41:01 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Sat, 2 Nov 2019 13:41:01 -0400 Subject: [Lazarus] gdb problems on ubtuntu 19.10 In-Reply-To: References: <03225365-2604-2325-5180-5c1f50137be2@mfriebe.de> Message-ID: If anyone wants to follow along with this problem, I've posted a question about it on askubuntu here: https://askubuntu.com/questions/1185729/ubuntu-19-10-gdb-nearly-unusable-long-delay -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Sun Nov 3 08:25:00 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 03 Nov 2019 08:25:00 +0100 Subject: [Lazarus] Lazarus code editor improvement? References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> Message-ID: On Sat, 2 Nov 2019 17:46:09 +0100 (CET), Michael Van Canneyt via lazarus wrote: >> I myself had reported something similar with VNC, so it's indeed likely to >> be the culprit. > >Yes. I've found Lazarus or any LCL app to be unworkable with VNC :( Yes, now that you mention it... I had a similar situation several years ago when I was using TightVNC on the RPi to access Lazarus. At that time nothing at all happened when I tried to enter the characters {[]}\|. So I created a text document with these chars and had it open when I programmed so I could go there and select-and copy the wanted char to be pasted into the editor. If I remember correctly it was ONLY the code editor that ill behaved, if I entered the characters into any other Lazarus window accepting strings as parameter it worked OK. And so it does now as well... For example the search box in Object Inspector is OK with these characters composed using the AltGr key. So now I have connected a monitor to my RPi4 and a spare TV keyboard with a mousepad to the RPi4 as well. When I use this to run a session the problem does not appear any longer... So indeed it is connected with VNC, but it also is connected with Lazarus' code editor window. It seems like this is the only affected window on the RPi, all others accept the composition key AltGr as part of entering a special char. I cannot use the direct connection, though, because I am heavily depending on being able to copy stuff across between the two systems and I also need to have access to my other tools on the Windows computer. So I have to stick with VNC anyway and work around the problem. And back again to Lazarus 2.0.6... -- Bo Berglund Developer in Sweden From lazarus at kluug.net Sun Nov 3 11:21:19 2019 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 3 Nov 2019 11:21:19 +0100 Subject: [Lazarus] Annoying code completion failure In-Reply-To: References: Message-ID: On 02.11.2019 11:23, Michael Van Canneyt via lazarus wrote: > TStrings has a property > >     property Values[const Name: string]: string read GetValue write > SetValue; > > The setter is defined as: > > procedure SetValue(const Name, Value: string); > > Note that both arguments are 'const' > > When adding a new property, and pressing 'CTRL-C', the IDE adds the new > property, but also insists on adding a new SetValue: > > procedure SetValue(const Name: string; AValue: string); > > Note the missing const on the second parameter. > > It does this of course not only for TStrings, but for all such properties. The problem is not the const - Lazarus can ignore it. The problem is that the parameters are joined - that is what Lazarus cannot handle. Replace     procedure SetValue(const Name, Value: string); with     procedure SetValue(const Name: string; const Value: string); then Lazarus won't add it every time you do class completion. I know - it's not what you currently have in the interface, but the difference is just cosmetic. I usually let Lazarus do its job and don't care that the parameters are separated. Furthermore, you can make Lazarus to add the "const" automatically in IDE options -> Codetools -> Class Completion -> Property completion -> use const. You can also define an own parameter name or prefix (I use a prefix). Ondrej From lazarus at mfriebe.de Sun Nov 3 12:07:28 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 3 Nov 2019 12:07:28 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> Message-ID: <6170b5b5-2e47-8895-5958-f2e2d5e79618@mfriebe.de> On 03/11/2019 08:25, Bo Berglund via lazarus wrote: > On Sat, 2 Nov 2019 17:46:09 +0100 (CET), Michael Van Canneyt via > lazarus wrote: > >>> I myself had reported something similar with VNC, so it's indeed likely to >>> be the culprit. >> Yes. I've found Lazarus or any LCL app to be unworkable with VNC :( > And so it does now as well... > For example the search box in Object Inspector is OK with these > characters composed using the AltGr key. > Native controls (edit/memo) may not be affected. But anything that relies on LCL for keyhandling is. You could write some editor macros, and assign them to keys that work. ecChar('{'); From Special at Joepgen.com Sun Nov 3 13:31:21 2019 From: Special at Joepgen.com (Joe) Date: Sun, 3 Nov 2019 13:31:21 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> Message-ID: <7cc30530-ec0a-792f-402c-d4a99fa4e845@Joepgen.com> Am 03.11.2019 um 08:25 schrieb Bo Berglund via lazarus: > On Sat, 2 Nov 2019 17:46:09 +0100 (CET), Michael Van Canneyt via > lazarus wrote: > >>> I myself had reported something similar with VNC, so it's indeed likely to >>> be the culprit. >> Yes. I've found Lazarus or any LCL app to be unworkable with VNC :( > Yes, now that you mention it... > I had a similar situation several years ago when I was using TightVNC > on the RPi to access Lazarus. At that time nothing at all happened > when I tried to enter the characters {[]}\|. > > So I created a text document with these chars and had it open when I > programmed so I could go there and select-and copy the wanted char to > be pasted into the editor. > If I remember correctly it was ONLY the code editor that ill behaved, > if I entered the characters into any other Lazarus window accepting > strings as parameter it worked OK. > > And so it does now as well... > For example the search box in Object Inspector is OK with these > characters composed using the AltGr key. > > So now I have connected a monitor to my RPi4 and a spare TV keyboard > with a mousepad to the RPi4 as well. When I use this to run a session > the problem does not appear any longer... > > So indeed it is connected with VNC, but it also is connected with > Lazarus' code editor window. It seems like this is the only affected > window on the RPi, all others accept the composition key AltGr as part > of entering a special char. > > I cannot use the direct connection, though, because I am heavily > depending on being able to copy stuff across between the two systems > and I also need to have access to my other tools on the Windows > computer. So I have to stick with VNC anyway and work around the > problem. > > And back again to Lazarus 2.0.6... > > Please look at  issue 0030544 on https://bugs.freepascal.org. If I remember correctly, Mattias eventually found the reason and fixed it. Don't know why the problerm rearises... From pascaldragon at googlemail.com Sun Nov 3 17:49:28 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 3 Nov 2019 17:49:28 +0100 Subject: [Lazarus] Annoying code completion failure In-Reply-To: References: Message-ID: Ondrej Pokorny via lazarus schrieb am So., 3. Nov. 2019, 11:21: > On 02.11.2019 11:23, Michael Van Canneyt via lazarus wrote: > > TStrings has a property > > > > property Values[const Name: string]: string read GetValue write > > SetValue; > > > > The setter is defined as: > > > > procedure SetValue(const Name, Value: string); > > > > Note that both arguments are 'const' > > > > When adding a new property, and pressing 'CTRL-C', the IDE adds the new > > property, but also insists on adding a new SetValue: > > > > procedure SetValue(const Name: string; AValue: string); > > > > Note the missing const on the second parameter. > > > > It does this of course not only for TStrings, but for all such > properties. > > The problem is not the const - Lazarus can ignore it. The problem is > that the parameters are joined - that is what Lazarus cannot handle. > > Replace > procedure SetValue(const Name, Value: string); > with > procedure SetValue(const Name: string; const Value: string); > > then Lazarus won't add it every time you do class completion. I know - > it's not what you currently have in the interface, but the difference is > just cosmetic. I usually let Lazarus do its job and don't care that the > parameters are separated. > This is not what one wants to hear. Lazarus really likes to mess with existing code and it's one of the main reasons I'm *not* using class completion inside the compiler, cause otherwise I can be sure that the whole remaining class is changed as well -.- Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Sun Nov 3 21:04:37 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 3 Nov 2019 22:04:37 +0200 Subject: [Lazarus] Size, bounds and style of a Form Message-ID: Regarding issue: https://bugs.freepascal.org/view.php?id=36127 "TForm's bounds and restored bounds are inconsistent" I have applied 2 patches by Joeny Ang already some time ago. No complaints so far, thus I am hopefull there are no regressions caused by them. The issue have many related issues. Could somebody please test if those issues got fixed together with this one. Regards, Juha From lazarus at kluug.net Sun Nov 3 23:15:35 2019 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 3 Nov 2019 23:15:35 +0100 Subject: [Lazarus] Annoying code completion failure In-Reply-To: References: Message-ID: <4db42264-f921-61d7-1aa1-f898ce4f8b31@kluug.net> On 03.11.2019 17:49, Sven Barth via lazarus wrote: > Ondrej Pokorny via lazarus > schrieb am So., 3. Nov. 2019, > 11:21: > > On 02.11.2019 11:23, Michael Van Canneyt via lazarus wrote: > > TStrings has a property > > > >     property Values[const Name: string]: string read GetValue write > > SetValue; > > > > The setter is defined as: > > > > procedure SetValue(const Name, Value: string); > > > > Note that both arguments are 'const' > > > > When adding a new property, and pressing 'CTRL-C', the IDE adds > the new > > property, but also insists on adding a new SetValue: > > > > procedure SetValue(const Name: string; AValue: string); > > > > Note the missing const on the second parameter. > > > > It does this of course not only for TStrings, but for all such > properties. > > The problem is not the const - Lazarus can ignore it. The problem is > that the parameters are joined - that is what Lazarus cannot handle. > > Replace >      procedure SetValue(const Name, Value: string); > with >      procedure SetValue(const Name: string; const Value: string); > > then Lazarus won't add it every time you do class completion. I > know - > it's not what you currently have in the interface, but the > difference is > just cosmetic. I usually let Lazarus do its job and don't care > that the > parameters are separated. > > > This is not what one wants to hear. Well, I just explained the current state. It doesn't mean it cannot be improved. > Lazarus really likes to mess with existing code and it's one of the > main reasons I'm *not* using class completion inside the compiler, > cause otherwise I can be sure that the whole remaining class is > changed as well -.- To be honest, the compiler code style is very quirky :) Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Sun Nov 3 23:31:33 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 3 Nov 2019 23:31:33 +0100 Subject: [Lazarus] Annoying code completion failure In-Reply-To: <4db42264-f921-61d7-1aa1-f898ce4f8b31@kluug.net> References: <4db42264-f921-61d7-1aa1-f898ce4f8b31@kluug.net> Message-ID: Ondrej Pokorny via lazarus schrieb am So., 3. Nov. 2019, 23:15: > > On 03.11.2019 17:49, Sven Barth via lazarus wrote: > > Ondrej Pokorny via lazarus schrieb am > So., 3. Nov. 2019, 11:21: > >> On 02.11.2019 11:23, Michael Van Canneyt via lazarus wrote: >> > TStrings has a property >> > >> > property Values[const Name: string]: string read GetValue write >> > SetValue; >> > >> > The setter is defined as: >> > >> > procedure SetValue(const Name, Value: string); >> > >> > Note that both arguments are 'const' >> > >> > When adding a new property, and pressing 'CTRL-C', the IDE adds the new >> > property, but also insists on adding a new SetValue: >> > >> > procedure SetValue(const Name: string; AValue: string); >> > >> > Note the missing const on the second parameter. >> > >> > It does this of course not only for TStrings, but for all such >> properties. >> >> The problem is not the const - Lazarus can ignore it. The problem is >> that the parameters are joined - that is what Lazarus cannot handle. >> >> Replace >> procedure SetValue(const Name, Value: string); >> with >> procedure SetValue(const Name: string; const Value: string); >> >> then Lazarus won't add it every time you do class completion. I know - >> it's not what you currently have in the interface, but the difference is >> just cosmetic. I usually let Lazarus do its job and don't care that the >> parameters are separated. >> > > This is not what one wants to hear. > > Well, I just explained the current state. It doesn't mean it cannot be > improved. > Maybe Michael should file a bug report then... (and I should collect my annoyances as well :P) > > Lazarus really likes to mess with existing code and it's one of the main > reasons I'm *not* using class completion inside the compiler, cause > otherwise I can be sure that the whole remaining class is changed as well > -.- > > To be honest, the compiler code style is very quirky :) > > Ondrej > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Sun Nov 3 23:32:49 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 3 Nov 2019 23:32:49 +0100 Subject: [Lazarus] Annoying code completion failure In-Reply-To: <4db42264-f921-61d7-1aa1-f898ce4f8b31@kluug.net> References: <4db42264-f921-61d7-1aa1-f898ce4f8b31@kluug.net> Message-ID: Ondrej Pokorny via lazarus schrieb am So., 3. Nov. 2019, 23:15: > > On 03.11.2019 17:49, Sven Barth via lazarus wrote: > > Ondrej Pokorny via lazarus schrieb am > So., 3. Nov. 2019, 11:21: > >> On 02.11.2019 11:23, Michael Van Canneyt via lazarus wrote: >> > TStrings has a property >> > >> > property Values[const Name: string]: string read GetValue write >> > SetValue; >> > >> > The setter is defined as: >> > >> > procedure SetValue(const Name, Value: string); >> > >> > Note that both arguments are 'const' >> > >> > When adding a new property, and pressing 'CTRL-C', the IDE adds the new >> > property, but also insists on adding a new SetValue: >> > >> > procedure SetValue(const Name: string; AValue: string); >> > >> > Note the missing const on the second parameter. >> > >> > It does this of course not only for TStrings, but for all such >> properties. >> >> The problem is not the const - Lazarus can ignore it. The problem is >> that the parameters are joined - that is what Lazarus cannot handle. >> >> Replace >> procedure SetValue(const Name, Value: string); >> with >> procedure SetValue(const Name: string; const Value: string); >> >> then Lazarus won't add it every time you do class completion. I know - >> it's not what you currently have in the interface, but the difference is >> just cosmetic. I usually let Lazarus do its job and don't care that the >> parameters are separated. >> > > This is not what one wants to hear. > > Well, I just explained the current state. It doesn't mean it cannot be > improved. > > > Lazarus really likes to mess with existing code and it's one of the main > reasons I'm *not* using class completion inside the compiler, cause > otherwise I can be sure that the whole remaining class is changed as well > -.- > > To be honest, the compiler code style is very quirky :) > Pressed "Send" too soon -.- I won't argue that point. Nevertheless the IDE should not generate more work :P Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From freedos.la at gmail.com Mon Nov 4 02:40:44 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Sun, 3 Nov 2019 17:40:44 -0800 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: <7cc30530-ec0a-792f-402c-d4a99fa4e845@Joepgen.com> References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> <7cc30530-ec0a-792f-402c-d4a99fa4e845@Joepgen.com> Message-ID: <9c486f36-6f9d-566c-8770-f9431122c2d6@gmail.com> On 11/3/2019 4:31 AM, Joe via lazarus wrote: > > Please look at  issue 0030544 on https://bugs.freepascal.org. If I > remember correctly, Mattias eventually found the reason and fixed it. > Don't know why the problerm rearises... Going by the description (and interception of keycodes with and with out VNC), it seems to be pretty clear that this seems to be an issue related to VNC rather to Lazarus, so I am not sure what you could possibly fix, beside maybe a single fringe case... :-\ I have seen similar, kind of random issues when using RealVNC on the client (like when using it on my Mac) rather than TightVNC, which I use for various reasons (like the file transfer option) on all my Windows machines. Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From lazarus at kluug.net Mon Nov 4 06:18:16 2019 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 4 Nov 2019 06:18:16 +0100 Subject: [Lazarus] Annoying code completion failure In-Reply-To: References: <4db42264-f921-61d7-1aa1-f898ce4f8b31@kluug.net> Message-ID: <21529fcb-f68a-592b-85fb-165c3c186191@kluug.net> On 03.11.2019 23:31, Sven Barth via lazarus wrote: > Maybe Michael should file a bug report then... (and I should collect > my annoyances as well :P) Yes, that is definitely a good idea. I face myself 1-2 annoyances as well that I haven't fixed yet. Ondrej From juha.manninen62 at gmail.com Mon Nov 4 08:07:26 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 4 Nov 2019 09:07:26 +0200 Subject: [Lazarus] Annoying code completion failure In-Reply-To: <21529fcb-f68a-592b-85fb-165c3c186191@kluug.net> References: <4db42264-f921-61d7-1aa1-f898ce4f8b31@kluug.net> <21529fcb-f68a-592b-85fb-165c3c186191@kluug.net> Message-ID: On Mon, Nov 4, 2019 at 7:18 AM Ondrej Pokorny via lazarus wrote: > On 03.11.2019 23:31, Sven Barth via lazarus wrote: > > Maybe Michael should file a bug report then... (and I should collect > > my annoyances as well :P) > > Yes, that is definitely a good idea. I face myself 1-2 annoyances as > well that I haven't fixed yet. These are related: https://bugs.freepascal.org/view.php?id=35413 https://bugs.freepascal.org/view.php?id=23324 https://bugs.freepascal.org/view.php?id=31299 and maybe this one: https://bugs.freepascal.org/view.php?id=17216 Regards, Juha From marc at dommelstein.nl Mon Nov 4 11:48:10 2019 From: marc at dommelstein.nl (Marc Weustink) Date: Mon, 4 Nov 2019 11:48:10 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> Message-ID: <3a0ad6a3-825c-1b54-d108-dce161c3ad37@dommelstein.nl> Bo Berglund via lazarus wrote: > On Sat, 2 Nov 2019 15:42:54 +0100, Martin Frb via lazarus > wrote: > >> Alt - n (1-9) is "goto source editor n" (switch to tab n) >> Why this triggers on altgr for you, I am not sure > > OK, but then where in Key Mappings do I find it so I can disable it? > It is very confusing for me not having used these before. > I go to Tools/Options/Editor/Key Mappings > And here I find a bewildering number of functions... > > SourceNotebookCommands/GoToPriorEditor is set to use Ctrl+Shift+Tab > > And this does exactly what the AltGr key by itself does, except it > wraps around from the first tab to the last (rightmost) when used in > the leftmost tab. AltGr does not do that, it stops at he leftmost tab. > > Very confusing.... > It is. The Ctrl+Shift is (on windows) a alternative key combo for AltGr, meant for keyboards without AltGr. So if, what I read further on this thread, use some remoting tools, it can be that the AltGr is translated to Ctrl+Shift by those tools. Marc From Jean.Suzineau at wanadoo.fr Mon Nov 4 17:21:26 2019 From: Jean.Suzineau at wanadoo.fr (Jean SUZINEAU) Date: Mon, 4 Nov 2019 17:21:26 +0100 Subject: [Lazarus] Lazarus code editor improvement? In-Reply-To: References: <81lqrelmv9khkgfo1pfi3svf7tpqqk4hhh@4ax.com> <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> Message-ID: Le 03/11/2019 à 08:25, Bo Berglund via lazarus a écrit : > > I cannot use the direct connection, though, because I am heavily > depending on being able to copy stuff across between the two systems > and I also need to have access to my other tools on the Windows > computer. So I have to stick with VNC anyway and work around the > problem. Did you try to use X11 forwarding ? You need to install something like XMing ( http://www.straightrunning.com/XmingNotes/ ), a X Window server running on Windows, and connect to the Raspberry Pi with a PuTTY connexion with X11 Forwarding enabled. I use it sometimes to access my Ubuntu machine from a Windows 10 machine. (in PuTTY: Connection/SSH/X11, enable X11 forwarding, X Display location localhost:0.0, Remote X11 authentication protocol: MIT-Magic-cookie) From nc-gaertnma at netcologne.de Tue Nov 5 18:45:45 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 5 Nov 2019 18:45:45 +0100 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina Message-ID: <20191105184545.4520a091@limapholos.matflo.wg> Hi, I uploaded macOS x86_64 packages for fpc 3.0.4, fpc-src and Lazarus. https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64 They are built using "bigide" minus package editormacroscript. I did not sign them. Please test and tell me if they work. Mattias From freedos.la at gmail.com Tue Nov 5 22:36:35 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Tue, 5 Nov 2019 13:36:35 -0800 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <20191105184545.4520a091@limapholos.matflo.wg> References: <20191105184545.4520a091@limapholos.matflo.wg> Message-ID: <8efbacda-fca2-77fa-24c2-bf7aa76b2714@gmail.com> On 11/5/2019 9:45 AM, Mattias Gaertner via lazarus wrote: > Hi, > > I uploaded macOS x86_64 packages for fpc 3.0.4, fpc-src and Lazarus. > https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64 > > They are built using "bigide" minus package editormacroscript. > > I did not sign them. > > Please test and tell me if they work. I just tried to install them on my Macbook Pro running High Sierra (10.13.6). Source installed fine (not surprised here) but the compiler package failed. Not sure if this means it isn't backwards compatible anymore or if there could be another issue at play. I have a seemingly working version of Lazarus 2.0.2 already installed... Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From nc-gaertnma at netcologne.de Tue Nov 5 22:56:55 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 5 Nov 2019 22:56:55 +0100 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <8efbacda-fca2-77fa-24c2-bf7aa76b2714@gmail.com> References: <20191105184545.4520a091@limapholos.matflo.wg> <8efbacda-fca2-77fa-24c2-bf7aa76b2714@gmail.com> Message-ID: <20191105225655.5b27e0c2@limapholos.matflo.wg> On Tue, 5 Nov 2019 13:36:35 -0800 Ralf Quint via lazarus wrote: > On 11/5/2019 9:45 AM, Mattias Gaertner via lazarus wrote: > > Hi, > > > > I uploaded macOS x86_64 packages for fpc 3.0.4, fpc-src and Lazarus. > > https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64 > > > > They are built using "bigide" minus package editormacroscript. > > > > I did not sign them. > > > > Please test and tell me if they work. > > I just tried to install them on my Macbook Pro running High Sierra > (10.13.6). Source installed fine (not surprised here) but the > compiler package failed. Any error message? > Not sure if this means it isn't backwards > compatible anymore or if there could be another issue at play. I have > a seemingly working version of Lazarus 2.0.2 already installed... Mattias From anthony at unihedron.com Tue Nov 5 23:00:35 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Tue, 5 Nov 2019 17:00:35 -0500 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <20191105184545.4520a091@limapholos.matflo.wg> References: <20191105184545.4520a091@limapholos.matflo.wg> Message-ID: <20191105170035.5ee5c460@pino.pino.basement> On Tue, 5 Nov 2019 18:45:45 +0100, Mattias Gaertner via lazarus wrote: > Please test and tell me if they work. fpc-src-3.0.4-laz.pkg installation was successful. fpc-3.0.4-macosx-x86_64.pkg complained at the end/summary: The installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. From freedos.la at gmail.com Wed Nov 6 17:37:09 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Wed, 6 Nov 2019 08:37:09 -0800 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <20191105170035.5ee5c460@pino.pino.basement> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> Message-ID: <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> On 11/5/2019 2:00 PM, Anthony Tekatch via lazarus wrote: > On Tue, 5 Nov 2019 18:45:45 +0100, Mattias Gaertner via lazarus wrote: >> Please test and tell me if they work. > fpc-src-3.0.4-laz.pkg installation was successful. > > fpc-3.0.4-macosx-x86_64.pkg complained at the end/summary: > The installation failed. The installer encountered an error that caused > the installation to fail. Contact the software manufacturer for > assistance. Yup. that's it. Not much of a more descriptive "message" that would give a better hint as to why... :( Probably just like Anthony, I didn't bother to try and install the Lazarus package after that. So far, my 2.0.2 version seems to still work. Could it be that it is a 32bit Carbon version? Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From nc-gaertnma at netcologne.de Wed Nov 6 18:44:33 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 6 Nov 2019 18:44:33 +0100 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> Message-ID: <20191106184433.67c2e2d8@limapholos.matflo.wg> On Wed, 6 Nov 2019 08:37:09 -0800 Ralf Quint via lazarus wrote: > On 11/5/2019 2:00 PM, Anthony Tekatch via lazarus wrote: > > On Tue, 5 Nov 2019 18:45:45 +0100, Mattias Gaertner via lazarus > > wrote: > >> Please test and tell me if they work. > > fpc-src-3.0.4-laz.pkg installation was successful. > > > > fpc-3.0.4-macosx-x86_64.pkg complained at the end/summary: > > The installation failed. The installer encountered an error that > > caused the installation to fail. Contact the software manufacturer > > for assistance. > > Yup. that's it. Not much of a more descriptive "message" that would > give a better hint as to why... :( > > Probably just like Anthony, I didn't bother to try and install the > Lazarus package after that. > > So far, my 2.0.2 version seems to still work. Could it be that it is > a 32bit Carbon version? The fpc-3.0.4-macosx-x86_64.pkg only contains the ppcx64, no 32bit or jvm compiler. Mattias From freedos.la at gmail.com Wed Nov 6 21:25:30 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Wed, 6 Nov 2019 12:25:30 -0800 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <20191106184433.67c2e2d8@limapholos.matflo.wg> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> <20191106184433.67c2e2d8@limapholos.matflo.wg> Message-ID: <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> On 11/6/2019 9:44 AM, Mattias Gaertner via lazarus wrote: > On Wed, 6 Nov 2019 08:37:09 -0800 > Ralf Quint via lazarus wrote: > >> On 11/5/2019 2:00 PM, Anthony Tekatch via lazarus wrote: >>> On Tue, 5 Nov 2019 18:45:45 +0100, Mattias Gaertner via lazarus >>> wrote: >>>> Please test and tell me if they work. >>> fpc-src-3.0.4-laz.pkg installation was successful. >>> >>> fpc-3.0.4-macosx-x86_64.pkg complained at the end/summary: >>> The installation failed. The installer encountered an error that >>> caused the installation to fail. Contact the software manufacturer >>> for assistance. >> Yup. that's it. Not much of a more descriptive "message" that would >> give a better hint as to why... :( >> >> Probably just like Anthony, I didn't bother to try and install the >> Lazarus package after that. >> >> So far, my 2.0.2 version seems to still work. Could it be that it is >> a 32bit Carbon version? > The fpc-3.0.4-macosx-x86_64.pkg only contains the ppcx64, no 32bit or > jvm compiler. > > Mattias Ok, that means that so far, nothing has been messed up. Which is great as I just got to start a project that has the largest user base among Mac users. Still wondering however what the problem could be to install the 64bit compiler, it seems that Anthony could reproduce the issue. Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From anthony at unihedron.com Wed Nov 6 22:02:18 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Wed, 6 Nov 2019 16:02:18 -0500 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> <20191106184433.67c2e2d8@limapholos.matflo.wg> <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> Message-ID: <20191106160218.3bd313eb@pino.pino.basement> On Wed, 6 Nov 2019 12:25:30 -0800, Ralf Quint via lazarus wrote: > Still wondering however what the problem could be to install the 64bit > compiler, it seems that Anthony could reproduce the issue. Yes, I can reproduce the error consistently. Hopefully this excerpt from /var/log/install.log will shed some light on the cause: 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: @(#)PROGRAM:Install PROJECT:Install-1000 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: @(#)PROGRAM:Installer PROJECT:Installer-965.1 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Hardware: Macmini8,1 @ 3.60 GHz (x 4), 8192 MB RAM 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Running OS Build: Mac OS X 10.15.1 (19B88) 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: USER=anthony 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: LOGNAME=anthony 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.iUvo4ep2r7/Listeners 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: HOME=/Users/anthony 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: SHELL=/bin/bash 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x52 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: TMPDIR=/var/folders/y8/b7s30t450lnf21lm2dcqzd7m0000gn/T/ 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: XPC_SERVICE_NAME=com.apple.installer.1092 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Env: XPC_FLAGS=0x0 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: fpc-macos-x86-64-laz Installation Log 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Opened from: /Users/anthony/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Package Authoring Error: has an unsupported MIME type: X-NSObject/NSNumber 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Package Authoring Error: has an unsupported MIME type: X-NSObject/NSNumber 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Package Authoring Error: has an unsupported MIME type: X-NSObject/NSNumber 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Failed to load specified background image 2019-11-06 15:55:35-05 Anthonys-Mac-mini Installer[11196]: Product archive /Users/anthony/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg trustLevel=100 2019-11-06 15:55:35-05 Anthonys-Mac-mini Installer[11196]: External component packages (1) trustLevel=100 (trust evaluation failed: Error Domain=PKInstallErrorDomain Code=101 "The package “fpc-3.0.4-macos-x86_64-laz.pkg” is not signed." UserInfo={NSURL=#fpc-macos-x86-64-laz.pkg -- file:///Users/anthony/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#Distribution, PKInstallPackageIdentifier=org.freepascal.pkg.fpc-macos-x86-64-laz, NSLocalizedDescription=The package “fpc-3.0.4-macos-x86_64-laz.pkg” is not signed.}) 2019-11-06 15:55:35-05 Anthonys-Mac-mini Installer[11196]: Could not load resource readme: (null) 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: Administrator authorization granted. 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: ================================================================================ 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: User picked Standard Install 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: Choices selected for installation: 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: Install: "fpc-macos-x86-64-laz" 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: Install: "fpc-macos-x86-64-laz" 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg : org.freepascal.pkg.fpc-macos-x86-64-laz : 3.0.4 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: ================================================================================ 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: It took 0.00 seconds to summarize the package selections. 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: file://localhost/Users/anthony/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: Set authorization level to root for session 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: Will use PK session 2019-11-06 15:55:43-05 Anthonys-Mac-mini Installer[11196]: Using authorization level of root for IFPKInstallElement 2019-11-06 15:55:44-05 Anthonys-Mac-mini Installer[11196]: Starting installation: 2019-11-06 15:55:44-05 Anthonys-Mac-mini Installer[11196]: Configuring volume "Macintosh HD" 2019-11-06 15:55:44-05 Anthonys-Mac-mini Installer[11196]: Preparing disk for local booted install. 2019-11-06 15:55:44-05 Anthonys-Mac-mini Installer[11196]: Free space on "Macintosh HD": 68.08 GB (68076412928 bytes). 2019-11-06 15:55:44-05 Anthonys-Mac-mini Installer[11196]: Create temporary directory "/var/folders/y8/b7s30t450lnf21lm2dcqzd7m0000gn/T//Install.11196HnqAd5" 2019-11-06 15:55:44-05 Anthonys-Mac-mini Installer[11196]: IFPKInstallElement (1 packages) 2019-11-06 15:55:44-05 Anthonys-Mac-mini installd[637]: PackageKit: Adding client PKInstallDaemonClient pid=11196, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer) 2019-11-06 15:55:44-05 Anthonys-Mac-mini Installer[11196]: PackageKit: Enqueuing install with framework-specified quality of service (utility) 2019-11-06 15:55:44-05 Anthonys-Mac-mini installd[637]: PackageKit: ----- Begin install ----- 2019-11-06 15:55:44-05 Anthonys-Mac-mini installd[637]: PackageKit: request=PKInstallRequest <1 packages, destination=/> 2019-11-06 15:55:44-05 Anthonys-Mac-mini installd[637]: PackageKit: packages=( "" ) 2019-11-06 15:55:44-05 Anthonys-Mac-mini installd[637]: PackageKit: Set reponsibility for install to 11196 2019-11-06 15:55:44-05 Anthonys-Mac-mini installd[637]: PackageKit: Extracting file:///Users/anthony/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/2757E882-752E-4EA2-822F-BEF51E4A3E5F.activeSandbox/Root, uid=0) 2019-11-06 15:55:46-05 Anthonys-Mac-mini installd[637]: PackageKit: prevent user idle system sleep 2019-11-06 15:55:46-05 Anthonys-Mac-mini installd[637]: PackageKit: suspending backupd 2019-11-06 15:55:46-05 Anthonys-Mac-mini installd[637]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.MDJZkJ/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.KNvm9D 2019-11-06 15:55:46-05 Anthonys-Mac-mini install_monitor[11199]: Temporarily excluding: /Applications, /Library, /System, /bin, /private, /sbin, /usr 2019-11-06 15:55:46-05 Anthonys-Mac-mini installd[637]: PackageKit: Using trashcan path /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/PKInstallSandboxTrash/2757E882-752E-4EA2-822F-BEF51E4A3E5F.sandboxTrash for sandbox /Library/InstallerSandboxes/.PKInstallSandboxManager/2757E882-752E-4EA2-822F-BEF51E4A3E5F.activeSandbox 2019-11-06 15:55:46-05 Anthonys-Mac-mini installd[637]: PackageKit: Shoving /Library/InstallerSandboxes/.PKInstallSandboxManager/2757E882-752E-4EA2-822F-BEF51E4A3E5F.activeSandbox/Root (1 items) to / 2019-11-06 15:55:47-05 Anthonys-Mac-mini installd[637]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.MDJZkJ/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.KNvm9D 2019-11-06 15:55:47-05 Anthonys-Mac-mini installd[637]: ./postinstall: Running on darwin 2019-11-06 15:55:47-05 Anthonys-Mac-mini installd[637]: ./postinstall: Write permission in //etc. 2019-11-06 15:55:47-05 Anthonys-Mac-mini installd[637]: ./postinstall: Writing sample configuration file to //etc/fpc.cfg 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: Saved old "fpc.cfg" to "fpc.bak" 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: Writing sample configuration file to //etc/fppkg.cfg 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: Saved old "fppkg.cfg" to "fppkg.bak" 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: Writing sample configuration file to //etc/fppkg/default 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: Saved old "default" to "default.bak" 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: /tmp/PKInstallSandbox.MDJZkJ/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.KNvm9D/postinstall: line 13: ///usr/local/lib/fpc/3.0.4/ide/text/fp.cfg.tmp: No such file or directory 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: cat: ///usr/local/lib/fpc/3.0.4/ide/text/fp.cfg: No such file or directory 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: /tmp/PKInstallSandbox.MDJZkJ/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.KNvm9D/postinstall: line 14: ///usr/local/lib/fpc/3.0.4/ide/text/fp.cfg: No such file or directory 2019-11-06 15:55:48-05 Anthonys-Mac-mini installd[637]: ./postinstall: rm: ///usr/local/lib/fpc/3.0.4/ide/text/fp.cfg.tmp: No such file or directory 2019-11-06 15:55:48-05 Anthonys-Mac-mini install_monitor[11199]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr 2019-11-06 15:55:49-05 Anthonys-Mac-mini installd[637]: PackageKit: releasing backupd 2019-11-06 15:55:49-05 Anthonys-Mac-mini installd[637]: PackageKit: allow user idle system sleep 2019-11-06 15:55:49-05 Anthonys-Mac-mini installd[637]: PackageKit: Cleared responsibility for install from 11196. 2019-11-06 15:55:49-05 Anthonys-Mac-mini installd[637]: PackageKit: Cleared permissions on Installer.app 2019-11-06 15:55:49-05 Anthonys-Mac-mini installd[637]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “fpc-3.0.4-macos-x86_64-laz.pkg”." UserInfo={NSFilePath=./postinstall, NSURL=file:///Users/anthony/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg, PKInstallPackageIdentifier=org.freepascal.pkg.fpc-macos-x86-64-laz, NSLocalizedDescription=An error occurred while running scripts from the package “fpc-3.0.4-macos-x86_64-laz.pkg”.} { NSFilePath = "./postinstall"; NSLocalizedDescription = "An error occurred while running scripts from the package \U201cfpc-3.0.4-macos-x86_64-laz.pkg\U201d."; NSURL = "file:///Users/anthony/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg"; PKInstallPackageIdentifier = "org.freepascal.pkg.fpc-macos-x86-64-laz"; } 2019-11-06 15:55:49-05 Anthonys-Mac-mini installd[637]: PackageKit: Running idle tasks 2019-11-06 15:55:49-05 Anthonys-Mac-mini Installer[11196]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “fpc-3.0.4-macos-x86_64-laz.pkg”." UserInfo={NSFilePath=./postinstall, NSURL=file:///Users/anthony/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg, PKInstallPackageIdentifier=org.freepascal.pkg.fpc-macos-x86-64-laz, NSLocalizedDescription=An error occurred while running scripts from the package “fpc-3.0.4-macos-x86_64-laz.pkg”.} 2019-11-06 15:55:49-05 Anthonys-Mac-mini installd[637]: PackageKit: Removing client PKInstallDaemonClient pid=11196, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer) 2019-11-06 15:55:49-05 Anthonys-Mac-mini installd[637]: PackageKit: Done with sandbox removals 2019-11-06 15:55:49-05 Anthonys-Mac-mini Installer[11196]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. 2019-11-06 15:55:49-05 Anthonys-Mac-mini Installer[11196]: IFDInstallController 2738BE0 state = 8 2019-11-06 15:55:49-05 Anthonys-Mac-mini Installer[11196]: Displaying 'Install Failed' UI. 2019-11-06 15:55:49-05 Anthonys-Mac-mini Installer[11196]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'. 2019-11-06 15:55:52-05 Anthonys-Mac-mini Installer[11196]: Package Removal: User opted to keep package. From freedos.la at gmail.com Thu Nov 7 06:58:48 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Wed, 6 Nov 2019 21:58:48 -0800 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <20191106160218.3bd313eb@pino.pino.basement> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> <20191106184433.67c2e2d8@limapholos.matflo.wg> <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> <20191106160218.3bd313eb@pino.pino.basement> Message-ID: <30b6fb6f-8232-e8ea-9e8d-197c3064cc3d@gmail.com> On 11/6/2019 1:02 PM, Anthony Tekatch via lazarus wrote: > On Wed, 6 Nov 2019 12:25:30 -0800, Ralf Quint via lazarus wrote: >> Still wondering however what the problem could be to install the 64bit >> compiler, it seems that Anthony could reproduce the issue. > Yes, I can reproduce the error consistently. Hopefully this excerpt > from /var/log/install.log will shed some light on the cause: > > 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: @(#)PROGRAM:Install PROJECT:Install-1000 > 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: @(#)PROGRAM:Installer PROJECT:Installer-965.1 > 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]: Hardware: Macmini8,1 @ 3.60 GHz (x 4), 8192 MB RAM > 2019-11-06 15:55:34-05 Anthonys-Mac-mini Installer[11196]:*Running OS Build: Mac OS X 10.15.1 (19B88)* But according to *this*, you are actually running on Catalina, not High Sierra... :-\ Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony at unihedron.com Thu Nov 7 11:03:43 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Thu, 7 Nov 2019 05:03:43 -0500 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <30b6fb6f-8232-e8ea-9e8d-197c3064cc3d@gmail.com> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> <20191106184433.67c2e2d8@limapholos.matflo.wg> <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> <20191106160218.3bd313eb@pino.pino.basement> <30b6fb6f-8232-e8ea-9e8d-197c3064cc3d@gmail.com> Message-ID: <20191107050343.0436029a@pino.pino.basement> On Wed, 6 Nov 2019 21:58:48 -0800, Ralf Quint via lazarus wrote: > But according to *this*, you are actually running on Catalina, not High > Sierra... :-\ Yes, I am running on Catalina like Mattias suggested to test his changes on. I should have replied to his message rather than the last message in the thread. Either way, the "Lazarus 2.0.6 macOS Catalina" pkg did not work on my Catalina system. From nc-gaertnma at netcologne.de Thu Nov 7 21:24:13 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 7 Nov 2019 21:24:13 +0100 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <20191106160218.3bd313eb@pino.pino.basement> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> <20191106184433.67c2e2d8@limapholos.matflo.wg> <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> <20191106160218.3bd313eb@pino.pino.basement> Message-ID: <20191107212413.3dab0cf3@limapholos.matflo.wg> On Wed, 6 Nov 2019 16:02:18 -0500 Anthony Tekatch via lazarus wrote: > 2019-11-06 15:55:48-05 Anthonys-Mac-mini > installd[637]: ./postinstall: /tmp/PKInstallSandbox.MDJZkJ/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.KNvm9D/postinstall: > line 13: ///usr/local/lib/fpc/3.0.4/ide/text/fp.cfg.tmp: No such file > or directory Thanks for testing. The fpc ide folder was missing. I uploaded the fixed version to sourceforge. Keep in mind that according to sf it might take up to 24h until all sf mirrors are updated. The new file has 51136547 bytes. Checksums: md5sums: f69ec2e92d5a2e67d77cb00c7386bed4 fpc-3.0.4-macos-x86_64-laz.pkg eb53fe2765e7a1a57d2217b32b62c0c1 fpc-src-3.0.4-macosx.dmg 9926419ef34f4ba9fa5f883f60234ebd LazarusIDE-2.0.6-macos-x86_64.pkg sha1sum: c5c24ac5cf6335705677a3637a6eefeddc85a2f3 fpc-3.0.4-macos-x86_64-laz.pkg 0c74cc4631160dc5925db0b473ea3d6787776b44 fpc-src-3.0.4-macosx.dmg 0ae1fd315153201df2c647d94c6a001ee5cb449d LazarusIDE-2.0.6-macos-x86_64.pkg sha256sum: f87f5b365f9d10aa2e21abc4788753a9248dcf43ff30798ea6bfd4b313dbd869 fpc-3.0.4-macos-x86_64-laz.pkg f52c5da5da38e56336f7671d068d5fc5e838af4283bdaf885475867e6dc17215 fpc-src-3.0.4-macosx.dmg 9bb74062462775cf325288f2e42361d7287ad8dd9c0150ef79710442a05389f0 LazarusIDE-2.0.6-macos-x86_64.pkg Mattias From freedos.la at gmail.com Thu Nov 7 22:46:39 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Thu, 7 Nov 2019 13:46:39 -0800 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <20191107212413.3dab0cf3@limapholos.matflo.wg> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> <20191106184433.67c2e2d8@limapholos.matflo.wg> <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> <20191106160218.3bd313eb@pino.pino.basement> <20191107212413.3dab0cf3@limapholos.matflo.wg> Message-ID: <41003ba5-4460-3176-ada0-6f8ae491bbf9@gmail.com> On 11/7/2019 12:24 PM, Mattias Gaertner via lazarus wrote: > On Wed, 6 Nov 2019 16:02:18 -0500 > Anthony Tekatch via lazarus wrote: > >> 2019-11-06 15:55:48-05 Anthonys-Mac-mini >> installd[637]: ./postinstall: /tmp/PKInstallSandbox.MDJZkJ/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.KNvm9D/postinstall: >> line 13: ///usr/local/lib/fpc/3.0.4/ide/text/fp.cfg.tmp: No such file >> or directory > Thanks for testing. > > The fpc ide folder was missing. > > I uploaded the fixed version to sourceforge. > Keep in mind that according to sf it might take up to 24h until all > sf mirrors are updated. Besten Dank! ;-) Will check and try with that updated version a bit later this afternoon... Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From freedos.la at gmail.com Fri Nov 8 00:28:42 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Thu, 7 Nov 2019 15:28:42 -0800 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: <20191107212413.3dab0cf3@limapholos.matflo.wg> References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> <20191106184433.67c2e2d8@limapholos.matflo.wg> <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> <20191106160218.3bd313eb@pino.pino.basement> <20191107212413.3dab0cf3@limapholos.matflo.wg> Message-ID: On 11/7/2019 12:24 PM, Mattias Gaertner via lazarus wrote: > On Wed, 6 Nov 2019 16:02:18 -0500 > Anthony Tekatch via lazarus wrote: > >> 2019-11-06 15:55:48-05 Anthonys-Mac-mini >> installd[637]: ./postinstall: /tmp/PKInstallSandbox.MDJZkJ/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.KNvm9D/postinstall: >> line 13: ///usr/local/lib/fpc/3.0.4/ide/text/fp.cfg.tmp: No such file >> or directory > Thanks for testing. > > The fpc ide folder was missing. > > I uploaded the fixed version to sourceforge. > Keep in mind that according to sf it might take up to 24h until all > sf mirrors are updated. Download in a quick break and installed without any further error message, also the Lazarus package after that. However, upon start of the new 64bit Lazarus app, it complains about the "wrong version in ide/version.inc: 2.02". Don't have the time right now to check more into this until later tonight... Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From nc-gaertnma at netcologne.de Fri Nov 8 07:30:33 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 8 Nov 2019 07:30:33 +0100 Subject: [Lazarus] Lazarus 2.0.6 macOS Catalina In-Reply-To: References: <20191105184545.4520a091@limapholos.matflo.wg> <20191105170035.5ee5c460@pino.pino.basement> <5be2a9c4-ea66-5e31-0d4a-f7309ad83f61@gmail.com> <20191106184433.67c2e2d8@limapholos.matflo.wg> <49a31db7-d2dc-7332-ceaa-be34ad42df1e@gmail.com> <20191106160218.3bd313eb@pino.pino.basement> <20191107212413.3dab0cf3@limapholos.matflo.wg> Message-ID: <20191108073033.1506d24e@limapholos.matflo.wg> On Thu, 7 Nov 2019 15:28:42 -0800 Ralf Quint via lazarus wrote: > On 11/7/2019 12:24 PM, Mattias Gaertner via lazarus wrote: > > On Wed, 6 Nov 2019 16:02:18 -0500 > > Anthony Tekatch via lazarus wrote: > > > >> 2019-11-06 15:55:48-05 Anthonys-Mac-mini > >> installd[637]: ./postinstall: /tmp/PKInstallSandbox.MDJZkJ/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.KNvm9D/postinstall: > >> line 13: ///usr/local/lib/fpc/3.0.4/ide/text/fp.cfg.tmp: No such > >> file or directory > > Thanks for testing. > > > > The fpc ide folder was missing. > > > > I uploaded the fixed version to sourceforge. > > Keep in mind that according to sf it might take up to 24h until all > > sf mirrors are updated. > > Download in a quick break and installed without any further error > message, also the Lazarus package after that. However, upon start of > the new 64bit Lazarus app, it complains about the "wrong version in > ide/version.inc: 2.02". Don't have the time right now to check more > into this until later tonight... Maybe you have a .lazarus directory, that points to a lazarus 2.0.2 in your home? Check menu View / IDE Internals / About IDE. Mattias From aaa5500 at ya.ru Fri Nov 8 22:08:39 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 9 Nov 2019 00:08:39 +0300 Subject: [Lazarus] Reworked ReadFileToString to support Linux virtual files Message-ID: https://bugs.freepascal.org/view.php?id=36145 Last attached demo contains my reworked function (after the fix it works pretty fast, i tested it). Can you apply at least this function? The issue can be opened - issue is about IDE. The function is reworked to support Linux virtual files like /proc/version, /proc/meminfo. -- Regards, Alexey From michael at freepascal.org Sat Nov 9 09:11:11 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 9 Nov 2019 09:11:11 +0100 (CET) Subject: [Lazarus] Reworked ReadFileToString to support Linux virtual files In-Reply-To: References: Message-ID: On Sat, 9 Nov 2019, AlexeyT via lazarus wrote: > https://bugs.freepascal.org/view.php?id=36145 > > Last attached demo contains my reworked function (after the fix it works > pretty fast, i tested it). Can you apply at least this function? The > issue can be opened - issue is about IDE. The function is reworked to > support Linux virtual files like /proc/version, /proc/meminfo. Concerning "Btw, i could not make this func using "file of byte" or "file" types for BlockRead, in that cases i always got IOResult=5 (Access denied) so i 've used TextFile type (IOResult is ok)." file of byte or untyped files are always opened read/write. The FileMode variable can be set to avoid that. Michael. From juha.manninen62 at gmail.com Sat Nov 9 10:50:13 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 9 Nov 2019 11:50:13 +0200 Subject: [Lazarus] Reworked ReadFileToString to support Linux virtual files In-Reply-To: References: Message-ID: On Fri, Nov 8, 2019 at 11:09 PM AlexeyT via lazarus wrote: > Last attached demo contains my reworked function (after the fix it works > pretty fast, i tested it). Can you apply at least this function? The > issue can be opened - issue is about IDE. The function is reworked to > support Linux virtual files like /proc/version, /proc/meminfo. I am hesitant to apply it because IMO it is not well optimized. It uses TFileStream, then a char buffer and then the Result string. Data is moved between them 3 times, isn't it? Another reason for hesitation: we don't have any acute bug concerning function ReadFileToString() that needs fixing. Yes I know the current function does not work with virtual files in Unix systems. Fixing that is a good idea but the new function should be as fast or faster than the current one which calls FileSize(). What is the overhead caused by FileSize()? I don't know but the speed of potential ReadFileToString() replacements should be compared. Did you compare them? If somebody comes up with a good optimised version, I promise to apply it. One problem is also that you often concentrate on trivial unimportant details of Lazarus sources instead of fixing real bugs. I know real bugs require diving deep into the code, hours of studying and debugging. It is harder than the trivial changes but there is no alternative when fixing the really nasty bugs. Juha From mlnglsts at bgss.hu Sun Nov 10 14:33:03 2019 From: mlnglsts at bgss.hu (Gabor Boros) Date: Sun, 10 Nov 2019 14:33:03 +0100 Subject: [Lazarus] SynEdit - SQL highlighter with $ in keywords Message-ID: <1c63d376-72a2-7596-ad6f-233c9ffae1a9@bgss.hu> Hi All, I try to extend TSynSQLSyn with keyword lists of Firebird 2.5, 3.0 and 4.0. Every keyword included in one list/version and used as tKey (e.g. sqlFirebird30: EnumerateKeywords(Ord(tkKey), Firebird30KW, IdentChars, @DoAddKeyword);). Some keywords contains a $ sign (RDB$DB_KEY, RDB$GET_CONTEXT, RDB$RECORD_VERSION, RDB$SET_CONTEXT). If I try to use the new highlighters got "Keyword "RDB" already in list with value "sqlFirebird30"". (I tried with actual trunk.) Any idea why and how to solve the problem? Gabor From lists-gsa at bg-gs.de Sun Nov 10 19:51:17 2019 From: lists-gsa at bg-gs.de (Gerd Sager) Date: Sun, 10 Nov 2019 19:51:17 +0100 Subject: [Lazarus] SynEdit - SQL highlighter with $ in keywords In-Reply-To: <1c63d376-72a2-7596-ad6f-233c9ffae1a9@bgss.hu> References: <1c63d376-72a2-7596-ad6f-233c9ffae1a9@bgss.hu> Message-ID: <20191110195117.00003efc@bg-gs.de> Am Sun, 10 Nov 2019 14:33:03 +0100 schrieb Gabor Boros via lazarus : > Hi All, > > I try to extend TSynSQLSyn with keyword lists of Firebird 2.5, 3.0 > and 4.0. Every keyword included in one list/version and used as tKey > (e.g. sqlFirebird30: EnumerateKeywords(Ord(tkKey), Firebird30KW, > IdentChars, @DoAddKeyword);). Some keywords contains a $ sign > (RDB$DB_KEY, RDB$GET_CONTEXT, RDB$RECORD_VERSION, RDB$SET_CONTEXT). > If I try to use the new highlighters got "Keyword "RDB" already in > list with value "sqlFirebird30"". (I tried with actual trunk.) Any > idea why and how to solve the problem? > > Gabor Hi Gabor, have a look at the implementation of TSynSQLSyn.GetIdentChars(). You could add somthing like if fDialect = sqlFirebird30 then Include(Result, '$'); Gerd From pascaldragon at googlemail.com Sun Nov 10 22:26:11 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 10 Nov 2019 22:26:11 +0100 Subject: [Lazarus] RFC: Selection Editors to extend handling of object inspector selections Message-ID: Hello together! I've got a RFC for a feature that allows to extend the IDE. It's based on something that Delphi supports as well: Selection Editors. Unlike Component Editors these are supposed to be used to interact with a specific selection in the designer and (in Delphi) allow the following extensions: - adding menu items for the context menu for the selection (like component editors) - add additional units when the component is dropped onto the form (though I wonder why that isn't part of component editors) - add or remove properties to/from the object inspector for the selection My current RFC only implements the last one and also a bit different than Delphi does cause they added that functionality only later (see below). Due to their dependencies Selection Editors live in the PropEdits unit and like component and property editors they are registered at an approbriate location (be it some Register function or a unit initialization). When the object inspector requests the properties it also checks all selection editors involved in the selection (included the parent classes) and calls the selection editor's FilterProperties method if GetAttributes contains seaFilterProperties (Delphi does not provide a GetAttributes method, instead it provides FilterProperties through an interface that needs to be implemented by a selection editor). FilterProperties receives both the current selection of the object inspector as well as the list of property editors. It is then free to add or remove property editors as it sees fit. The behavior when collecting the property editors is such that multiple FilterProperties methods might be called on the same selection, thus it might received an already filtered property editor list. I've attached a patch that implements selection editors (selection-editors.patch) as well as an example implementation for a component that Lazarus already supports and Delphi provides a selection editor for: TFlowPanel (tflowpanel-seledit.patch). For that component for each child control a virtual ControlIndex property is exposed which allows to easily change the order of the components in the object inspector instead of going through some collection editor. Also the Top and Left properties are removed as they aren't useful for such components. Delphi behaves the same here. Another example use would be TGridPanel which we don't have yet: it allows to implement the Row- and ColumnSpan properties on each child control of the panel. To work correctly I also had to adjust the object inspector a little bit (respect-parevertable.patch), cause it is not using only the virtual functions provided by TPropertyEditor: namely to respect the paRevertable attribute and only initialize and use the undo values if the property is deemed revertable. For demonstration purposes I've disabled the paRevertable attribute for the ControlIndex property editor, cause otherwise there'd be an exception when the object inspector tries to read the original value. It would be better if the object inspector would only call virtual methods of TPropertyEditor however or ones that can be easily faked (like I did by faking a TPropInfo entry, though that does not feel really nice either). Suggestions and criticism are welcome though I can't tell how much time I currently can and want to invest to improve this further. It might also need some step-by-step improvement of the existing TPropertyEditor interface to function smoothly. Regards, Sven -------------- next part -------------- Index: components/ideintf/propedits.pp =================================================================== --- components/ideintf/propedits.pp (revision 62212) +++ components/ideintf/propedits.pp (working copy) @@ -23,7 +23,7 @@ uses // RTL / FCL - Classes, TypInfo, SysUtils, types, RtlConsts, variants, Contnrs, strutils, + Classes, TypInfo, SysUtils, types, RtlConsts, variants, Contnrs, strutils, FGL, // LCL LCLType, LCLIntf, LCLProc, Forms, Controls, GraphType, ButtonPanel, Graphics, StdCtrls, Buttons, Menus, ExtCtrls, ComCtrls, Dialogs, EditBtn, Grids, ValEdit, @@ -416,7 +416,9 @@ end; TPropertyEditorClass=class of TPropertyEditor; - + + TPropertyEditorList = specialize TFPGObjectList; + { THiddenPropertyEditor A property editor, to hide a published property. If you can't unpublish it, hide it. } @@ -1180,6 +1182,39 @@ TDateTimeProperty = TDateTimePropertyEditor; +type + TSelectionEditorAttribute = ( + seaFilterProperties + ); + TSelectionEditorAttributes = set of TSelectionEditorAttribute; + + { TBaseSelectionEditor } + + TBaseSelectionEditor = class + constructor Create({%H-}ADesigner: TIDesigner; {%H-}AHook: TPropertyEditorHook); virtual; + function GetAttributes: TSelectionEditorAttributes; virtual; abstract; + procedure FilterProperties(ASelection: TPersistentSelectionList; AProperties: TPropertyEditorList); virtual; abstract; + end; + + TSelectionEditorClass = class of TBaseSelectionEditor; + + TSelectionEditorClassList = specialize TFPGList; + + { TSelectionEditor } + + TSelectionEditor = class(TBaseSelectionEditor) + private + FDesigner: TIDesigner; + FHook: TPropertyEditorHook; + public + constructor Create(ADesigner: TIDesigner; AHook: TPropertyEditorHook); override; + function GetAttributes: TSelectionEditorAttributes; override; + procedure FilterProperties({%H-}ASelection: TPersistentSelectionList; {%H-}AProperties: TPropertyEditorList); override; + property Designer: TIDesigner read FDesigner; + property Hook: TPropertyEditorHook read FHook; + end; + + //============================================================================== { RegisterPropertyEditor @@ -1258,6 +1293,12 @@ //============================================================================== +procedure RegisterSelectionEditor(AComponentClass: TComponentClass; AEditorClass: TSelectionEditorClass); +procedure GetSelectionEditorClasses(AComponent: TComponent; AEditorList: TSelectionEditorClassList); +procedure GetSelectionEditorClasses(ASelection: TPersistentSelectionList; AEditorList: TSelectionEditorClassList); + +//============================================================================== + procedure RegisterListPropertyEditor(AnEditor: TListPropertyEditor); procedure UnregisterListPropertyEditor(AnEditor: TListPropertyEditor); procedure UpdateListPropertyEditors(AnObject: TObject); @@ -1825,6 +1866,35 @@ procedure Gather(Child: TComponent); end; +{ TSelectionEditor } + +constructor TSelectionEditor.Create(ADesigner: TIDesigner; + AHook: TPropertyEditorHook); +begin + inherited Create(ADesigner, AHook); + FDesigner := ADesigner; + FHook := AHook; +end; + +function TSelectionEditor.GetAttributes: TSelectionEditorAttributes; +begin + Result := []; +end; + +procedure TSelectionEditor.FilterProperties( + ASelection: TPersistentSelectionList; AProperties: TPropertyEditorList); +begin + +end; + +{ TBaseSelectionEditor } + +constructor TBaseSelectionEditor.Create(ADesigner: TIDesigner; + AHook: TPropertyEditorHook); +begin + +end; + { TPagesPropertyEditor } procedure TPagesPropertyEditor.AssignItems(OldItmes, NewItems: TStrings); @@ -2121,6 +2191,7 @@ var PropertyEditorMapperList:TFPList; PropertyClassList:TFPList; + SelectionEditorClassList:TFPList; type PPropertyClassRec=^TPropertyClassRec; @@ -2136,6 +2207,12 @@ Mapper:TPropertyEditorMapperFunc; end; + PSelectionEditorClassRec=^TSelectionEditorClassRec; + TSelectionEditorClassRec=record + ComponentClass:TComponentClass; + EditorClass:TSelectionEditorClass; + end; + { TPropInfoList } constructor TPropInfoList.Create(Instance:TPersistent; Filter:TTypeKinds); @@ -2288,7 +2365,70 @@ //------------------------------------------------------------------------------ +procedure RegisterSelectionEditor(AComponentClass: TComponentClass; AEditorClass: TSelectionEditorClass); +var + p:PSelectionEditorClassRec; +begin + if not Assigned(AComponentClass) or not Assigned(AEditorClass) then + Exit; + if not Assigned(SelectionEditorClassList) then + SelectionEditorClassList:=TFPList.Create; + New(p); + p^.ComponentClass:=AComponentClass; + p^.EditorClass:=AEditorClass; + SelectionEditorClassList.Add(p); +end; +procedure GetSelectionEditorClasses(AComponent: TComponent; AEditorList: TSelectionEditorClassList); +var + i:LongInt; +begin + if not Assigned(AComponent) or not Assigned(AEditorList) then + Exit; + if not Assigned(SelectionEditorClassList) then + Exit; + for i:=0 to SelectionEditorClassList.Count-1 do begin + with PSelectionEditorClassRec(SelectionEditorClassList[i])^ do begin + if AComponent.InheritsFrom(ComponentClass) then + AEditorList.Add(EditorClass); + end; + end; +end; + +procedure GetSelectionEditorClasses(ASelection: TPersistentSelectionList; + AEditorList: TSelectionEditorClassList); +var + tmp:TSelectionEditorClassList; + i,j:LongInt; + sel:TPersistent; +begin + if not Assigned(ASelection) or (ASelection.Count=0) or not Assigned(AEditorList) then + Exit; + + tmp:=TSelectionEditorClassList.Create; + try + for i:=0 to ASelection.Count-1 do begin + sel:=ASelection[i]; + if not (sel is TComponent) then + Continue; + GetSelectionEditorClasses(TComponent(sel),tmp); + { if there are no classes yet, we pick them as is, otherwise we remove all + those from the existing list that are not part of the new list } + if AEditorList.Count=0 then + AEditorList.Assign(tmp) + else begin + for j:=AEditorList.Count-1 downto 0 do begin + if tmp.IndexOf(AEditorList[j])<0 then + AEditorList.Delete(j); + end; + end; + tmp.Clear; + end; + finally + tmp.Free; + end; +end; + { GetComponentProperties } procedure RegisterPropertyEditor(PropertyType:PTypeInfo; @@ -2401,10 +2541,14 @@ Candidates: TPropInfoList; PropLists: TFPList; PropEditor: TPropertyEditor; + PropEditorList: TPropertyEditorList; + SelEditor: TBaseSelectionEditor; + SelEditorList: TSelectionEditorClassList; EdClass: TPropertyEditorClass; PropInfo: PPropInfo; AddEditor: Boolean; Instance: TPersistent; + Designer: TIDesigner; begin if (ASelection = nil) or (ASelection.Count = 0) then Exit; SelCount := ASelection.Count; @@ -2448,52 +2592,82 @@ PropEditor.Free; end; - PropLists := TFPList.Create; + PropEditorList := TPropertyEditorList.Create(True); try - PropLists.Count := SelCount; - // Create a property info list for each component in the selection - for I := 0 to SelCount - 1 do - PropLists[i] := TPropInfoList.Create(ASelection[I], AFilter); + PropLists := TFPList.Create; + try + PropLists.Count := SelCount; + // Create a property info list for each component in the selection + for I := 0 to SelCount - 1 do + PropLists[i] := TPropInfoList.Create(ASelection[I], AFilter); - // Eliminate each property in Candidates that is not in all property lists - for I := 0 to SelCount - 1 do - Candidates.Intersect(TPropInfoList(PropLists[I])); + // Eliminate each property in Candidates that is not in all property lists + for I := 0 to SelCount - 1 do + Candidates.Intersect(TPropInfoList(PropLists[I])); - // Eliminate each property in the property list that are not in Candidates - for I := 0 to SelCount - 1 do - TPropInfoList(PropLists[I]).Intersect(Candidates); + // Eliminate each property in the property list that are not in Candidates + for I := 0 to SelCount - 1 do + TPropInfoList(PropLists[I]).Intersect(Candidates); - // PropList now has a matrix of PropInfo's. - // -> create a property editor for each property - for I := 0 to Candidates.Count - 1 do - begin - EdClass := GetEditorClass(Candidates[I], Instance); - if EdClass = nil then Continue; - PropEditor := EdClass.Create(AHook, SelCount); - AddEditor := True; - for J := 0 to SelCount - 1 do + // PropList now has a matrix of PropInfo's. + // -> create a property editor for each property + for I := 0 to Candidates.Count - 1 do begin - if (ASelection[J].ClassType <> ClassTyp) and - (GetEditorClass(TPropInfoList(PropLists[J])[I], ASelection[J])<>EdClass) then + EdClass := GetEditorClass(Candidates[I], Instance); + if EdClass = nil then Continue; + PropEditor := EdClass.Create(AHook, SelCount); + AddEditor := True; + for J := 0 to SelCount - 1 do begin - AddEditor := False; - Break; + if (ASelection[J].ClassType <> ClassTyp) and + (GetEditorClass(TPropInfoList(PropLists[J])[I], ASelection[J])<>EdClass) then + begin + AddEditor := False; + Break; + end; + PropEditor.SetPropEntry(J, ASelection[J], TPropInfoList(PropLists[J])[I]); end; - PropEditor.SetPropEntry(J, ASelection[J], TPropInfoList(PropLists[J])[I]); + if AddEditor then + begin + PropEditor.Initialize; + if not PropEditor.ValueAvailable then AddEditor:=false; + end; + if AddEditor then begin + DebugLn('Adding property editor for %s', [PropEditor.GetName]); + PropEditorList.Add(PropEditor) + end + else + PropEditor.Free; end; - if AddEditor then - begin - PropEditor.Initialize; - if not PropEditor.ValueAvailable then AddEditor:=false; + finally + for I := 0 to PropLists.Count - 1 do TPropInfoList(PropLists[I]).Free; + PropLists.Free; + end; + + SelEditorList := TSelectionEditorClassList.Create; + try + GetSelectionEditorClasses(ASelection, SelEditorList); + { is it safe to assume that the whole selection has the same designer? } + Designer := FindRootDesigner(ASelection[0]); + for I := 0 to SelEditorList.Count - 1 do begin + SelEditor := SelEditorList[I].Create(Designer, AHook); + try + if seaFilterProperties in SelEditor.GetAttributes then + SelEditor.FilterProperties(ASelection, PropEditorList); + finally + SelEditor.Free; + end; end; - if AddEditor then - AProc(PropEditor) - else - PropEditor.Free; + finally + SelEditorList.Free; end; + + { no longer free the editors } + PropEditorList.FreeObjects := False; + for I := 0 to PropEditorList.Count - 1 do + AProc(PropEditorList[I]); finally - for I := 0 to PropLists.Count - 1 do TPropInfoList(PropLists[I]).Free; - PropLists.Free; + PropEditorList.Free; end; finally Candidates.Free; @@ -8107,6 +8281,7 @@ i: integer; pm: PPropertyEditorMapperRec; pc: PPropertyClassRec; + sec: PSelectionEditorClassRec; begin if PropertyEditorMapperList<>nil then begin for i:=0 to PropertyEditorMapperList.Count-1 do begin @@ -8124,6 +8299,13 @@ FreeAndNil(PropertyClassList); end; + if Assigned(SelectionEditorClassList) then begin + for i:=0 to SelectionEditorClassList.Count-1 do begin + sec:=PSelectionEditorClassRec(SelectionEditorClassList[i]); + Dispose(sec); + end; + end; + FreeAndNil(ListPropertyEditors); FreeAndNil(VirtualKeyStrings); end; -------------- next part -------------- Index: components/ideintf/fpmake.pp =================================================================== --- components/ideintf/fpmake.pp (revision 62212) +++ components/ideintf/fpmake.pp (working copy) @@ -94,6 +94,7 @@ t.Dependencies.AddUnit('projectresourcesintf'); t.Dependencies.AddUnit('propedits'); t.Dependencies.AddUnit('propeditutils'); + t.Dependencies.AddUnit('seledits'); t.Dependencies.AddUnit('srceditorintf'); t.Dependencies.AddUnit('statusbarpropedit'); t.Dependencies.AddUnit('stringspropeditdlg'); @@ -153,6 +154,7 @@ T:=P.Targets.AddUnit('projectresourcesintf.pas'); T:=P.Targets.AddUnit('propedits.pp'); T:=P.Targets.AddUnit('propeditutils.pp'); + T:=P.Targets.AddUnit('seledits.pas'); T:=P.Targets.AddUnit('srceditorintf.pas'); T:=P.Targets.AddUnit('statusbarpropedit.pp'); T:=P.Targets.AddUnit('stringspropeditdlg.pas'); Index: components/ideintf/ideintf.lpk =================================================================== --- components/ideintf/ideintf.lpk (revision 62212) +++ components/ideintf/ideintf.lpk (working copy) @@ -17,7 +17,7 @@ - + @@ -363,6 +363,10 @@ + + + + Index: components/ideintf/ideintf.pas =================================================================== --- components/ideintf/ideintf.pas (revision 62212) +++ components/ideintf/ideintf.pas (working copy) @@ -23,7 +23,7 @@ StatusBarPropEdit, StringsPropEditDlg, TextTools, TreeViewPropEdit, UnitResources, ProjPackIntf, DBGridColumnsPropEditForm, ToolBarIntf, ChangeParentDlg, PackageDependencyIntf, PackageLinkIntf, FppkgIntf, - LazMsgDialogs, ProjectGroupIntf, LazarusPackageIntf; + LazMsgDialogs, ProjectGroupIntf, SelEdits, LazarusPackageIntf; implementation Index: components/ideintf/seledits.pas =================================================================== --- components/ideintf/seledits.pas (nonexistent) +++ components/ideintf/seledits.pas (working copy) @@ -0,0 +1,149 @@ +{ + ***************************************************************************** + See the file COPYING.modifiedLGPL.txt, included in this distribution, + for details about the license. + ***************************************************************************** + + Author: Sven Barth + + Abstract: + This unit contains selection editors for various LCL components. +} +unit SelEdits; + +{$mode objfpc}{$H+} + +interface + +uses + // RTL / FCL + SysUtils, TypInfo, + // LCL + Controls, ExtCtrls, + // IdeIntf + PropEdits; + +type + + { TFlowPanelControlIndexEditor } + + TFlowPanelControlIndexEditor = class(TSelectionEditor) + public + function GetAttributes: TSelectionEditorAttributes; override; + procedure FilterProperties(ASelection: TPersistentSelectionList; + AProperties: TPropertyEditorList); override; + end; + +implementation + +type + + { TFlowPanelControlIndexProperty } + + TFlowPanelControlIndexProperty = class(TPropertyEditor) + private + FPanel: TCustomFlowPanel; + FControl: TControl; + FPropInfo: TPropInfo; + FPropType: PTypeInfo; + public + constructor Create(APanel: TCustomFlowPanel; AControl: TControl; AHook: TPropertyEditorHook); reintroduce; + function GetAttributes: TPropertyAttributes; override; + function GetValue: ansistring; override; + procedure SetValue(const NewValue: ansistring); override; + end; + +{ TFlowPanelControlIndexProperty } + +constructor TFlowPanelControlIndexProperty.Create(APanel: TCustomFlowPanel; + AControl: TControl; AHook: TPropertyEditorHook); +begin + inherited Create(AHook, 1); + FPanel := APanel; + FControl := AControl; + FPropType := TypeInfo(Integer); +{$if FPC_FULLVERSION<30101} + FPropInfo.PropType := FPropType; +{$else} + FPropInfo.PropTypeRef := @FPropType; +{$endif} + FPropInfo.Name := 'ControlIndex'; + SetPropEntry(0, Nil, @FPropInfo); +end; + +function TFlowPanelControlIndexProperty.GetAttributes: TPropertyAttributes; +begin + Result := []; +end; + +function TFlowPanelControlIndexProperty.GetValue: ansistring; +begin + Result := IntToStr(FPanel.GetControlIndex(FControl)); +end; + +procedure TFlowPanelControlIndexProperty.SetValue(const NewValue: ansistring); +var + idx: Integer; +begin + if not TryStrToInt(NewValue, idx) then + Exit; + FPanel.SetControlIndex(FControl, idx); +end; + +{ TFlowPanelControlIndexEditor } + +function TFlowPanelControlIndexEditor.GetAttributes: TSelectionEditorAttributes; +begin + Result := [seaFilterProperties]; +end; + +procedure TFlowPanelControlIndexEditor.FilterProperties( + ASelection: TPersistentSelectionList; AProperties: TPropertyEditorList); +var + ctrl: TControl; + i: LongInt; + todelete: array[0..1] of LongInt; + propname: ShortString; +begin + if not Assigned(ASelection) or not Assigned(AProperties) then + Exit; + if ASelection.Count <> 1 then + Exit; + todelete[0] := -1; + todelete[1] := -1; + for i := 0 to AProperties.Count - 1 do begin + if AProperties[i] is TFlowPanelControlIndexProperty then + Exit; + propname := UpperCase(AProperties[i].GetName); + if propname = 'CONTROLINDEX' then + Exit + else if propname = 'LEFT' then + todelete[0] := i + else if propname = 'TOP' then + todelete[1] := i; + end; + + if not (ASelection[0] is TControl) then + Exit; + ctrl := TControl(ASelection[0]); + if not (ctrl.Parent is TCustomFlowPanel) then + Exit; + + if todelete[0] < todelete[1] then begin + i := todelete[0]; + todelete[0] := todelete[1]; + todelete[1] := i; + end; + for i := Low(todelete) to High(todelete) do + if todelete[i] >= 0 then + AProperties.Delete(todelete[i]); + + AProperties.Add(TFlowPanelControlIndexProperty.Create(TCustomFlowPanel(ctrl.Parent), ctrl, Hook)); +end; + +initialization + { we need to register this for TControl as this is applied to each control + that is placed on a TFlowPanel } + RegisterSelectionEditor(TControl, TFlowPanelControlIndexEditor); +end. + Property changes on: components/ideintf/seledits.pas ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/pascal \ No newline at end of property Index: ide/main.pp =================================================================== --- ide/main.pp (revision 62212) +++ ide/main.pp (working copy) @@ -82,6 +82,7 @@ SrcEditorIntf, NewItemIntf, IDEExternToolIntf, IDEMsgIntf, LazMsgDialogs, PackageIntf, ProjectIntf, CompOptsIntf, MenuIntf, BaseIDEIntf, LazIDEIntf, IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, ComponentEditors, ToolBarIntf, + SelEdits, // protocol IDEProtocol, // compile -------------- next part -------------- Index: components/ideintf/objectinspector.pp =================================================================== --- components/ideintf/objectinspector.pp (revision 62212) +++ components/ideintf/objectinspector.pp (working copy) @@ -1589,7 +1589,7 @@ isExcept := false; Editor:=CurRow.Editor; prpInfo := nil; - if CompEditDsg<>nil then begin + if (CompEditDsg<>nil) and (paRevertable in Editor.GetAttributes) then begin SetLength(OldUndoValues, Editor.PropCount); prpInfo := Editor.GetPropInfo; if prpInfo<>nil then begin @@ -1621,7 +1621,7 @@ end; // add Undo action - if (not isExcept) and (CompEditDsg<>nil) then + if (not isExcept) and (CompEditDsg<>nil) and (paRevertable in Editor.GetAttributes) then begin for i := 0 to Editor.PropCount - 1 do begin From bo.berglund at gmail.com Sun Nov 10 23:29:11 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 10 Nov 2019 23:29:11 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? Message-ID: I have ported a console application from Windows to Linux (Raspbian Buster) and I got to wonder about the check for a defined symbol appearing in the beginning of the code as produced by the Lazarus template: uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Would it not be enough to use this instead: uses {$IFDEF UNIX} cthreads, {$ENDIF} Is there a heavy hit on perfortmance or such if the conditional is not used but instead just checking if we are on UNIX? What happens if one does not use threads in ones code but removes the conditional UseCThreads as shown above? For example if I am using Indy10 objects they are threaded so in that case I assume I need to use cthreads. But in any other case, how can I know that some used package might rely on threads and so needs this uses clause? Basically: What damage does it do if cthreads are in the uses clause but no thread appears in the program code (yet)? -- Bo Berglund Developer in Sweden From pascaldragon at googlemail.com Mon Nov 11 00:20:59 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Mon, 11 Nov 2019 00:20:59 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? In-Reply-To: References: Message-ID: Bo Berglund via lazarus schrieb am So., 10. Nov. 2019, 23:29: > I have ported a console application from Windows to Linux (Raspbian > Buster) and I got to wonder about the check for a defined symbol > appearing in the beginning of the code as produced by the Lazarus > template: > > uses > {$IFDEF UNIX}{$IFDEF UseCThreads} > cthreads, > {$ENDIF}{$ENDIF} > > Would it not be enough to use this instead: > uses > {$IFDEF UNIX} > cthreads, > {$ENDIF} > > Is there a heavy hit on perfortmance or such if the conditional is not > used but instead just checking if we are on UNIX? > > What happens if one does not use threads in ones code but removes the > conditional UseCThreads as shown above? > > For example if I am using Indy10 objects they are threaded so in that > case I assume I need to use cthreads. But in any other case, how can I > know that some used package might rely on threads and so needs this > uses clause? > > Basically: > What damage does it do if cthreads are in the uses clause but no > thread appears in the program code (yet)? > The "damage" is that your application will link against the C library. Sometimes that's not desirable and quite some FPC code can be used without that (e.g. the compiler itself does not need to link against the C library and thus the binary is usable on various Linux distributions and versions). Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Mon Nov 11 08:38:06 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 11 Nov 2019 08:38:06 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? References: Message-ID: On Mon, 11 Nov 2019 00:20:59 +0100, Sven Barth via lazarus wrote: >Bo Berglund via lazarus schrieb am So., 10. >Nov. 2019, 23:29: > >> I have ported a console application from Windows to Linux (Raspbian >> Buster) and I got to wonder about the check for a defined symbol >> appearing in the beginning of the code as produced by the Lazarus >> template: >> >> uses >> {$IFDEF UNIX}{$IFDEF UseCThreads} >> cthreads, >> {$ENDIF}{$ENDIF} >> >> Would it not be enough to use this instead: >> uses >> {$IFDEF UNIX} >> cthreads, >> {$ENDIF} >> >> Is there a heavy hit on perfortmance or such if the conditional is not >> used but instead just checking if we are on UNIX? >> >> What happens if one does not use threads in ones code but removes the >> conditional UseCThreads as shown above? >> >> For example if I am using Indy10 objects they are threaded so in that >> case I assume I need to use cthreads. But in any other case, how can I >> know that some used package might rely on threads and so needs this >> uses clause? >> >> Basically: >> What damage does it do if cthreads are in the uses clause but no >> thread appears in the program code (yet)? >> > >The "damage" is that your application will link against the C library. >Sometimes that's not desirable and quite some FPC code can be used without >that (e.g. the compiler itself does not need to link against the C library >and thus the binary is usable on various Linux distributions and versions). > So if one does not enable use of cthreads there are still threads available also on Linux? I interpreted the existence of this switch as "if you want to use threads on Linux you need to enable UseCThreads"... If I do not have cthreads as a uses item but still want to use for example Indy10, will it still work? -- Bo Berglund Developer in Sweden From zeljko at holobit.net Mon Nov 11 08:59:43 2019 From: zeljko at holobit.net (zeljko) Date: Mon, 11 Nov 2019 08:59:43 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? In-Reply-To: References: Message-ID: <15cd4415-91ca-a703-cbb9-6a46e5b3da7b@holobit.net> On 11/10/19 11:29 PM, Bo Berglund via lazarus wrote: > I have ported a console application from Windows to Linux (Raspbian > Buster) and I got to wonder about the check for a defined symbol > appearing in the beginning of the code as produced by the Lazarus > template: > > uses > {$IFDEF UNIX}{$IFDEF UseCThreads} > cthreads, > {$ENDIF}{$ENDIF} > > Would it not be enough to use this instead: > uses > {$IFDEF UNIX} > cthreads, > {$ENDIF} AFAIK, in lazarus trunk there's no more {$IFDEF UseCThreads} when creating new project, only {$IFDEF UNIX}cthreads{$ENDIF} zeljko From zeljko at holobit.net Mon Nov 11 08:59:43 2019 From: zeljko at holobit.net (zeljko) Date: Mon, 11 Nov 2019 08:59:43 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? In-Reply-To: References: Message-ID: <15cd4415-91ca-a703-cbb9-6a46e5b3da7b@holobit.net> On 11/10/19 11:29 PM, Bo Berglund via lazarus wrote: > I have ported a console application from Windows to Linux (Raspbian > Buster) and I got to wonder about the check for a defined symbol > appearing in the beginning of the code as produced by the Lazarus > template: > > uses > {$IFDEF UNIX}{$IFDEF UseCThreads} > cthreads, > {$ENDIF}{$ENDIF} > > Would it not be enough to use this instead: > uses > {$IFDEF UNIX} > cthreads, > {$ENDIF} AFAIK, in lazarus trunk there's no more {$IFDEF UseCThreads} when creating new project, only {$IFDEF UNIX}cthreads{$ENDIF} zeljko From pascaldragon at googlemail.com Mon Nov 11 15:01:44 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Mon, 11 Nov 2019 15:01:44 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? In-Reply-To: References: Message-ID: Bo Berglund via lazarus schrieb am Mo., 11. Nov. 2019, 08:38: > On Mon, 11 Nov 2019 00:20:59 +0100, Sven Barth via lazarus > wrote: > > >Bo Berglund via lazarus schrieb am So., > 10. > >Nov. 2019, 23:29: > > > >> I have ported a console application from Windows to Linux (Raspbian > >> Buster) and I got to wonder about the check for a defined symbol > >> appearing in the beginning of the code as produced by the Lazarus > >> template: > >> > >> uses > >> {$IFDEF UNIX}{$IFDEF UseCThreads} > >> cthreads, > >> {$ENDIF}{$ENDIF} > >> > >> Would it not be enough to use this instead: > >> uses > >> {$IFDEF UNIX} > >> cthreads, > >> {$ENDIF} > >> > >> Is there a heavy hit on perfortmance or such if the conditional is not > >> used but instead just checking if we are on UNIX? > >> > >> What happens if one does not use threads in ones code but removes the > >> conditional UseCThreads as shown above? > >> > >> For example if I am using Indy10 objects they are threaded so in that > >> case I assume I need to use cthreads. But in any other case, how can I > >> know that some used package might rely on threads and so needs this > >> uses clause? > >> > >> Basically: > >> What damage does it do if cthreads are in the uses clause but no > >> thread appears in the program code (yet)? > >> > > > >The "damage" is that your application will link against the C library. > >Sometimes that's not desirable and quite some FPC code can be used without > >that (e.g. the compiler itself does not need to link against the C library > >and thus the binary is usable on various Linux distributions and > versions). > > > > So if one does not enable use of cthreads there are still threads > available also on Linux? > I interpreted the existence of this switch as "if you want to use > threads on Linux you need to enable UseCThreads"... > > If I do not have cthreads as a uses item but still want to use for > example Indy10, will it still work? > You asked what the damage is if one does not use threads. If you use threads then you *must* use the cthreads unit on Unix platforms. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Mon Nov 11 18:03:14 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 11 Nov 2019 18:03:14 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? References: <15cd4415-91ca-a703-cbb9-6a46e5b3da7b@holobit.net> Message-ID: On Mon, 11 Nov 2019 08:59:43 +0100, zeljko via lazarus wrote: >On 11/10/19 11:29 PM, Bo Berglund via lazarus wrote: >> I have ported a console application from Windows to Linux (Raspbian >> Buster) and I got to wonder about the check for a defined symbol >> appearing in the beginning of the code as produced by the Lazarus >> template: >> >> uses >> {$IFDEF UNIX}{$IFDEF UseCThreads} >> cthreads, >> {$ENDIF}{$ENDIF} >> >> Would it not be enough to use this instead: >> uses >> {$IFDEF UNIX} >> cthreads, >> {$ENDIF} > >AFAIK, in lazarus trunk there's no more {$IFDEF UseCThreads} when >creating new project, only {$IFDEF UNIX}cthreads{$ENDIF} > Thanks, then the idea is that if building for Linux and you use threads anywhere you need to put this first in the project file, right? So in my case since I know that Indy10 uses a lot of threads I have to do that. -- Bo Berglund Developer in Sweden From zeljko at holobit.net Mon Nov 11 19:11:08 2019 From: zeljko at holobit.net (zeljko) Date: Mon, 11 Nov 2019 19:11:08 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? In-Reply-To: References: <15cd4415-91ca-a703-cbb9-6a46e5b3da7b@holobit.net> Message-ID: <099b61ab-a57d-6c30-6aec-eac52685e14a@holobit.net> On 11/11/19 6:03 PM, Bo Berglund via lazarus wrote: > then the idea is that if building for Linux and you use threads > anywhere you need to put this first in the project file, right? Lazarus trunk -> New project automatically adds cthreads enclosed with IFDEF UNIX, if you create your program manually the you should add it manually there. z. From zeljko at holobit.net Mon Nov 11 19:11:08 2019 From: zeljko at holobit.net (zeljko) Date: Mon, 11 Nov 2019 19:11:08 +0100 Subject: [Lazarus] Why is there a define switch UseCThreads? In-Reply-To: References: <15cd4415-91ca-a703-cbb9-6a46e5b3da7b@holobit.net> Message-ID: <099b61ab-a57d-6c30-6aec-eac52685e14a@holobit.net> On 11/11/19 6:03 PM, Bo Berglund via lazarus wrote: > then the idea is that if building for Linux and you use threads > anywhere you need to put this first in the project file, right? Lazarus trunk -> New project automatically adds cthreads enclosed with IFDEF UNIX, if you create your program manually the you should add it manually there. z. From aaa5500 at ya.ru Mon Nov 11 22:01:25 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Tue, 12 Nov 2019 00:01:25 +0300 Subject: [Lazarus] Wiki error on uploading new version of png picture Message-ID: <21eb49d6-b75f-2ea4-e9db-56b84bae91d8@ya.ru> Database error A database query error has occurred. This may indicate a bug in the software. [ac44310904ca4f16e1729b3f] /Special:Upload Wikimedia\Rdbms\DBQueryError from line 1457 of /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: RELEASE SAVEPOINT `wikimedia_rdbms_atomic1` Function: LocalFile::recordUpload2 Error: 1305 SAVEPOINT wikimedia_rdbms_atomic1 does not exist (localhost) Backtrace: #0 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string) #1 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3498): Wikimedia\Rdbms\Database->query(string, string) #3 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3584): Wikimedia\Rdbms\Database->doReleaseSavepoint(string, string) #4 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2953): Wikimedia\Rdbms\Database->endAtomic(string) #5 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2880): Wikimedia\Rdbms\Database->nonNativeInsertSelect(string, array, array, array, string, array, array, array) #6 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1606): Wikimedia\Rdbms\Database->insertSelect(string, array, array, array, string, array, array, array) #7 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1364): LocalFile->recordUpload2(string, string, boolean, array, string, User, array) #8 /srv/www/lazaruswiki/includes/upload/UploadBase.php(868): LocalFile->upload(string, string, boolean, integer, array, boolean, User, array) #9 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(567): UploadBase->performUpload(string, boolean, boolean, User, array) #10 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(207): SpecialUpload->processUpload() #11 /srv/www/lazaruswiki/includes/specialpage/SpecialPage.php(565): SpecialUpload->execute(NULL) #12 /srv/www/lazaruswiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL) #13 /srv/www/lazaruswiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext) #14 /srv/www/lazaruswiki/includes/MediaWiki.php(861): MediaWiki->performRequest() #15 /srv/www/lazaruswiki/includes/MediaWiki.php(524): MediaWiki->main() #16 /srv/www/lazaruswiki/index.php(42): MediaWiki->run() #17 {main} -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Tue Nov 12 10:11:49 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 12 Nov 2019 10:11:49 +0100 Subject: [Lazarus] FPC interface for reading I2C devices on Raspberry Pi? Message-ID: <3dtkse1urrl93p2547amh036vupoig8pjc@4ax.com> I would like to be able to communicate on the I2C bus from my FPC/Lazarus programs on Raspberry Pi. There are at least two cases: 1) Reading devices like RTC chips and other sensors. 2) Reading/writing data stored in EEPROM chips Since the Raspbian system is a Debian Linux derivative I am hoping there could be a simple way using file I/O, but I don't know how... Any suggestions? Software to install in Raspbian? Packages to install in Lazarus? I am already using the GPIO I/O via the PiGpio unit and it works well to read and write I/O pins... -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Nov 12 14:53:46 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 12 Nov 2019 14:53:46 +0100 Subject: [Lazarus] FPC interface for reading I2C devices on Raspberry Pi? References: <3dtkse1urrl93p2547amh036vupoig8pjc@4ax.com> Message-ID: <60elsellam3m5e9e75mhadt2bc3shvkoal@4ax.com> On Tue, 12 Nov 2019 10:11:49 +0100, Bo Berglund via lazarus wrote: >I would like to be able to communicate on the I2C bus from my >FPC/Lazarus programs on Raspberry Pi. > >There are at least two cases: >1) Reading devices like RTC chips and other sensors. >2) Reading/writing data stored in EEPROM chips > >Since the Raspbian system is a Debian Linux derivative I am hoping >there could be a simple way using file I/O, but I don't know how... > >Any suggestions? >Software to install in Raspbian? >Packages to install in Lazarus? > >I am already using the GPIO I/O via the PiGpio unit and it works well >to read and write I/O pins... After consulting with the Lazarus Forum I got some suggestions and now I have found a unit TMSLCLRaspiHW.pas from TMS Software, which implements I2C operations on Raspberry Pi. But it uses this setting: {$mode delphi} whereas my existing application files use this setting: {$mode objfpc}{$H+} Can these settings be mixed among units in the same application or does it have to be a common setting amongst all units? -- Bo Berglund Developer in Sweden From nc-gaertnma at netcologne.de Tue Nov 12 14:58:05 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 12 Nov 2019 14:58:05 +0100 Subject: [Lazarus] FPC interface for reading I2C devices on Raspberry Pi? In-Reply-To: <60elsellam3m5e9e75mhadt2bc3shvkoal@4ax.com> References: <3dtkse1urrl93p2547amh036vupoig8pjc@4ax.com> <60elsellam3m5e9e75mhadt2bc3shvkoal@4ax.com> Message-ID: <20191112145805.45a3cb65@limapholos.matflo.wg> On Tue, 12 Nov 2019 14:53:46 +0100 Bo Berglund via lazarus wrote: > On Tue, 12 Nov 2019 10:11:49 +0100, Bo Berglund via lazarus > wrote: > > >I would like to be able to communicate on the I2C bus from my > >FPC/Lazarus programs on Raspberry Pi. > > > >There are at least two cases: > >1) Reading devices like RTC chips and other sensors. > >2) Reading/writing data stored in EEPROM chips > > > >Since the Raspbian system is a Debian Linux derivative I am hoping > >there could be a simple way using file I/O, but I don't know how... > > > >Any suggestions? > >Software to install in Raspbian? > >Packages to install in Lazarus? > > > >I am already using the GPIO I/O via the PiGpio unit and it works well > >to read and write I/O pins... > > After consulting with the Lazarus Forum I got some suggestions and now > I have found a unit TMSLCLRaspiHW.pas from TMS Software, which > implements I2C operations on Raspberry Pi. > > But it uses this setting: > > {$mode delphi} > > whereas my existing application files use this setting: > > {$mode objfpc}{$H+} > > Can these settings be mixed among units Yes Mattias From michael at freepascal.org Tue Nov 12 14:58:07 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 12 Nov 2019 14:58:07 +0100 (CET) Subject: [Lazarus] FPC interface for reading I2C devices on Raspberry Pi? In-Reply-To: <60elsellam3m5e9e75mhadt2bc3shvkoal@4ax.com> References: <3dtkse1urrl93p2547amh036vupoig8pjc@4ax.com> <60elsellam3m5e9e75mhadt2bc3shvkoal@4ax.com> Message-ID: On Tue, 12 Nov 2019, Bo Berglund via lazarus wrote: > On Tue, 12 Nov 2019 10:11:49 +0100, Bo Berglund via lazarus > wrote: > >> I would like to be able to communicate on the I2C bus from my >> FPC/Lazarus programs on Raspberry Pi. >> >> There are at least two cases: >> 1) Reading devices like RTC chips and other sensors. >> 2) Reading/writing data stored in EEPROM chips >> >> Since the Raspbian system is a Debian Linux derivative I am hoping >> there could be a simple way using file I/O, but I don't know how... >> >> Any suggestions? >> Software to install in Raspbian? >> Packages to install in Lazarus? >> >> I am already using the GPIO I/O via the PiGpio unit and it works well >> to read and write I/O pins... > > After consulting with the Lazarus Forum I got some suggestions and now > I have found a unit TMSLCLRaspiHW.pas from TMS Software, which > implements I2C operations on Raspberry Pi. > > But it uses this setting: > > {$mode delphi} > > whereas my existing application files use this setting: > > {$mode objfpc}{$H+} > > Can these settings be mixed among units in the same application or > does it have to be a common setting amongst all units? It can be mixed. The setting applies to the unit in which it was found, other units can have another setting. Michael. From mlnglsts at bgss.hu Tue Nov 12 19:40:31 2019 From: mlnglsts at bgss.hu (Gabor Boros) Date: Tue, 12 Nov 2019 19:40:31 +0100 Subject: [Lazarus] SynEdit - SQL highlighter with $ in keywords In-Reply-To: <20191110195117.00003efc@bg-gs.de> References: <1c63d376-72a2-7596-ad6f-233c9ffae1a9@bgss.hu> <20191110195117.00003efc@bg-gs.de> Message-ID: <291ec779-3f94-35be-433c-d0a352b67226@bgss.hu> 2019. 11. 10. 19:51 keltezéssel, Gerd Sager via lazarus írta: > Hi Gabor, > > have a look at the implementation of TSynSQLSyn.GetIdentChars(). > > You could add somthing like > > if fDialect = sqlFirebird30 then > Include(Result, '$'); > > Gerd Works like a charm. Thank you very much Gerd! Gabor From florian at freepascal.org Wed Nov 13 22:00:07 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Wed, 13 Nov 2019 22:00:07 +0100 Subject: [Lazarus] Find in files crashes Cinnamon Message-ID: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> Recently, I tried again to work with Linux Mint when developing FPC. For FPC development I use normally lazarus from trunk, typical updated very few weeks. For navigation in the code I use "Find in files" from time to time, e.g. when looking where a certain internal error is thrown. I call the Find in files dialog by Ctrl-Shift-F. Sometimes, this action crashes Cinnamon completely: mouse still works but nothing is clickable anymore (Ctrl-Alt-Fx still works so the kernel is apparently still fine). Often, Ctrl-Alt-Esc can be used to restart Cinnamon after some time, sometimes Cinnamon de-freezes after some second and shows a dialog box that it crashed, restarted and is now in safe mode (or how it is called). The most annoying part of these crashes is that all windows are moved to the first virtual desktop besides that the fact that sometimes only a reboot helps to recover. Does anybody have an idea where this could come from or how I could track this down (and no, the normal answer one gets when asking such things about linux that I should try KDE or Gnome or any other of the umpteen desktops, is not a solution). From aaa5500 at ya.ru Thu Nov 14 19:56:22 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Thu, 14 Nov 2019 21:56:22 +0300 Subject: [Lazarus] FPC trunk cannot compile Lazarus Qt5 lib Message-ID: <6e5a23c1-4e04-a23b-c338-29c9df0c0e74@ya.ru> Lazarus trunk, fpc 3.3.1-r43462 Linux x64 qt56.pas(12495,37) Error: Enumeration symbols can only have values in the range of -2^31 to 2^31-1     QStyleCE_CustomBase = $f0000000 ); -- Regards, Alexey From aaa5500 at ya.ru Thu Nov 14 20:28:58 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Thu, 14 Nov 2019 22:28:58 +0300 Subject: [Lazarus] FPC trunk cannot compile Lazarus Qt5 lib In-Reply-To: <6e5a23c1-4e04-a23b-c338-29c9df0c0e74@ya.ru> References: <6e5a23c1-4e04-a23b-c338-29c9df0c0e74@ya.ru> Message-ID: <09c89926-a8ca-b5d1-decb-563753ff2304@ya.ru> I must say I do cross compile from Linux x64 toHaiku x32, it is FPC x32 limitation. Alex From zeljko at holobit.net Fri Nov 15 09:45:17 2019 From: zeljko at holobit.net (zeljko) Date: Fri, 15 Nov 2019 09:45:17 +0100 Subject: [Lazarus] FPC trunk cannot compile Lazarus Qt5 lib In-Reply-To: <6e5a23c1-4e04-a23b-c338-29c9df0c0e74@ya.ru> References: <6e5a23c1-4e04-a23b-c338-29c9df0c0e74@ya.ru> Message-ID: <7da921d7-1446-d22d-ee19-58565148c981@holobit.net> On 11/14/19 7:56 PM, AlexeyT via lazarus wrote: > Lazarus trunk, fpc 3.3.1-r43462 Linux x64 > > qt56.pas(12495,37) Error: Enumeration symbols can only have values in > the range of -2^31 to 2^31-1 > >     QStyleCE_CustomBase = $f0000000 ); > Issue is already opened. I'll wait fpc developers to shed some light on this. You can temporary compile it with cast QStyleCE_CustomBase = longint($f0000000) From l at c-m-w.me.uk Fri Nov 15 10:48:43 2019 From: l at c-m-w.me.uk (C Western) Date: Fri, 15 Nov 2019 09:48:43 +0000 Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> Message-ID: <9a3c2e3c-5255-4985-18d5-927842176639@c-m-w.me.uk> On 13/11/2019 21:00, Florian Klämpfl via lazarus wrote: > Recently, I tried again to work with Linux Mint when developing FPC. > For FPC development I use normally lazarus from trunk, typical updated > very few weeks. For navigation in the code I use "Find in files" from > time to time, e.g. when looking where a certain internal error is > thrown. I call the Find in files dialog by Ctrl-Shift-F. Sometimes, > this action crashes Cinnamon completely: mouse still works but nothing > is clickable anymore (Ctrl-Alt-Fx still works so the kernel is > apparently still fine). Often, Ctrl-Alt-Esc can be used to restart > Cinnamon after some time, sometimes Cinnamon de-freezes after some > second and shows a dialog box that it crashed, restarted and is now in > safe mode (or how it is called). The most annoying part of these > crashes is that all windows are moved to the first virtual desktop > besides that the fact that sometimes only a reboot helps to recover. > > Does anybody have an idea where this could come from or how I could > track this down (and no, the normal answer one gets when asking such > things about linux that I should try KDE or Gnome or any other of the > umpteen desktops, is not a solution). It sounds like a bug in the desktop but: Is Ctrl-Shift-F one of the keyboard shortcuts handled by the desktop in your configuration? Does Ctrl-Shift-F work as a shortcut in other applications? Colin From michael at freepascal.org Fri Nov 15 11:42:24 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 15 Nov 2019 11:42:24 +0100 (CET) Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: <9a3c2e3c-5255-4985-18d5-927842176639@c-m-w.me.uk> References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> <9a3c2e3c-5255-4985-18d5-927842176639@c-m-w.me.uk> Message-ID: On Fri, 15 Nov 2019, C Western via lazarus wrote: > On 13/11/2019 21:00, Florian Klämpfl via lazarus wrote: >> Recently, I tried again to work with Linux Mint when developing FPC. >> For FPC development I use normally lazarus from trunk, typical updated >> very few weeks. For navigation in the code I use "Find in files" from >> time to time, e.g. when looking where a certain internal error is >> thrown. I call the Find in files dialog by Ctrl-Shift-F. Sometimes, >> this action crashes Cinnamon completely: mouse still works but nothing >> is clickable anymore (Ctrl-Alt-Fx still works so the kernel is >> apparently still fine). Often, Ctrl-Alt-Esc can be used to restart >> Cinnamon after some time, sometimes Cinnamon de-freezes after some >> second and shows a dialog box that it crashed, restarted and is now in >> safe mode (or how it is called). The most annoying part of these >> crashes is that all windows are moved to the first virtual desktop >> besides that the fact that sometimes only a reboot helps to recover. It's called "Fallback mode", see below how I know this :-) >> >> Does anybody have an idea where this could come from or how I could >> track this down (and no, the normal answer one gets when asking such >> things about linux that I should try KDE or Gnome or any other of the >> umpteen desktops, is not a solution). > It sounds like a bug in the desktop but: > > Is Ctrl-Shift-F one of the keyboard shortcuts handled by the desktop in > your configuration? Does Ctrl-Shift-F work as a shortcut in other > applications? I have the same problems with Cinnamon. It is not only "Find in Files" that triggers this. A simple debug tooltip (when inspecting a value) can also trigger it. I have it most often when debugging. I have learned to live with it, and Cinnamon runs most of the time in fallback mode, and even so it restarts every so often. Just as Florian, from time to time I must even switch to a plain text console (CTRL-ALT-F1 or so) and kill X, but this is rare. The crash and switch to 'fallback mode' ("restart fallback mode" would be better named) happens easily once a day. I'd try using linux mint "mate", but I'm not particularly looking forward to reconfiguring my machine. It takes days to get everything in working order again... I'd like to report it to the Cinnamon maintainers, but have no clue how to report it, since it happens reliably, but unfortunately 'randomly' in the sense that I don't yet have a definite sequence of actions that triggers it. If there are any tips how I can somehow get a trace to the Cinnamon maintainers, then I would appreciate it. Michael. From nc-gaertnma at netcologne.de Fri Nov 15 18:36:24 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 15 Nov 2019 18:36:24 +0100 Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> <9a3c2e3c-5255-4985-18d5-927842176639@c-m-w.me.uk> Message-ID: <20191115183624.26a70e9a@limapholos.matflo.wg> On Fri, 15 Nov 2019 11:42:24 +0100 (CET) Michael Van Canneyt via lazarus wrote: >[...] > I have the same problems with Cinnamon. It is not only "Find in > Files" that triggers this. A simple debug tooltip (when inspecting a > value) can also trigger it. Does an old Lazarus has this problem too? Can you find out which revision? Mattias From michael at freepascal.org Fri Nov 15 18:43:22 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 15 Nov 2019 18:43:22 +0100 (CET) Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: <20191115183624.26a70e9a@limapholos.matflo.wg> References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> <9a3c2e3c-5255-4985-18d5-927842176639@c-m-w.me.uk> <20191115183624.26a70e9a@limapholos.matflo.wg> Message-ID: On Fri, 15 Nov 2019, Mattias Gaertner via lazarus wrote: > On Fri, 15 Nov 2019 11:42:24 +0100 (CET) > Michael Van Canneyt via lazarus wrote: > >> [...] >> I have the same problems with Cinnamon. It is not only "Find in >> Files" that triggers this. A simple debug tooltip (when inspecting a >> value) can also trigger it. > > Does an old Lazarus has this problem too? Can you find out which > revision? I have always had this problem, ever since I switched to linux mint, which goes back to version 16, I think. I don't know what the lazarus version was at that point. 1.x series, I suppose. Michael. From mailinglists at geldenhuys.co.uk Fri Nov 15 19:43:14 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 15 Nov 2019 18:43:14 +0000 Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> <9a3c2e3c-5255-4985-18d5-927842176639@c-m-w.me.uk> Message-ID: On 15/11/2019 10:42 am, Michael Van Canneyt via lazarus wrote: > The crash and switch to 'fallback mode' ("restart fallback mode" would be better named) > happens easily once a day. > > I'd try using linux mint "mate", but I'm not particularly looking forward to > reconfiguring my machine. It takes days to get everything in working order > again... I remember experiencing that too, and that drove me away from using Cinnamon. In the end I went for something that is as minimal as possible, so it doesn't interfere with any debugging or software shortcuts etc. I decided to moving back to good old X11 window managers, not desktop environments. I settled on JWM (Joe's Window Manager) and have stuck with it for near 5 years now. It stays out of my way, it only occupies 2 or 3 keyboard shortcuts (which I configured) and only uses 8-15MB of RAM. But yes, I feel your pain in having to set up a new system, or reconfiguring a desktop environment to what you are comfortable with. We are creatures of habit, and don't like change! :-) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From lazarus at kluug.net Fri Nov 15 21:29:10 2019 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 15 Nov 2019 21:29:10 +0100 Subject: [Lazarus] ProjectGroups: fixed LPG XML structure Message-ID: Hello, I just fixed the XML structure of LPG project group files. Old files will be loaded correctly but the new LPG file cannot be opened in a legacy Lazarus installation. AFAIK project groups are usable only in trunk so this does not matter (?) Otherwise we would need some legacy option checkbox like it is in the LPI project files. Ondrej From nc-gaertnma at netcologne.de Fri Nov 15 21:53:48 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 15 Nov 2019 21:53:48 +0100 Subject: [Lazarus] ProjectGroups: fixed LPG XML structure In-Reply-To: References: Message-ID: <20191115215348.4a711e9a@limapholos.matflo.wg> On Fri, 15 Nov 2019 21:29:10 +0100 Ondrej Pokorny via lazarus wrote: > Hello, > > I just fixed the XML structure of LPG project group files. What was the bug? > Old files > will be loaded correctly but the new LPG file cannot be opened in a > legacy Lazarus installation. > > AFAIK project groups are usable only in trunk so this does not matter > (?) Otherwise we would need some legacy option checkbox like it is in > the LPI project files. Don't forget to add it to https://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes Mattias From florian at freepascal.org Fri Nov 15 21:58:50 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Fri, 15 Nov 2019 21:58:50 +0100 Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> <9a3c2e3c-5255-4985-18d5-927842176639@c-m-w.me.uk> Message-ID: Am 15.11.19 um 19:43 schrieb Graeme Geldenhuys via lazarus: > On 15/11/2019 10:42 am, Michael Van Canneyt via lazarus wrote: >> The crash and switch to 'fallback mode' ("restart fallback mode" would be better named) >> happens easily once a day. >> >> I'd try using linux mint "mate", but I'm not particularly looking forward to >> reconfiguring my machine. It takes days to get everything in working order >> again... > > I remember experiencing that too, and that drove me away from using > Cinnamon. I'll see if the xsession_error log brings something up. > In the end I went for something that is as minimal as > possible, so it doesn't interfere with any debugging or software > shortcuts etc. I decided to moving back to good old X11 window managers, > not desktop environments. I settled on JWM (Joe's Window Manager) and > have stuck with it for near 5 years now. It stays out of my way, it only > occupies 2 or 3 keyboard shortcuts (which I configured) and only uses > 8-15MB of RAM. Feels like a discussion from 1998 :) From lazarus at kluug.net Fri Nov 15 22:09:29 2019 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 15 Nov 2019 22:09:29 +0100 Subject: [Lazarus] ProjectGroups: fixed LPG XML structure In-Reply-To: <20191115215348.4a711e9a@limapholos.matflo.wg> References: <20191115215348.4a711e9a@limapholos.matflo.wg> Message-ID: On 15.11.2019 21:53, Mattias Gaertner via lazarus wrote: > On Fri, 15 Nov 2019 21:29:10 +0100 > Ondrej Pokorny via lazarus wrote: > >> Hello, >> >> I just fixed the XML structure of LPG project group files. > What was the bug? 1.) The elements were not placed within the element. 2.) I updated the structure like I did for the LPI files: https://bugs.freepascal.org/view.php?id=22752 >> Old files >> will be loaded correctly but the new LPG file cannot be opened in a >> legacy Lazarus installation. >> >> AFAIK project groups are usable only in trunk so this does not matter >> (?) Otherwise we would need some legacy option checkbox like it is in >> the LPI project files. > Don't forget to add it to > https://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes Thanks for the reminder. I'll update the page about both LPG and LPI files. Ondrej From bo.berglund at gmail.com Sat Nov 16 08:48:43 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 16 Nov 2019 08:48:43 +0100 Subject: [Lazarus] Why is setlength not allowed? Message-ID: <6s9vse1aqv12ulpplhbft80fe8ltdh2706@4ax.com> I am trying to write a simple I2C interface program for Raspberry Pi but I am getting an error I don't understand... function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; buf: array of byte): integer; var i: integer; begin try if count <> length(buf) then SetLength (buf, count); <== ERROR HERE! for i := 0 to count -1 do buf[i] := ReadI2CByte(addr + i); Result := count; except Result := 0; end; end; The error message states: rpii2ccomm.pas(158,7) Error: Type mismatch I have used setlength on dynamic byte arrays many times before and never gotten this strange error message. What am I doing wrong??? I have tried declaring buf as var in the call but it does not help. (addr: integer; count: integer; var buf: array of byte): integer; The same error happens. Must be something basic I have missed. Lazarus placed this at the top of the unit when I created it, if that matters: {$mode objfpc}{$H+} Using FPC 3.0.4 and Lazarus 2.0.6 on Raspbian Buster -- Bo Berglund Developer in Sweden From mailinglists at geldenhuys.co.uk Sat Nov 16 08:49:13 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 16 Nov 2019 07:49:13 +0000 Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> <9a3c2e3c-5255-4985-18d5-927842176639@c-m-w.me.uk> Message-ID: On 15/11/2019 8:58 pm, Florian Klämpfl via lazarus wrote: > Feels like a discussion from 1998 :) :-) True. JWM is still being maintained though, so it's not abandon-ware. Nothing wrong with good old X11 Window Managers. As somebody pointed out to me recently.... Of everything mankind has created, software is the only thing that doesn't decay over time. So there is nothing wrong with running "old" software either - if it gives the functionality you need. On a side note: Not that I restart my system or UI much, but it is awesome seeing my UI fully loaded near instantly after I type 'startx'. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From bo.berglund at gmail.com Sat Nov 16 09:10:07 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 16 Nov 2019 09:10:07 +0100 Subject: [Lazarus] Lazarus code editor improvement? References: <0c4rre9vi7o94gd929hc4pjh491qu6u4qj@4ax.com> <2c6rre9vdu3u8km12jbd66iurci5m64hlt@4ax.com> <26a85f01-1a60-08e9-9a81-3187a382f870@mfriebe.de> <7cc30530-ec0a-792f-402c-d4a99fa4e845@Joepgen.com> Message-ID: On Sun, 3 Nov 2019 13:31:21 +0100, Joe via lazarus wrote: >> So indeed it is connected with VNC, but it also is connected with >> Lazarus' code editor window. It seems like this is the only affected >> window on the RPi, all others accept the composition key AltGr as part >> of entering a special char. >> >> I cannot use the direct connection, though, because I am heavily >> depending on being able to copy stuff across between the two systems >> and I also need to have access to my other tools on the Windows >> computer. So I have to stick with VNC anyway and work around the >> problem. >> >> And back again to Lazarus 2.0.6... >> >> > >Please look at  issue 0030544 on https://bugs.freepascal.org. If I >remember correctly, Mattias eventually found the reason and fixed it. >Don't know why the problerm rearises... I had to revisit this issue and found the bugtracker mention above. It turns out that using Ctrl-Alt as a compose key combination instead of AltGr I get the correct characters also in a RealVNC connection to the RPi where Lazarus is running. Tested these: [ ] { } | $ € \ ~ @ £ The Lazarus code editor switches me to the tab next left when I use AltGr so all I enter afterwards gets into the wrong file... I just have to remember NOT to use AltGr in the Lazarus code editor when working through VNC in the future.... -- Bo Berglund Developer in Sweden From michael at freepascal.org Sat Nov 16 09:20:28 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 16 Nov 2019 09:20:28 +0100 (CET) Subject: [Lazarus] Why is setlength not allowed? In-Reply-To: <6s9vse1aqv12ulpplhbft80fe8ltdh2706@4ax.com> References: <6s9vse1aqv12ulpplhbft80fe8ltdh2706@4ax.com> Message-ID: On Sat, 16 Nov 2019, Bo Berglund via lazarus wrote: > I am trying to write a simple I2C interface program for Raspberry Pi > but I am getting an error I don't understand... > > function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; buf: > array of byte): integer; > var > i: integer; > begin > try > if count <> length(buf) then > SetLength (buf, count); <== ERROR HERE! > for i := 0 to count -1 do > buf[i] := ReadI2CByte(addr + i); > Result := count; > except > Result := 0; > end; > end; > > The error message states: > > rpii2ccomm.pas(158,7) Error: Type mismatch > > I have used setlength on dynamic byte arrays many times before and > never gotten this strange error message. > What am I doing wrong??? Because buf is not a dynamic array, but an open array. "Open array" predates dynamic arrays, and served to be able to pass fixed-lengh arrays of different lengths to a single function, so you would not have to declare the same function for all array lengths. function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; buf: array of byte): integer; Means you can do type T10BytesArray = Array[1..10]; T100BytesArray = Array[1..100]; var A10 : T10BytesArray; A100 : T100BytesArray; begin ReadI2CBytes(1,10,A10); ReadI2CBytes(1,100,A100); end; What you need is: TByteArray = Array of Byte; function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; var buf: TByteArray): integer; Michael. From juha.manninen62 at gmail.com Sat Nov 16 10:31:06 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 16 Nov 2019 11:31:06 +0200 Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> Message-ID: Find in Files has some problem although it has not frozen the whole desktop earlier. There was a report from Jonas years ago: https://bugs.freepascal.org/view.php?id=24351 but it could not be reproduced and was finally resolved. There is also a more recent report: https://bugs.freepascal.org/view.php?id=29925 Now I realized its backtrace mentions "exttools.pas". It may be related to this new report about LazBuild: https://bugs.freepascal.org/view.php?id=36318 where the bug is in external tool thread synchronization. I have another problem with Find in Files sometimes. The dialog gets wrong initial text. See: https://bugs.freepascal.org/view.php?id=34254 It may well be related because it happens so randomly. Juha From bo.berglund at gmail.com Sat Nov 16 10:45:56 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 16 Nov 2019 10:45:56 +0100 Subject: [Lazarus] Why is setlength not allowed? References: <6s9vse1aqv12ulpplhbft80fe8ltdh2706@4ax.com> Message-ID: On Sat, 16 Nov 2019 09:20:28 +0100 (CET), Michael Van Canneyt via lazarus wrote: > > >On Sat, 16 Nov 2019, Bo Berglund via lazarus wrote: > >> I am trying to write a simple I2C interface program for Raspberry Pi >> but I am getting an error I don't understand... >> >> function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; buf: >> array of byte): integer; >> var >> i: integer; >> begin >> try >> if count <> length(buf) then >> SetLength (buf, count); <== ERROR HERE! >> for i := 0 to count -1 do >> buf[i] := ReadI2CByte(addr + i); >> Result := count; >> except >> Result := 0; >> end; >> end; >> >> The error message states: >> >> rpii2ccomm.pas(158,7) Error: Type mismatch >> >> I have used setlength on dynamic byte arrays many times before and >> never gotten this strange error message. >> What am I doing wrong??? > >Because buf is not a dynamic array, but an open array. > >"Open array" predates dynamic arrays, and served to be able to pass >fixed-lengh arrays of different lengths to a single function, so you would >not have to declare the same function for all array lengths. > >function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; buf: array of byte): integer; > >Means you can do >type > T10BytesArray = Array[1..10]; > T100BytesArray = Array[1..100]; > >var > A10 : T10BytesArray; > A100 : T100BytesArray; > >begin > ReadI2CBytes(1,10,A10); > ReadI2CBytes(1,100,A100); >end; > >What you need is: > > TByteArray = Array of Byte; > > function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; var buf: TByteArray): integer; > Thanks so much! Now working. But I have another issue, a warning from the compiler: function InitI2cDevice(devpath: String; iDevAddr: Cint; var hInst: Integer): Integer; var iio : integer; begin try hInst := fpopen(devpath, O_RDWR); //Open the I2C bus in Read/Write mode iio := FpIOCtl(hInst, I2C_SLAVE, Pointer(iDevAddr)); //Set options if (iio = 0) and (hInst > 0) then Result := hInst else Result := -1; except Result := -1; end; end; In this case I get a warning: rpii2ccomm.pas(80,38) Hint: Conversion between ordinals and pointers is not portable It is on the line: iio := FpIOCtl(hInst, I2C_SLAVE, Pointer(iDevAddr)); I guess that the reason is that fpIoCtrl expects a pointer type variable so the typecast is done... Is there no alternative? (As you might suspect I am trying to adapt code found on the Internet in my unit for I2C communication....) -- Bo Berglund Developer in Sweden From michael at freepascal.org Sat Nov 16 11:50:45 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 16 Nov 2019 11:50:45 +0100 (CET) Subject: [Lazarus] Why is setlength not allowed? In-Reply-To: References: <6s9vse1aqv12ulpplhbft80fe8ltdh2706@4ax.com> Message-ID: On Sat, 16 Nov 2019, Bo Berglund via lazarus wrote: > function InitI2cDevice(devpath: String; iDevAddr: Cint; var hInst: > Integer): Integer; > var > iio : integer; > begin > try > hInst := fpopen(devpath, O_RDWR); //Open the > I2C bus in Read/Write mode > iio := FpIOCtl(hInst, I2C_SLAVE, Pointer(iDevAddr)); //Set > options > if (iio = 0) and (hInst > 0) then > Result := hInst > else > Result := -1; > except > Result := -1; > end; > end; > > In this case I get a warning: > rpii2ccomm.pas(80,38) Hint: Conversion between ordinals and pointers > is not portable > > It is on the line: > iio := FpIOCtl(hInst, I2C_SLAVE, Pointer(iDevAddr)); > > I guess that the reason is that fpIoCtrl expects a pointer type > variable so the typecast is done... Is there no alternative? The warning seems correct. I suspect Pointer(iDevAddr) is probably wrong. Maybe Pointer(@iDevAddr)) is needed. I would need to see the original code. Michael. From bo.berglund at gmail.com Sun Nov 17 08:05:18 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 17 Nov 2019 08:05:18 +0100 Subject: [Lazarus] Why is setlength not allowed? References: <6s9vse1aqv12ulpplhbft80fe8ltdh2706@4ax.com> Message-ID: On Sat, 16 Nov 2019 11:50:45 +0100 (CET), Michael Van Canneyt via lazarus wrote: >> I guess that the reason is that fpIoCtrl expects a pointer type >> variable so the typecast is done... Is there no alternative? > >The warning seems correct. I suspect Pointer(iDevAddr) is probably wrong. >Maybe Pointer(@iDevAddr)) is needed. I would need to see the original code. > I created my code by studying this on github: https://github.com/tmssoftware/TMS-LCL-HW-Pack-for-Raspberry-Pi/blob/master/tmslclraspihw.pas The "pointer" is on line 143 In any case it seems like it is working right now in real life. I can read and write the i2c EEPROM device on my Raspberry Pi4. And if the warning relates to porting this code to other platforms it does not matter since it is destined for the RPi hardware and will not be ported... -- Bo Berglund Developer in Sweden From michael at freepascal.org Sun Nov 17 11:24:54 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 17 Nov 2019 11:24:54 +0100 (CET) Subject: [Lazarus] Find in files crashes Cinnamon In-Reply-To: References: <2a94eb9c-3df4-28cf-36b3-0158f3025a8f@freepascal.org> Message-ID: On Sat, 16 Nov 2019, Juha Manninen via lazarus wrote: > Find in Files has some problem although it has not frozen the whole > desktop earlier. There was a report from Jonas years ago: > https://bugs.freepascal.org/view.php?id=24351 > but it could not be reproduced and was finally resolved. > There is also a more recent report: > https://bugs.freepascal.org/view.php?id=29925 > Now I realized its backtrace mentions "exttools.pas". It may be > related to this new report about LazBuild: > https://bugs.freepascal.org/view.php?id=36318 > where the bug is in external tool thread synchronization. > > I have another problem with Find in Files sometimes. The dialog gets > wrong initial text. See: > https://bugs.freepascal.org/view.php?id=34254 > It may well be related because it happens so randomly. This is part of the xsession errors just before a Cinnamon crash yesterday: Cinnamon warning: Log level 8: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed Cinnamon warning: Log level 8: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed Cinnamon warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x4e954c9 (Debugger E) Gtk-Message: 11:20:41.193: GtkDialog mapped without a transient parent. This is discouraged. (metacity:30763): metacity-WARNING **: 11:20:41.402: Invalid WM_TRANSIENT_FOR window 0x4e077ae specified for 0x4e00099 (Lazarus IDE v2.1.0 - testfprep). (metacity:30763): metacity-WARNING **: 11:20:41.412: Invalid WM_TRANSIENT_FOR window 0x4e000ea specified for 0x4e000ca (Object Inspector). (metacity:30763): metacity-WARNING **: 11:20:41.427: Invalid WM_TRANSIENT_FOR window 0x4e01a00 specified for 0x4e000f2 (Messages). (nm-applet:28283): Gdk-CRITICAL **: 11:20:41.506: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed The crash happened when a debug breakpoint was hit. Maybe this is of some help to debug the issue. Michael. From pascaldragon at googlemail.com Sun Nov 17 14:06:20 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 17 Nov 2019 14:06:20 +0100 Subject: [Lazarus] RFC: Selection Editors to extend handling of object inspector selections In-Reply-To: References: Message-ID: Am 10.11.2019 um 22:26 schrieb Sven Barth: > Hello together! > > I've got a RFC for a feature that allows to extend the IDE. It's based > on something that Delphi supports as well: Selection Editors. > Unlike Component Editors these are supposed to be used to interact > with a specific selection in the designer and (in Delphi) allow the > following extensions: > - adding menu items for the context menu for the selection (like > component editors) > - add additional units when the component is dropped onto the form > (though I wonder why that isn't part of component editors) > - add or remove properties to/from the object inspector for the selection > > My current RFC only implements the last one and also a bit different > than Delphi does cause they added that functionality only later (see > below). > > Due to their dependencies Selection Editors live in the PropEdits unit > and like component and property editors they are registered at an > approbriate location (be it some Register function or a unit > initialization). When the object inspector requests the properties it > also checks all selection editors involved in the selection (included > the parent classes) and calls the selection editor's FilterProperties > method if GetAttributes contains seaFilterProperties (Delphi does not > provide a GetAttributes method, instead it provides FilterProperties > through an interface that needs to be implemented by a selection editor). > FilterProperties receives both the current selection of the object > inspector as well as the list of property editors. It is then free to > add or remove property editors as it sees fit. > The behavior when collecting the property editors is such that > multiple FilterProperties methods might be called on the same > selection, thus it might received an already filtered property editor > list. > > I've attached a patch that implements selection editors > (selection-editors.patch) as well as an example implementation for a > component that Lazarus already supports and Delphi provides a > selection editor for: TFlowPanel (tflowpanel-seledit.patch). For that > component for each child control a virtual ControlIndex property is > exposed which allows to easily change the order of the components in > the object inspector instead of going through some collection editor. > Also the Top and Left properties are removed as they aren't useful for > such components. Delphi behaves the same here. > > Another example use would be TGridPanel which we don't have yet: it > allows to implement the Row- and ColumnSpan properties on each child > control of the panel. > > To work correctly I also had to adjust the object inspector a little > bit (respect-parevertable.patch), cause it is not using only the > virtual functions provided by TPropertyEditor: namely to respect the > paRevertable attribute and only initialize and use the undo values if > the property is deemed revertable. For demonstration purposes I've > disabled the paRevertable attribute for the ControlIndex property > editor, cause otherwise there'd be an exception when the object > inspector tries to read the original value. It would be better if the > object inspector would only call virtual methods of TPropertyEditor > however or ones that can be easily faked (like I did by faking a > TPropInfo entry, though that does not feel really nice either). > > Suggestions and criticism are welcome though I can't tell how much > time I currently can and want to invest to improve this further. It > might also need some step-by-step improvement of the existing > TPropertyEditor interface to function smoothly. Really? No further interest here? I don't want to put it on Mantis yet, because I'm not yet sure whether everything is alright and Mantis is not a discussion platform... Regards, Sven From bo.berglund at gmail.com Wed Nov 20 18:14:07 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 20 Nov 2019 18:14:07 +0100 Subject: [Lazarus] Installer/uninstaller on Linux for fpc/lazarus programs? Message-ID: I am wondering how exactly I should package the program I am developing for Raspberry Pi so it can be uniformly installed and uninstalled on new RPi units... It is an Arm binary for RPi3 or Rpi4 type units running Raspbian Buster. So I could stuff the binary into /usr/bin I suppose, but it also needs a config file (below /etc, right?) and some data files which go into a new directory tree somewhere (where?). The dir (which needs to be created) shall be populated with some example files and such. And this is a pure command line application meant to be run from cron or possibly as a service. Not sure yet. On Windows for my previous Delphi applications I used InnoSetup but that is not valid on Linux of course. My aim is to get a way to install which will help the production and service people when we move away from using Windows PC as a platform. Needless to say I am not so familiar with everyday use/maintenance of Linux computers. I have only used RPi boxes for dev work and experimentation so far.... Or should I simply write some FPC command line utility to do the job? Or maybe an install script and put that into a tgz file? What do people normally do? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Wed Nov 20 19:11:02 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 20 Nov 2019 19:11:02 +0100 Subject: [Lazarus] How to deploy fpc/lazarus programs on Linux? Message-ID: Posting again since I think that by selection of subject was not wise the fisrt time, using words that might trigger scanners... My post did not come through. Anyway: I am wondering how exactly I should package the program I am developing for Raspberry Pi so it can be uniformly installed and uninstalled on Raspberry Pi units... The program is an Arm binary for RPi3 or Rpi4 type units running Raspbian Buster. So I could stuff the binary into /usr/bin I suppose, but it also needs a config file (below /etc, right?) and some data files which go into a new directory tree somewhere (where?). The dir (which needs to be created) shall be populated with some example files and such. And this is a pure command line application meant to be run from cron or possibly as a service. Not sure yet. On Windows for my previous Delphi applications I used InnoSetup but that is not valid on Linux of course. My aim is to get a way to install which will help the production and service people when we move away from using Windows PC as a platform for automation. Needless to say I am not so familiar with everyday use/maintenance of Linux computers. I have only used RPi boxes for dev work (fpc/lazarus) and experimentation so far.... Or should I simply write some FPC command line utility to do the job? Or maybe an install shellscript and put that into a tgz file? What do people normally do? -- Bo Berglund Developer in Sweden From ryansmithhe at gmail.com Wed Nov 20 19:19:45 2019 From: ryansmithhe at gmail.com (R Smith) Date: Wed, 20 Nov 2019 20:19:45 +0200 Subject: [Lazarus] Cross-compile for Linux strange behaviour with floating point constants Message-ID: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> Hi All, I'm a long time Lazarus user (since Kylix failed) and a big fan. This is however my first post on any FPC/Lazarus forum. The problem I've run into is a simple program (made in Lazarus) where I use floating point constants. It compiles and runs perfectly on Windows, but when cross-compiling for Linux, it fails for specific floating point values. I realise immediately that, if this is a bug, it's probably an FPC bug and not Lazarus specific, but the problem is so obviously wrong, I'm thinking it cannot possibly be a compiler bug, and since I am cross-compiling from Lazarus, figured I would start asking here and rule out the obvious things first. 1. My Setup: Fresh install of Lazarus IDE (SVN Revision 60307 - previous install also had the problem, so I updated) with FPC 3.04 installed on Windows 10 64bit (x86_64-win64) via fpcupdeluxe with compilers for Windows x86_64 and for Linux x86_64.  I run WSL Ubuntu 19.4 and also 18.4 in a VM and CentOS7 (because web), and a Linux Mint on my laptop, all of which get the same error. It compiles and runs perfectly correct in/for Windows. 2. Test case Program: --------------------------------------------------- program fpbug; // {$mode objfpc}{$H+} uses   Classes, SysUtils, Crt; // {$R *.res} var   x: double; begin   // Successful Test:  (Win64 + Linux)   WriteLn('');   WriteLn('Setting Variable: x := 0.5; ');   x := 0.5;   WriteLn('FloatToStr( x )    --> ',FloatToStr(x));   WriteLn('FloatToStr( 0.5 )  --> ',FloatToStr(0.5));   // Failing Test:     (Win64 Pass,  Linux Fail (Ubuntu LTS)   WriteLn('');   WriteLn('Setting Variable: x := 0.35; ');   x := 0.35;   WriteLn('FloatToStr( x )    --> ',FloatToStr(x));   WriteLn('FloatToStr( 0.35 ) --> ',FloatToStr(0.35)); end. ---------------------------------------------- I compile with standard debug options first, then production options (both Windows and Linux with CPU family x86_64 and target Processor Default)  and had an exhaustive run of enabling/disabling every compiler switch available in the standard Lazarus "Compilation and Linking" settings - all to no avail, the problem persists. 3. Windows console Output: C:\Projects\[LAZARUS]\Temp\ConsoleAppTest>dir /w  Volume in drive C has no label.  Volume Serial Number is C234-0116  Directory of C:\Projects\[LAZARUS]\Temp\ConsoleAppTest [.]          [..]         [backup]     fpbug        fpbug.dbg fpbug.exe    fpbug.lpi    fpbug.lpr    fpbug.lps fpbug.res    fptest       fptest.dbg   fptest.exe   fptest.lpi fptest.lpr   fptest.lps   fptest.res   [lib] rc           rc.exe       rc.lpi       rc.lpr       rc.lps               19 File(s)      2 547 273 bytes                4 Dir(s)  88 585 740 288 bytes free C:\Projects\[LAZARUS]\Temp\ConsoleAppTest>fpbug Setting Variable: x := 0.5; FloatToStr( x )    --> 0.5 FloatToStr( 0.5 )  --> 0.5 Setting Variable: x := 0.35; FloatToStr( x )    --> 0.35 FloatToStr( 0.35 ) --> 0.35 C:\Projects\[LAZARUS]\Temp\ConsoleAppTest> 4. Linux console Output: cuzzy at CUZ-PC64:~/temp/ConsoleAppTest$ ls backup  fpbug.dbg  fpbug.lpi  fpbug.lps  fptest fptest.exe  fptest.lpr  fptest.res  rc      rc.lpi  rc.lps fpbug   fpbug.exe  fpbug.lpr  fpbug.res  fptest.dbg fptest.lpi  fptest.lps  lib         rc.exe  rc.lpr cuzzy at CUZ-PC64:~/temp/ConsoleAppTest$ ./fpbug Setting Variable: x := 0.5; FloatToStr( x )    --> 0.5 FloatToStr( 0.5 )  --> 0.5 Setting Variable: x := 0.35; FloatToStr( x )    --> 0.35 FloatToStr( 0.35 ) --> Nan cuzzy at CUZ-PC64:~/temp/ConsoleAppTest$ As the comments indicate, if I use the constant value 0.5 inside almost any function that takes a float (Double, Extended, Real, whatever), it works, both in Windows and Linux. If I use the value 0.35 (or 0.66667 or 0.333333 - seemingly any number that has a non-exact round-trip IEEE754 representation, but this is merely a guess, no exhaustive testing) then in Windows on x86-64 it still works as expected, but on any Linux version, it returns NaN (as in my code example) or segfaults or such. It is perfectly happy for me to assign the value to a variable and then use the variable (x in the example), but when I use the value directly, the skullduggery starts. Tested functions (they all fail for a constant like 0.35): FloatToStr(), Trunc(), Round(), Ceil(), Floor() Is there something I can check on my side? Does this work for others?  Might this be a cross-compile bug of sorts?  Is this some FPC, FPU or Linux peculiarity I'm not aware of? Any help or insight would be appreciated - thanks, Cuz From michael at freepascal.org Sat Nov 23 11:12:40 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 23 Nov 2019 11:12:40 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE Message-ID: Hello, I would like to announce a small poll. Context: Web (runtime) applications are abundant. At my company, desktop is only considered as a last resource (but use cases vary, obviously). Today, you perfectly can program the web (browser) using FPC's pas2js. Using pas2js it is also possible to develop VS Code, Atom plugins or Electron applications. This week in Be.Delphi, (and last week in DüsselDorf, Germany) TMS Software has unveiled a VS Code plugin: an Object Pascal RAD IDE. It is based on TMS Web Core, which uses pas2js and the free OmniPascal plugin to give a RAD experience in VS Code. That means that effectively, you can do your development in the cloud with the VS Code web version. Further integration of this VS Code plugin with FPC can be expected. This will mean that soon, you'll be able to do full stack development in VS Code using object pascal. (or any other language, since VS Code is language agnostic) This has raised the question whether a dedicated Object Pascal IDE - such as the Lazarus IDE - is still a necessity. Various avenues can be explored. Since I am a firm believer in 'Measuring is knowing', I have created a poll: https://forms.gle/c3QD82UBa3KW6nMz9 Please give your opinion there. It's just 1 question so it won't take long. Cross-posted on the lazarus forum, feel free to forward to relevant channels... Michael. From genericptr at gmail.com Sat Nov 23 23:12:14 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Sat, 23 Nov 2019 17:12:14 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: > On Nov 23, 2019, at 5:12 AM, Michael Van Canneyt via lazarus wrote: > > This will mean that soon, you'll be able to do full stack development in VS > Code using object pascal. (or any other language, since VS Code is language agnostic) > > This has raised the question whether a dedicated Object Pascal IDE - such as > the Lazarus IDE - is still a necessity. Various avenues can be explored. > > Since I am a firm believer in 'Measuring is knowing', I have created a poll: > > https://forms.gle/c3QD82UBa3KW6nMz9 The question whether Lazarus should be remade as an Electron style app? Do you mean the IDE or all the API/widgets? I've been using Sublime Text for years but we lack good language server support. Omni Pascal offers this for VSCode but I don't see it's open source so I'm making my own language server when time allows. Lazarus is a buggy and cumbersome program but I don't see how remaking it in Electron/pas2js would be a better idea when we have these good alternatives like VScode/Sublime Text Regards, Ryan Joseph From michael at freepascal.org Sat Nov 23 23:26:46 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 23 Nov 2019 23:26:46 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sat, 23 Nov 2019, Ryan Joseph via lazarus wrote: > > >> On Nov 23, 2019, at 5:12 AM, Michael Van Canneyt via lazarus wrote: >> >> This will mean that soon, you'll be able to do full stack development in VS >> Code using object pascal. (or any other language, since VS Code is language agnostic) >> >> This has raised the question whether a dedicated Object Pascal IDE - such as >> the Lazarus IDE - is still a necessity. Various avenues can be explored. >> >> Since I am a firm believer in 'Measuring is knowing', I have created a poll: >> >> https://forms.gle/c3QD82UBa3KW6nMz9 > > The question whether Lazarus should be remade as an Electron style app? Do you mean the IDE or all the API/widgets? The IDE. That implies the API/Widgets. > > I've been using Sublime Text for years but we lack good language server support. Omni Pascal offers this for VSCode but I don't see it's open source so I'm making my own language server when time allows. I don't think it's open source. It's free, for the moment. > > Lazarus is a buggy and cumbersome program but I don't see how remaking it in Electron/pas2js would be a better idea when we have these good alternatives like VScode/Sublime Text Hence the last option: use the codetools and designer to implement RAD features in VS Code. I must say I am shocked to read you consider Lazarus "buggy and cumbersome". In my experience it's way better than Delphi as an object pascal IDE. I'm generally more productive in Lazarus than in Delphi, due to the superior code tools. Michael. From genericptr at gmail.com Sat Nov 23 23:35:13 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Sat, 23 Nov 2019 17:35:13 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: > On Nov 23, 2019, at 5:26 PM, Michael Van Canneyt via lazarus wrote: > > The IDE. That implies the API/Widgets. One of the reasons like Lazarus is because it's native right? I use VSCode for the debugger but I don't like it's a slow and mushy feeling web app. Native is not compatible imo. > >> >> I've been using Sublime Text for years but we lack good language server support. Omni Pascal offers this for VSCode but I don't see it's open source so I'm making my own language server when time allows. > > I don't think it's open source. It's free, for the moment. Then we need to make our own language server and plugins for FPC. My personal preference would be for the FPC team to support some official plugins for popular editors like VSCode/Sublime Text. I do all that stuff myself and it takes lots of time and I don't always do a great job. ;) > >> >> Lazarus is a buggy and cumbersome program but I don't see how remaking it in Electron/pas2js would be a better idea when we have these good alternatives like VScode/Sublime Text > > Hence the last option: use the codetools and designer to implement RAD > features in VS Code. > > I must say I am shocked to read you consider Lazarus "buggy and cumbersome". > In my experience it's way better than Delphi as an object pascal IDE. I'm > generally more productive in Lazarus than in Delphi, due to the superior > code tools. I've never used Delphi but Lazarus is feels extremely dated compared to moderns IDE's like VSCode (and my personal preference of Sublime Text). The strong point of Lazarus is of course actually understanding Pascal but we do we need it when language agnostic IDE's have grown so much? Regards, Ryan Joseph From freedos.la at gmail.com Sat Nov 23 23:43:27 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Sat, 23 Nov 2019 14:43:27 -0800 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> Well, for me, "the web" is not a viable (sole) option. I still have a lot of use cases where standalone apps on various platforms are a much better option. Trying to shoehorn a web based app on each and every use case just doesn't make sense. Yes, Lazarus isn't "perfect", but for the most part, it has so far done the job for me. Across various platforms (with macOS caveats due to the very nature of that crummy environment). It would  be good to include Pas2JS with the possibility to design web based UIs, it just gives one more option to do everything with one environment/IDE. I personally loath VSCode just as much as VS itself (or XCode, for that matter) or Eclipse. The appeal of Lazarus for me is that it even "feels" Pascal, not just a tool that happens to support ObjectPascal, but just as a sideshow... Ralf From werner.pamler at freenet.de Sat Nov 23 23:44:44 2019 From: werner.pamler at freenet.de (Werner Pamler) Date: Sat, 23 Nov 2019 23:44:44 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: <11c81982-3922-30ee-2397-6138d0e2d319@freenet.de> I am missing the option "No change wanted towards this direction". Without this option the poll is biased. From octopushole at gmail.com Sat Nov 23 23:49:49 2019 From: octopushole at gmail.com (duilio foschi) Date: Sat, 23 Nov 2019 23:49:49 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <11c81982-3922-30ee-2397-6138d0e2d319@freenet.de> References: <11c81982-3922-30ee-2397-6138d0e2d319@freenet.de> Message-ID: > I am missing the option "No change wanted towards this direction". > Without this option the poll is biased. this is my humble opinion, too From michael at freepascal.org Sat Nov 23 23:51:23 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 23 Nov 2019 23:51:23 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <11c81982-3922-30ee-2397-6138d0e2d319@freenet.de> References: <11c81982-3922-30ee-2397-6138d0e2d319@freenet.de> Message-ID: On Sat, 23 Nov 2019, Werner Pamler via lazarus wrote: > I am missing the option "No change wanted towards this direction". > Without this option the poll is biased. That is the first option: Remain an independent IDE. Having an optional way to edit HTML in a rad way would simply be a plugin. Michael. From michael at freepascal.org Sat Nov 23 23:57:43 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 23 Nov 2019 23:57:43 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sat, 23 Nov 2019, Ryan Joseph via lazarus wrote: > > >> On Nov 23, 2019, at 5:26 PM, Michael Van Canneyt via lazarus wrote: >> >> The IDE. That implies the API/Widgets. > > One of the reasons like Lazarus is because it's native right? I use > VSCode for the debugger but I don't like it's a slow and mushy feeling web > app. Native is not compatible imo. I have no idea. > >> >>> >>> I've been using Sublime Text for years but we lack good language server support. Omni Pascal offers this for VSCode but I don't see it's open source so I'm making my own language server when time allows. >> >> I don't think it's open source. It's free, for the moment. > > Then we need to make our own language server and plugins for FPC. My > personal preference would be for the FPC team to support some official > plugins for popular editors like VSCode/Sublime Text. I do all that stuff > myself and it takes lots of time and I don't always do a great job. ;) We have enough on our plate as-is. >>> Lazarus is a buggy and cumbersome program but I don't see how remaking it in Electron/pas2js would be a better idea when we have these good alternatives like VScode/Sublime Text >> >> Hence the last option: use the codetools and designer to implement RAD >> features in VS Code. >> >> I must say I am shocked to read you consider Lazarus "buggy and cumbersome". >> In my experience it's way better than Delphi as an object pascal IDE. I'm >> generally more productive in Lazarus than in Delphi, due to the superior >> code tools. > > I've never used Delphi but Lazarus is feels extremely dated compared to > moderns IDE's like VSCode (and my personal preference of Sublime Text). Those are editors, not IDEs > The strong point of Lazarus is of course actually understanding Pascal but > we do we need it when language agnostic IDE's have grown so much? Yes, we do, because that is exactly why I am so productive with Lazarus. VS Code, Atom or anything else doesn't even come close to providing all the code tools Lazarus provides, and I've tried lots of plugins. Michael. From michael at freepascal.org Sat Nov 23 23:58:41 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 23 Nov 2019 23:58:41 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <11c81982-3922-30ee-2397-6138d0e2d319@freenet.de> Message-ID: On Sat, 23 Nov 2019, Michael Van Canneyt via lazarus wrote: > > > On Sat, 23 Nov 2019, Werner Pamler via lazarus wrote: > >> I am missing the option "No change wanted towards this direction". >> Without this option the poll is biased. > > That is the first option: Remain an independent IDE. > > Having an optional way to edit HTML in a rad way would simply be a plugin. Hm. I edited the first question to make it more clear, now the poll has an extra result section :( Michael. From genericptr at gmail.com Sun Nov 24 00:02:04 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Sat, 23 Nov 2019 18:02:04 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> Message-ID: > On Nov 23, 2019, at 5:43 PM, Ralf Quint via lazarus wrote: > > I personally loath VSCode just as much as VS itself (or XCode, for that matter) or Eclipse. The appeal of Lazarus for me is that it even "feels" Pascal, not just a tool that happens to support ObjectPascal, but just as a sideshow... Why the hate towards VSCode? I think it feels mushy next to a snappy c++ built app like Sublime Text but I've been really impressed with all the work Microsoft has put in. It feels better for typing than Lazarus does and it looks more modern/tighter. I now us VSCode for my Pascal debugger now even. The plugin system is far ahead of the cryptic system ST uses so I hope those people are paying attention to what VSCode is doing. This is all my perspective as Mac user and I don't admit that Lazarus looks better on Windows and even Linux. Regards, Ryan Joseph From florian at freepascal.org Sun Nov 24 00:11:26 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 24 Nov 2019 00:11:26 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> Message-ID: Am 24.11.19 um 00:02 schrieb Ryan Joseph via lazarus: > > >> On Nov 23, 2019, at 5:43 PM, Ralf Quint via lazarus wrote: >> >> I personally loath VSCode just as much as VS itself (or XCode, for that matter) or Eclipse. The appeal of Lazarus for me is that it even "feels" Pascal, not just a tool that happens to support ObjectPascal, but just as a sideshow... > it looks more modern/tighter. Really? On my linux it has a bright menu, everything else is dark style. Is this considered modern? Even very basic things like Ctrl+Mouse wheel for changing the font size does not work. Maybe this is more modern (like e.g. all those apps which are proud when getting features in 2019 real programs got in the 80th) but I do not want it :) From werner.pamler at freenet.de Sun Nov 24 00:18:03 2019 From: werner.pamler at freenet.de (Werner Pamler) Date: Sun, 24 Nov 2019 00:18:03 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: Once having voted the current results are displayed. But when I want to see later how the poll has evolved I can only vote again -- that's probably not what you intend. Either add a button to display the current results, or don't display results at all until the poll has ended. From luca at wetron.es Sun Nov 24 00:21:53 2019 From: luca at wetron.es (Luca Olivetti) Date: Sun, 24 Nov 2019 00:21:53 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <11c81982-3922-30ee-2397-6138d0e2d319@freenet.de> Message-ID: <6e69b265-80f3-8523-0a82-c7f3259ff724@wetron.es> El 23/11/19 a les 23:58, Michael Van Canneyt via lazarus ha escrit: > > > On Sat, 23 Nov 2019, Michael Van Canneyt via lazarus wrote: > >> >> >> On Sat, 23 Nov 2019, Werner Pamler via lazarus wrote: >> >>> I am missing the option "No change wanted towards this direction". >>> Without this option the poll is biased. >> >> That is the first option: Remain an independent IDE. >> >> Having an optional way to edit HTML in a rad way would simply be a >> plugin. > > Hm. I edited the first question to make it more clear, now the poll has an > extra result section :( Oh, so that's the reason why the 82% of the votes isn't selectable in the poll. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From michael at freepascal.org Sun Nov 24 00:41:49 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 00:41:49 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sun, 24 Nov 2019, Werner Pamler via lazarus wrote: > Once having voted the current results are displayed. But when I want to > see later how the poll has evolved I can only vote again -- that's > probably not what you intend. Either add a button to display the current > results, or don't display results at all until the poll has ended. The results should be visible any time according to the options, but I'm not very knowledgeable about google forms: I'm not a poll expert. So currently I won't touch any of this, because I might break it even more. When I close the poll, I will publish results. In each case, if current trend continues, it's pretty much clear what the general direction is. Not that this came as a big surprise, but as said: "messen heißt wissen" Michael. From dave at haxton.org Sun Nov 24 00:50:07 2019 From: dave at haxton.org (Daithi Haxton) Date: Sat, 23 Nov 2019 18:50:07 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: For my 2 cents, keep Lazarus as an independent, native code IDE. We do instrumentation packages for manufacturing robots, and “the Web” is simply not an option. Laz makes us at least 10x more productive than any other option (and we’ve tried other options - we still maintain code in C++ and C# using VS and it’s a nightmare compared to the Lazarus environment). What really scares us is that all the mainstream OSes are becoming so Web and mobile centric - the way M$ is rumbling I seriously wonder if and how they’ll support any native development in the not too distant future. Lazarus, with it’s native abilities for Linux, gives us a clear path out should M$ abandon manufacturing and the desktop in general - and we are most appreciative! Keep up the good work! Be well, Dave H. From lazarus at mfriebe.de Sun Nov 24 00:52:04 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 24 Nov 2019 00:52:04 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: <1c3c413c-2927-fe5e-7695-6e0031072a4d@mfriebe.de> On 24/11/2019 00:41, Michael Van Canneyt via lazarus wrote: > On Sun, 24 Nov 2019, Werner Pamler via lazarus wrote: > >> Once having voted the current results are displayed. But when I want >> to see later how the poll has evolved I can only vote again -- that's >> probably not what you intend. Either add a button to display the >> current results, or don't display results at all until the poll has >> ended. > > The results should be visible any time according to the options, but > I'm not very knowledgeable about google forms: I'm not a poll expert. Link to results https://docs.google.com/forms/d/e/1FAIpQLSdOKANJzS80Od8IyI8xRzlvjlM0iorpwuM7-y2JdhomNcLtsA/viewanalytics From pascaldragon at googlemail.com Sun Nov 24 01:17:58 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 24 Nov 2019 01:17:58 +0100 Subject: [Lazarus] Cross-compile for Linux strange behaviour with floating point constants In-Reply-To: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> References: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> Message-ID: <0f40dc85-b6d4-916a-800b-8023a3a2f70b@googlemail.com> Am 20.11.2019 um 19:19 schrieb R Smith via lazarus: > Is there something I can check on my side? Does this work for others? > Might this be a cross-compile bug of sorts?  Is this some FPC, FPU or > Linux peculiarity I'm not aware of? Win64 is essentially the only x86 platform that does *not* support and use the Extended type. Thus a cross compiler from x86_64-win64 to any other i8086, i386 or x86_64 target will result in strange or undefined behavior due to it not providing the Extended constants correctly. To solve this you need to compile your code on a Linux system (you can use WSL without any problems) or make sure that you only use Double (you also need to cast floating point constants to Double in that case as otherwise FPC tries to use Extended nevertheless, which is why the variable in your example works, but the constant does not). There is the plan to add software floating point support for Extended to the compiler for platforms like Win64, but it's not a trivial endeavour. Please note that cross compiling from any other platform that does not support Extended to x86 will have the same problem (except when cross compiling to Win64). Regards, Sven From giuliano.colla at fastwebnet.it Sun Nov 24 01:28:01 2019 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sun, 24 Nov 2019 01:28:01 +0100 Subject: [Lazarus] Cross-compile for Linux strange behaviour with floating point constants In-Reply-To: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> References: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> Message-ID: <5c959a71-f009-7697-cb71-2c94886857d3@fastwebnet.it> Il 20/11/2019 19:19, R Smith via lazarus ha scritto: > The problem I've run into is a simple program (made in Lazarus) where > I use floating point constants. It compiles and runs perfectly on > Windows, but when cross-compiling for Linux, it fails for specific > floating point values. > > I realise immediately that, if this is a bug, it's probably an FPC bug > and not Lazarus specific, but the problem is so obviously wrong, I'm > thinking it cannot possibly be a compiler bug, and since I am > cross-compiling from Lazarus, figured I would start asking here and > rule out the obvious things first. I tested your program by compiling natively in Linux, (Lazarus 1.8 and fpc 3.04) and it works just fine. Output is: > Setting Variable: x := 0.5; > FloatToStr( x )    --> 0.5 > FloatToStr( 0.5 )  --> 0.5 > > Setting Variable: x := 0.35; > FloatToStr( x )    --> 0.35 > FloatToStr( 0.35 ) --> 0.35 As with the given code Lazarus does pretty much nothing, and all the job is done by the fpc compiler, it must be an fpc cross-compiler specific issue. Target processor "Default" is the right choice? Maybe a more specific choice will tell the cross-compiler to pick up the right choice for fp math. Just a guess. Giuliano -- Do not do to others as you would have them do to you.They might have different tastes. From bo.berglund at gmail.com Sun Nov 24 01:30:45 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 24 Nov 2019 01:30:45 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> Message-ID: On Sat, 2 Nov 2019 15:37:23 +0100, Martin Frb via lazarus wrote: >On 02/11/2019 14:48, Bo Berglund via lazarus wrote: >> >> Now it happened again! >> I was compiling the program then executing it inside a terminal >> (external to Lazarus) and then repeating this to find my bug. >> >> When I found it I doubleclicked the name of my logging component to >> copy its name, but instead instanly Lazarus disappeared! >> >> I will now revert back to Lazarus 2.0.4 instead. >It would be really helpful if you could try to get a trace. (see my last >reply) >Otherwise this issue may be present for a lot of future versions. I've been away from this for a while doing circuit board design for the RPi plug-in card I will need for the functionality of my project. Now back to coding and I am doing it on the target system since it is not possible for me to cross-compile for RPi on my Windows system. I never managed to understand how to make it work.... So I am on a VNC connection using RealVNC on my Win7 laptop towards the RPi4 system running a fully updated Raspbian Buster. And I have been bitten several times the last days by the suddenly disappearing Lazarus application.... So I switched to Lazarus 2.0.4 in order to use that instead of the 2.0.6 I thought was the culprit. Turns out I was wrong! I get these crashes also on 2.0.4... So now I need to get into a situation where I can safely develop the code on my Windows 7 machine instead (there I have NEVER seen this happen). It is no fun when code worked on for an hour suddenly just disappears. But there are several places in the code where Linux specific constructs are used, for example I use the PiGpio unit which is RPi specific and I have no way to redirect that to the Windows environment. On test compilations I get a large number of errors relating to unix etc. So is there some way I can enable cross-compiling for Linux (i.e. Raspbian on RPi4) on my Windows7 installation? Unlike on Raspbian I have not built fpc/lazarus from sources but rather used the official installer found here: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.0.4/ There is also a cross-compiler on that page but probably not what I need since it only mentions the Intel architecture... -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Sun Nov 24 03:21:11 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 24 Nov 2019 03:21:11 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> Message-ID: <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> On 24/11/2019 01:30, Bo Berglund via lazarus wrote: > And I have been bitten several times the last days by the suddenly > disappearing Lazarus application.... If you can.... Run your Lazarus in gdb.    gdb path/to/lazarus and then in gdb hit r and return. I know you want to get away from more crashes. And this will mean at least one more of them. It is highly likely that gdb will report some sort of sigsegv or the like. And then allow for a backtrace to be made. Of course that assumes, that your lazarus is compiled with debug info. You can also look into your home dir (or where you start lazarus from), or maybe the lazarus dir, or ~/.lazarus. Maybe there is a lazarus.core file. Then you already have what you need. Or well, only if it has debug info.    gdb path/to/lazarus path/to/lazarus.core   bt according to https://stackoverflow.com/questions/5115613/core-dump-file-analysis From bo.berglund at gmail.com Sun Nov 24 10:08:09 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 24 Nov 2019 10:08:09 +0100 Subject: [Lazarus] Cross-compile on Windows for Linux Raspbian (Raspberry Pi) - what are the requirements? Message-ID: <27hkteldhdl83es6b3dnm88f31lq0lb028@4ax.com> I have tried to develop my RPi4 application on the RPi4 itself but have problems with Lazarus IDE crashing suddenly and inexplicably when just using the IDE, losing all unsaved changes. So I have now tried to find a way to develop on Windows 7 (my laptop) and check build for Raspbian there, but not run. Then transfer sources to RPi via subversion and build there for testing. On Windows 7 Pro x64 I have the native Lazarus 2.0.4 and FPC 3.0.4 both of which are 64 bit. Installed via the official sourceforge installers. On RPi4 I build the environment entirely from svn sources. Raspbian on the RPi4 is 32 bit so applications must be built in 32 bit mode. I use a few hardware dependent things on RPi4 (GPIO I/O) but I think these are handled through files etc in Linux so it should not be a showstopper to at least build on Windows. Since I never ever created an environment for cross-compiling on Lazarus I really need a simple to follow byt full description on how to accomplish the task. Is it even possible for RPi? I have read somewhere that you cannot really cross-compile from Windows because of some quirks with floating point support. I can live with having to use a virtual environment (Linux in a VMWare virtual machine on Windows) as long as Lazarus does not crash on me any longer and I can work in the VMWare console. Currently I work on Lazarus on the RPi4 via VNC.... Any ideas (and links to working how-to pages) welcome! -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Nov 24 10:22:17 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 24 Nov 2019 10:22:17 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> Message-ID: On Sun, 24 Nov 2019 03:21:11 +0100, Martin Frb via lazarus wrote: >On 24/11/2019 01:30, Bo Berglund via lazarus wrote: >> And I have been bitten several times the last days by the suddenly >> disappearing Lazarus application.... > >If you can.... Run your Lazarus in gdb. >    gdb path/to/lazarus > >and then in gdb hit r and return. I always start lazarus in the GUI using the menu command. During installation I create a version dependent .lazarus_2.0.x dir so I can use different versions on the same system. So the command to start lazarus in the desktop file is: Exec=/home/pi/dev/lazarus/2.0.6/startlazarus --pcp=/home/pi/.lazarus_2.0.6 %f What should I do in order to make this work through gdb? > >I know you want to get away from more crashes. And this will mean at >least one more of them. > >It is highly likely that gdb will report some sort of sigsegv or the >like. And then allow for a backtrace to be made. >Of course that assumes, that your lazarus is compiled with debug info. I believe it has because: - I have not stripped lazarus or startlazarus after ide rebuilds - The size of lazarus is 260,249,068 bytes - The size of startlazarus is 29,995,584 bytes > >You can also look into your home dir (or where you start lazarus from), >or maybe the lazarus dir, or ~/.lazarus. >Maybe there is a lazarus.core file. Then you already have what you need. pi at rpi4-gui:~ $ sudo find ./ -name *.core pi at rpi4-gui:~ $ So at least below home there is no such file... >Or well, only if it has debug info. >    gdb path/to/lazarus path/to/lazarus.core >   bt >according to >https://stackoverflow.com/questions/5115613/core-dump-file-analysis -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Nov 24 10:30:09 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 24 Nov 2019 10:30:09 +0100 Subject: [Lazarus] The future of the Lazarus IDE References: Message-ID: On Sat, 23 Nov 2019 18:50:07 -0500, Daithi Haxton via lazarus wrote: >For my 2 cents, keep Lazarus as an independent, native code IDE. We do instrumentation packages for manufacturing robots, and “the Web” is simply not an option. Laz makes us at least 10x more productive than any other option (and we’ve tried other options - we still maintain code in C++ and C# using VS and it’s a nightmare compared to the Lazarus environment). > >What really scares us is that all the mainstream OSes are becoming so Web and mobile centric - the way M$ is rumbling I seriously wonder if and how they’ll support any native development in the not too distant future. Lazarus, with it’s native abilities for Linux, gives us a clear path out should M$ abandon manufacturing and the desktop in general - and we are most appreciative! > We are also using Lazarus for hardware related stuff with no help at all from the web! Now even MS is abandoning their Windows desktop applications like Microsoft Office.... The latest Office 2019 seems to be the last one you can install on your PC and work with in the absence of the Internet, they even promote NOT using Office 2019 in some official pages! And they offer NO updates to Office 2019. Just shows where this is heading. I for one spend 3-4 months every year in my cottage where we only have mobile Internet and at speeds that vary depending on how many neighbors are visiting the island all at the same time. In popular summer weeks speeds go down into low single digit Mbit/s. Needless to say it is impossible to use web based stuff there.... I voted to keep Lazarus stand-alone! -- Bo Berglund Developer in Sweden From florian at freepascal.org Sun Nov 24 11:35:20 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 24 Nov 2019 11:35:20 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> Am 24.11.19 um 10:30 schrieb Bo Berglund via lazarus: > On Sat, 23 Nov 2019 18:50:07 -0500, Daithi Haxton via lazarus > wrote: > >> For my 2 cents, keep Lazarus as an independent, native code IDE. We do instrumentation packages for manufacturing robots, and “the Web” is simply not an option. Laz makes us at least 10x more productive than any other option (and we’ve tried other options - we still maintain code in C++ and C# using VS and it’s a nightmare compared to the Lazarus environment). >> >> What really scares us is that all the mainstream OSes are becoming so Web and mobile centric - the way M$ is rumbling I seriously wonder if and how they’ll support any native development in the not too distant future. Lazarus, with it’s native abilities for Linux, gives us a clear path out should M$ abandon manufacturing and the desktop in general - and we are most appreciative! >> > > We are also using Lazarus for hardware related stuff with no help at > all from the web! I think this is *the* main advantage of FPC/Lazarus: you can use it for almost every type of application on any platform (sorry C64 users, we do not have a solution ... yet ;)). > > I for one spend 3-4 months every year in my cottage where we only have > mobile Internet and at speeds that vary depending on how many > neighbors are visiting the island all at the same time. In popular > summer weeks speeds go down into low single digit Mbit/s. May I quote you in discussions :)))? Here in Germany, Sweden is always taken as an example where even the smallest cottage has internet by fiber. From michael at freepascal.org Sun Nov 24 11:35:25 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 11:35:25 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sun, 24 Nov 2019, Bo Berglund via lazarus wrote: > On Sat, 23 Nov 2019 18:50:07 -0500, Daithi Haxton via lazarus > wrote: > >> For my 2 cents, keep Lazarus as an independent, native code IDE. We do instrumentation packages for manufacturing robots, and ?the Web? is simply not an option. Laz makes us at least 10x more productive than any other option (and we?ve tried other options - we still maintain code in C++ and C# using VS and it?s a nightmare compared to the Lazarus environment). >> >> What really scares us is that all the mainstream OSes are becoming so Web and mobile centric - the way M$ is rumbling I seriously wonder if and how they?ll support any native development in the not too distant future. Lazarus, with it?s native abilities for Linux, gives us a clear path out should M$ abandon manufacturing and the desktop in general - and we are most appreciative! >> > > We are also using Lazarus for hardware related stuff with no help at > all from the web! > > Now even MS is abandoning their Windows desktop applications like > Microsoft Office.... > The latest Office 2019 seems to be the last one you can install on > your PC and work with in the absence of the Internet, they even > promote NOT using Office 2019 in some official pages! > And they offer NO updates to Office 2019. Just shows where this is > heading. Simple: money. If it is in the cloud, they can work with subscriptions. No Pay = No Office. If it is on your PC, they don't control it. Michael. From michael at freepascal.org Sun Nov 24 11:38:41 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 11:38:41 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> Message-ID: On Sun, 24 Nov 2019, Florian Klämpfl via lazarus wrote: > Am 24.11.19 um 10:30 schrieb Bo Berglund via lazarus: >> On Sat, 23 Nov 2019 18:50:07 -0500, Daithi Haxton via lazarus >> wrote: >> >>> For my 2 cents, keep Lazarus as an independent, native code IDE. We do > instrumentation packages for manufacturing robots, and ?the Web? is simply > not an option. Laz makes us at least 10x more productive than any other > option (and we?ve tried other options - we still maintain code in C++ and C# > using VS and it?s a nightmare compared to the Lazarus environment). >>> >>> What really scares us is that all the mainstream OSes are becoming so Web > and mobile centric - the way M$ is rumbling I seriously wonder if and how > they?ll support any native development in the not too distant future. > Lazarus, with it?s native abilities for Linux, gives us a clear path out > should M$ abandon manufacturing and the desktop in general - and we are most > appreciative! >>> >> >> We are also using Lazarus for hardware related stuff with no help at >> all from the web! > > I think this is *the* main advantage of FPC/Lazarus: you can use it for > almost every type of application on any platform (sorry C64 users, we do > not have a solution ... yet ;)). That is exactly what I give as the reason for using pascal: I don't think there is any other highlevel language that covers so many platforms. The only scalp missing on our belt is the mainframe. Michael. From giuliano.colla at fastwebnet.it Sun Nov 24 11:45:02 2019 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sun, 24 Nov 2019 11:45:02 +0100 Subject: [Lazarus] Cross-compile for Linux strange behaviour with floating point constants In-Reply-To: <0f40dc85-b6d4-916a-800b-8023a3a2f70b@googlemail.com> References: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> <0f40dc85-b6d4-916a-800b-8023a3a2f70b@googlemail.com> Message-ID: <2e7952f3-2d28-3102-56f5-87d0ad499e3c@fastwebnet.it> Il 24/11/2019 01:17, Sven Barth via lazarus ha scritto: > There is the plan to add software floating point support for Extended > to the compiler for platforms like Win64, but it's not a trivial > endeavour. Maybe a silly question, but wouldn't it much simpler to have the compiler not use the Extended type on platforms which do not support it? Giuliano -- Do not do to others as you would have them do to you.They might have different tastes. From florian at freepascal.org Sun Nov 24 11:48:08 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 24 Nov 2019 11:48:08 +0100 Subject: [Lazarus] Cross-compile for Linux strange behaviour with floating point constants In-Reply-To: <2e7952f3-2d28-3102-56f5-87d0ad499e3c@fastwebnet.it> References: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> <0f40dc85-b6d4-916a-800b-8023a3a2f70b@googlemail.com> <2e7952f3-2d28-3102-56f5-87d0ad499e3c@fastwebnet.it> Message-ID: Am 24.11.19 um 11:45 schrieb Giuliano Colla via lazarus: > Il 24/11/2019 01:17, Sven Barth via lazarus ha scritto: > >> There is the plan to add software floating point support for Extended >> to the compiler for platforms like Win64, but it's not a trivial >> endeavour. > > Maybe a silly question, but wouldn't it much simpler to have the > compiler not use the Extended type on platforms which do not support it? Yes. This is what we do. However, it bites us when cross compiling. What to do with extended constants and their handling in the compiler if the target platform has it but the target platform does not support it? From michael at freepascal.org Sun Nov 24 11:54:45 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 11:54:45 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sat, 23 Nov 2019, Daithi Haxton via lazarus wrote: > For my 2 cents, keep Lazarus as an independent, native code IDE. We do instrumentation packages for manufacturing robots, and “the Web” is simply not an option. Laz makes us at least 10x more productive than any other option (and we’ve tried other options - we still maintain code in C++ and C# using VS and it’s a nightmare compared to the Lazarus environment). > > What really scares us is that all the mainstream OSes are becoming so Web > and mobile centric - the way M$ is rumbling I seriously wonder if and how > they’ll support any native development in the not too distant future. > Lazarus, with it’s native abilities for Linux, gives us a clear path out > should M$ abandon manufacturing and the desktop in general - and we are > most appreciative! For clarity: The question in the poll is not meant to imply that we must abandon native development. On the contrary: services, processes that talk to hardware and background processes are IMO still best done as native apps. The proposal is just concerning HOW you program: the editor you use. It's perfectly possible to use VS Code or any other editor that uses web-technology for its GUI to create native apps. It doesn't matter to VS Code or atom whether it calls FPC, pas2js or the TMS Web compiler. The point is that Lazarus does not and cannot cover all aspects of a typical larger project. Editors like VS Code and Atom can, given the huge wealth of plugins that exist out there. If we had to set up a project today to copy functionality of all Atom or VS Code plugins, I probably wouldn't live long enough to see that project completed. Lastly - but I don't know how much of an argument that is - young people are used to sleek UIs as offered in VS Code or Atom. The Lazarus IDE is confusing to them: it's origins are clearly in the RAD era, which (so I'm told) is all but abandoned today. At least, that's some of the feedback I get. Michael. From giuliano.colla at fastwebnet.it Sun Nov 24 12:04:17 2019 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sun, 24 Nov 2019 12:04:17 +0100 Subject: [Lazarus] Cross-compile for Linux strange behaviour with floating point constants In-Reply-To: References: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> <0f40dc85-b6d4-916a-800b-8023a3a2f70b@googlemail.com> <2e7952f3-2d28-3102-56f5-87d0ad499e3c@fastwebnet.it> Message-ID: <57566d70-e48d-119e-aebf-46a8391d6c0d@fastwebnet.it> Il 24/11/2019 11:48, Florian Klämpfl via lazarus ha scritto: > What to do with extended constants and their handling in the compiler > if the target platform has it but the target platform does not support > it? Maybe an AND condition? Use extended type only if both platforms support it? Giuliano -- Do not do to others as you would have them do to you.They might have different tastes. From giuliano.colla at fastwebnet.it Sun Nov 24 12:06:01 2019 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sun, 24 Nov 2019 12:06:01 +0100 Subject: [Lazarus] Cross-compile on Windows for Linux Raspbian (Raspberry Pi) - what are the requirements? In-Reply-To: <27hkteldhdl83es6b3dnm88f31lq0lb028@4ax.com> References: <27hkteldhdl83es6b3dnm88f31lq0lb028@4ax.com> Message-ID: <4efe6c60-4da9-04cf-02a5-ba3b0c339ec3@fastwebnet.it> Il 24/11/2019 10:08, Bo Berglund via lazarus ha scritto: > Since I never ever created an environment for cross-compiling on > Lazarus I really need a simple to follow byt full description on how > to accomplish the task. Is it even possible for RPi? I can't help you as far as Windows is concerned, because we learned from experience to carefully avoid using Windows for any purpose other than testing applications which must run under Windows. But I can provide our experience with RPI3. We installed Lazarus and fpc on Raspberry by using fpcupdeluxe. A few troubles if not using the latest version of fpcup, but then everything working just fine. We can develop natively; no lockups or whatever annoyance. We did set up a cross environment on Linux (again taking advantage of fpcupdeluxe) and after a few struggling with the proper setting for the specific ARM flavour, again no troubles. But as it is an annoyance sending back and forth binaries, we ended up with using a git repository in our server, thus sharing sources between Linux and RPI, and compiling natively on Linux for preliminary testing, and on RPI for final tests and production. Hope that it helps. Giuliano -- Do not do to others as you would have them do to you.They might have different tastes. From florian at freepascal.org Sun Nov 24 12:09:53 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 24 Nov 2019 12:09:53 +0100 Subject: [Lazarus] Cross-compile for Linux strange behaviour with floating point constants In-Reply-To: <57566d70-e48d-119e-aebf-46a8391d6c0d@fastwebnet.it> References: <91e77daa-7b52-3f11-341a-bcb0ed762cc2@gmail.com> <0f40dc85-b6d4-916a-800b-8023a3a2f70b@googlemail.com> <2e7952f3-2d28-3102-56f5-87d0ad499e3c@fastwebnet.it> <57566d70-e48d-119e-aebf-46a8391d6c0d@fastwebnet.it> Message-ID: Am 24.11.19 um 12:04 schrieb Giuliano Colla via lazarus: > Il 24/11/2019 11:48, Florian Klämpfl via lazarus ha scritto: > >> What to do with extended constants and their handling in the compiler >> if the target platform has it but the target platform does not support >> it? > > Maybe an AND condition? Use extended type only if both platforms support > it? This is a no-go. The resulting code/executable must be agnostic regarding the host where it is generated. From florian at freepascal.org Sun Nov 24 12:11:49 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 24 Nov 2019 12:11:49 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: Am 24.11.19 um 11:54 schrieb Michael Van Canneyt via lazarus: > The point is that Lazarus does not and cannot cover all aspects of a > typical > larger project. No, but if I really need it, I can develop it easily myself because I know Object Pascal. Even simple things like adding support for Ctrl-Alt-Shift-I to add an internalerror number for the compiler (which took me maybe 15 min with lazarus) would be an endeavor of several days with VS Code for me. I wouldn't even know where to start. > Editors like VS Code and Atom can, given the huge wealth of > plugins that exist out there. After the Firefox/Thunderbird plugin disaster, I try to ignore and never depend on any functionality provided by plugins. It could be gone with the next update/upgrade. > If we had to set up a project today to copy functionality of all Atom or > VS Code plugins, I probably wouldn't live long enough to see that > project completed. It doesn't help if VS Code even cannot do simple things right like zooming of the source code window or keyboard navigation in the menu. > > Lastly - but I don't know how much of an argument that is - young people > are > used to sleek UIs as offered in VS Code or Atom.  The Lazarus IDE is > confusing to them: Yes, this fits in the overall picture: app developers are proud about features ("hey, my app can now copy&paste") real programs got in the 80ths. From fpc at pascalprogramming.org Sun Nov 24 12:19:30 2019 From: fpc at pascalprogramming.org (Marco van de Voort) Date: Sun, 24 Nov 2019 12:19:30 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> Message-ID: <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> Op 2019-11-24 om 11:35 schreef Florian Klämpfl via lazarus: > >>> What really scares us is that all the mainstream OSes are becoming >>> so Web and mobile centric - the way M$ is rumbling I seriously >>> wonder if and how they’ll support any native development in the not >>> too distant future. Lazarus, with it’s native abilities for Linux, >>> gives us a clear path out should M$ abandon manufacturing and the >>> desktop in general - and we are most appreciative! >>> >> >> We are also using Lazarus for hardware related stuff with no help at >> all from the web! > > I think this is *the* main advantage of FPC/Lazarus: you can use it > for almost every type of application on any platform (sorry C64 users, > we do not have a solution ... yet ;)). > No. More importantly it gives independence. Something that external tools don't give. If they wither or change direction, or do the umpteen API change you have an immediate problem and risk getting caught in an infinite catch-up From michael at freepascal.org Sun Nov 24 12:20:09 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 12:20:09 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sun, 24 Nov 2019, Florian Klämpfl via lazarus wrote: > Am 24.11.19 um 11:54 schrieb Michael Van Canneyt via lazarus: >> The point is that Lazarus does not and cannot cover all aspects of a >> typical >> larger project. > > No, but if I really need it, I can develop it easily myself because I > know Object Pascal. Even simple things like adding support for > Ctrl-Alt-Shift-I to add an internalerror number for the compiler (which > took me maybe 15 min with lazarus) would be an endeavor of several days > with VS Code for me. I wouldn't even know where to start. Same here :-) > >> Editors like VS Code and Atom can, given the huge wealth of >> plugins that exist out there. > > After the Firefox/Thunderbird plugin disaster, I try to ignore and never > depend on any functionality provided by plugins. It could be gone with > the next update/upgrade. I am aware of this problem, and that is why I think npm is such a disaster. But fair is fair: Lazarus is going the same way with their online package manager. >> If we had to set up a project today to copy functionality of all Atom or >> VS Code plugins, I probably wouldn't live long enough to see that >> project completed. > > It doesn't help if VS Code even cannot do simple things right like > zooming of the source code window or keyboard navigation in the menu. Actually, the zoom was demonstrated on thursday on Be.Delphi (too show that VS Code works well on high DPI, in difference with Delphi). So it should be possible somehow. I know Atom can. >> >> Lastly - but I don't know how much of an argument that is - young people >> are >> used to sleek UIs as offered in VS Code or Atom.  The Lazarus IDE is >> confusing to them: > > Yes, this fits in the overall picture: app developers are proud about > features ("hey, my app can now copy&paste") real programs got in the 80ths. I understand your scepticism, and share it to a large degree :-) So, it seems we can already now be labeled "dinosaurs" ;-) Michael. From michael at freepascal.org Sun Nov 24 12:23:57 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 12:23:57 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> Message-ID: On Sun, 24 Nov 2019, Marco van de Voort via lazarus wrote: > > Op 2019-11-24 om 11:35 schreef Florian Klämpfl via lazarus: >> >>>> What really scares us is that all the mainstream OSes are becoming >>>> so Web and mobile centric - the way M$ is rumbling I seriously >>>> wonder if and how they?ll support any native development in the not >>>> too distant future. Lazarus, with it?s native abilities for Linux, >>>> gives us a clear path out should M$ abandon manufacturing and the >>>> desktop in general - and we are most appreciative! >>>> >>> >>> We are also using Lazarus for hardware related stuff with no help at >>> all from the web! >> >> I think this is *the* main advantage of FPC/Lazarus: you can use it >> for almost every type of application on any platform (sorry C64 users, >> we do not have a solution ... yet ;)). >> > No. More importantly it gives independence. Something that external > tools don't give. If they wither or change direction, or do the umpteen > API change you have an immediate problem and risk getting caught in an > infinite catch-up That argument cuts both ways. If you need an improvement in your IDE you need to do it yourself. If the external tool implements it, you get it for free. So that means it's a trade-off. Do you wish to spend your time fixing broken external dependencies, or do you wish to spend it implementing new things yourself ? Asking the question is answering it ;-) Michael. From fpc at pascalprogramming.org Sun Nov 24 12:36:18 2019 From: fpc at pascalprogramming.org (Marco van de Voort) Date: Sun, 24 Nov 2019 12:36:18 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: <774f86d1-40b5-6381-1ecd-ceb4021aee70@pascalprogramming.org> Op 2019-11-24 om 11:54 schreef Michael Van Canneyt via lazarus: > > It's perfectly possible to use VS Code or any other editor that uses > web-technology for its GUI to create native apps. It doesn't matter to > VS Code or atom whether it calls FPC, pas2js or the TMS Web compiler. I use Delphi, Visual Studio (2015/17), MP Lab X (which is a Netbeans based horror) and a bit Lazarus. VS is quite smooth, but the differences are mostly in the details. Delphi is still prefered as editor, but I could get to used to VS if I spend some time with it. But the language choice is the main reason. And no having some plugins is not a solution, it just makes you a second tier user. If I change to VS (or whatever other IDE) I will also change language. MP Lab X is the worst. Slow, extremely long startup with loading umpteen plugins and quite a bit of instability/non-determinism. (it is for embedded C targets btw). Plugins work more often NOT than they do. This is what I fear with VSCode. All these arguments were also made for the move of Microchip to Netbeans too, and they never really delivered. Delphi actually has a very annoying bug that causes popup texts in the IDE to get into some loop that either require killing or restarting the IDE. Unbelievable for a 25 year old product that costs serious $$$. Lazarus has very rare crashes (that it closes down unexpectedly). Fairly minor, my biggest beef is debugging (with popups and visualizers) is not up to par. > The point is that Lazarus does not and cannot cover all aspects of a > typical > larger project. Editors like VS Code and Atom can, given the huge > wealth of > plugins that exist out there. Like? For editor ? For designer? For project types? > If we had to set up a project today to copy functionality of all Atom > or VS Code plugins, I probably wouldn't live long enough to see that > project completed. The problem is that if you now switch from Lazarus to vscode, with that project probably the same would happen before all proper plugins are done.  There will be things not quite doable to VSCode, and in the end you never get on par. > > Lastly - but I don't know how much of an argument that is - young > people are > used to sleek UIs as offered in VS Code or Atom.  The Lazarus IDE is > confusing to them: it's origins are clearly in the RAD era, which (so > I'm told) is all but abandoned today. Conformists will never change to something that is different. Even if it superficially looks like it. Consider those groups lost for the most part. From florian at freepascal.org Sun Nov 24 12:42:42 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 24 Nov 2019 12:42:42 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> Message-ID: Am 24.11.19 um 12:23 schrieb Michael Van Canneyt via lazarus: > > So that means it's a trade-off. Do you wish to spend your time fixing > broken > external dependencies, or do you wish to spend it implementing new things > yourself ? > > Asking the question is answering it ;-) History taught: the less dependencies, the better. Just look at FPC and GPC. From fpc at pascalprogramming.org Sun Nov 24 12:45:52 2019 From: fpc at pascalprogramming.org (Marco van de Voort) Date: Sun, 24 Nov 2019 12:45:52 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> Message-ID: Op 2019-11-24 om 12:23 schreef Michael Van Canneyt via lazarus: > > That argument cuts both ways. If you need an improvement in your IDE > you need to do it yourself. > If the external tool implements it, you get it for free. > Oh dear. I thought you are now of the age that you no longer believe in such unicorn statements? GCC, LLVM, ring a bell? In a previous message I already mentioned Netbeans, and we have had such discussions about Eclipse too (the big IDE to rule all IDEs 10 years ago). Even if it works, having a good quality set of plugins, dealing with versioning and a project that probably moves much faster than yourself and doesn't care about you is quite hard. Making own ready to install distributions and keeping them up to date for extended periods is even worse. > So that means it's a trade-off. Do you wish to spend your time fixing > broken > external dependencies, or do you wish to spend it implementing new things > yourself ? > > Asking the question is answering it ;-) > Not dependencies, rework the plugins over and over again, probably for each major version, and then finding out the bit you relied on is deprecated. I really like a package I can just install and works, rather than constantly messing with plugins that are never really it. I think you vastly overestimate getting good quality VSCode plugins that make it match Lazarus for basic functionality. From michael at freepascal.org Sun Nov 24 12:46:43 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 12:46:43 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> Message-ID: On Sun, 24 Nov 2019, Florian Klämpfl via lazarus wrote: > Am 24.11.19 um 12:23 schrieb Michael Van Canneyt via lazarus: >> >> So that means it's a trade-off. Do you wish to spend your time fixing >> broken >> external dependencies, or do you wish to spend it implementing new things >> yourself ? >> >> Asking the question is answering it ;-) > > History taught: the less dependencies, the better. Just look at FPC and GPC. Well, that's my answer too. Michael. From michael at freepascal.org Sun Nov 24 12:49:19 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 12:49:19 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <774f86d1-40b5-6381-1ecd-ceb4021aee70@pascalprogramming.org> References: <774f86d1-40b5-6381-1ecd-ceb4021aee70@pascalprogramming.org> Message-ID: On Sun, 24 Nov 2019, Marco van de Voort via lazarus wrote: >> If we had to set up a project today to copy functionality of all Atom >> or VS Code plugins, I probably wouldn't live long enough to see that >> project completed. > > The problem is that if you now switch from Lazarus to vscode, with that > project probably the same would happen before all proper plugins are > done.  There will be things not quite doable to VSCode, and in the end > you never get on par. Agree. The sentence was only meant to indicate that there are a lot of them. Michael. From florian at freepascal.org Sun Nov 24 12:58:55 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 24 Nov 2019 12:58:55 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> Message-ID: Am 24.11.19 um 12:45 schrieb Marco van de Voort via lazarus: > I really like a package I can just install and works, rather than > constantly messing with plugins that are never really it. > > I think you vastly overestimate getting good quality VSCode plugins that > make it match Lazarus for basic functionality. > Yes. While Lazarus has no git plugin (one of the things I miss), it does not matter that VS Code has one which, when opening the compiler dir, tells me that the project is too big and it won't really work. So no difference with lazarus. From aksdb at gmx.de Sun Nov 24 13:30:46 2019 From: aksdb at gmx.de (Andreas Schneider) Date: Sun, 24 Nov 2019 13:30:46 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: <9ce6b191acbbc51eb963f55d3ec3052f@gmx.de> Am 2019-11-23 11:12, schrieb Michael Van Canneyt via lazarus: > This will mean that soon, you'll be able to do full stack development > in VS > Code using object pascal. (or any other language, since VS Code is > language agnostic) While VS Code is an impressive editor, it is still not an IDE. There is a reason why Visual Studio is still going, and why JetBrains is keeping growing. I use VS Code (or Sublime Text, which is a lot faster) for small code edits in Go, TypeScript and JavaScript, but for bigger refactorings or analysis, nothing beats WebStorm, GoLand, IntelliJ, etc. IMHO, you cannot replace a full features IDE like Lazarus with VS Code. You could, however, replace it with an IDE built on IntelliJ - their platform has proven again and again (PyCharm, CLion, GoLand, etc.) that they can deal with basically any language. Give that thing a proper UI designer and you even have the ability to create desktop applications. Too bad no one ever integrated Qt or Gtk (designer) into it. I-Pascal (http://www.siberika.com/) is kinda going there, at least for basic stuff. If (and that's a really big "if") you intend to leverage existing tooling to (re)build an IDE which has more than just web development in mind, consider JetBrains' IntelliJ platform as a base. I guess once you tought it how to properly parse the language, you get a lot of code tools stuff out of the box. Basically leaving you with the form designer. Btw. for me, personally, Lazarus (and the VCL) still beat any other desktop UI frameworks out there. I found none that is nearly as convenient to use and I still use it regularly to build desktop (tool) applications that I want to be cross platform. My stack is: Go for backend, JS/TS for web frontend and Lazarus/FPC for desktop. I don't have any clear contender for native mobile apps yet, though. May go (hehe) with Go (gioui) there. From luca at wetron.es Sun Nov 24 14:04:14 2019 From: luca at wetron.es (Luca Olivetti) Date: Sun, 24 Nov 2019 14:04:14 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> Message-ID: El 24/11/19 a les 10:22, Bo Berglund via lazarus ha escrit: > On Sun, 24 Nov 2019 03:21:11 +0100, Martin Frb via lazarus > wrote: > >> On 24/11/2019 01:30, Bo Berglund via lazarus wrote: >>> And I have been bitten several times the last days by the suddenly >>> disappearing Lazarus application.... >> >> If you can.... Run your Lazarus in gdb. >>    gdb path/to/lazarus >> >> and then in gdb hit r and return. > > I always start lazarus in the GUI using the menu command. > During installation I create a version dependent .lazarus_2.0.x dir so > I can use different versions on the same system. So the command to > start lazarus in the desktop file is: > > Exec=/home/pi/dev/lazarus/2.0.6/startlazarus > --pcp=/home/pi/.lazarus_2.0.6 %f > > What should I do in order to make this work through gdb? gdb /home/pi/dev/lazarus/2.0.6/lazarus r --pcp=/home/pi/.lazarus_2.0.6 I don't know much about gdb (I always use it through the ide) but "man gdb" would have told you that (r is an abbreviation for run): " Here are some of the most frequently needed GDB commands: break [file:]function Set a breakpoint at function (in file). ---> run [arglist] Start your program (with arglist, if specified). bt Backtrace: display the program stack. " Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From skalogryz.lists at gmail.com Sun Nov 24 14:20:24 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Sun, 24 Nov 2019 08:20:24 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <9ce6b191acbbc51eb963f55d3ec3052f@gmx.de> References: <9ce6b191acbbc51eb963f55d3ec3052f@gmx.de> Message-ID: How are debugging capabilities in VS Code? thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sun Nov 24 14:24:50 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 24 Nov 2019 14:24:50 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <9ce6b191acbbc51eb963f55d3ec3052f@gmx.de> Message-ID: On Sun, 24 Nov 2019, Dmitry Boyarintsev via lazarus wrote: > How are debugging capabilities in VS Code? For pas2js/TMS Web core, you can debug as it works in Lazarus. It was demonstrated on the Be.Delphi event thursday. For native apps, I have no idea. According to this: https://code.visualstudio.com/docs/cpp/cpp-debug it should be possible. Michael. From aksdb at gmx.de Sun Nov 24 14:28:02 2019 From: aksdb at gmx.de (Andreas Schneider) Date: Sun, 24 Nov 2019 14:28:02 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <9ce6b191acbbc51eb963f55d3ec3052f@gmx.de> Message-ID: <4b1546d077b7791c85e59bb1decc911f@gmx.de> Am 2019-11-24 14:20, schrieb Dmitry Boyarintsev via lazarus: > How are debugging capabilities in VS Code? > > thanks, > Dmitry For web development (JavaScript), good. For everything else it doesn't come close to a real IDE. As I said ... I can use VS Code for small stuff. The moment I have to do "serious" work, I switch to WebStorm/GoLand/CLion/IntelliJ. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Sun Nov 24 14:46:11 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 24 Nov 2019 14:46:11 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> Message-ID: On 24/11/2019 10:22, Bo Berglund via lazarus wrote: > On Sun, 24 Nov 2019 03:21:11 +0100, Martin Frb via lazarus > wrote: >> If you can.... Run your Lazarus in gdb. >>    gdb path/to/lazarus >> >> and then in gdb hit r and return. > I can use different versions on the same system. So the command to > start lazarus in the desktop file is: > > Exec=/home/pi/dev/lazarus/2.0.6/startlazarus > --pcp=/home/pi/.lazarus_2.0.6 %f > > What should I do in order to make this work through gdb? gdb path/to/lazarus r  --pcp=/home/pi/.lazarus_2.0.6 path/to would be either - if writeable: /home/pi/dev/lazarus/2.0.6/ - otherwise /home/user/.lazarus_2.0.6/ (startlazarus is only needed for: restart and if your laz-install dir is write-protected (admin install for all users). In the latter case the rebuild IDE goes into the config path, so each user can have its own rebuild.) The %f is missing, so you cant double click the file. But you need to run gdb from a terminal (so you can execute bt later), so you need to open the file once the IDE runs. Check the size of the lazarus executable. It should be over 100MB (probably over 200). If not you first need to recompile the IDE with debug settings. Menu Tools > Configure build lazarus in the "options" memo enter: -gw and check "clean all" radio button. > I believe it has because: > - I have not stripped lazarus or startlazarus after ide rebuilds > - The size of lazarus is 260,249,068 bytes Yes that look good From lazarus at mfriebe.de Sun Nov 24 14:47:56 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 24 Nov 2019 14:47:56 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> Message-ID: On 24/11/2019 10:22, Bo Berglund via lazarus wrote: > Exec=/home/pi/dev/lazarus/2.0.6/startlazarus > --pcp=/home/pi/.lazarus_2.0.6 %f > Off topic, if you use this as a single user system, you can put the pcp into a file called lazarus.cfg https://wiki.lazarus.freepascal.org/Multiple_Lazarus#Using_lazarus.cfg_file From bo.berglund at gmail.com Sun Nov 24 18:27:40 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 24 Nov 2019 18:27:40 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> Message-ID: On Sun, 24 Nov 2019 14:46:11 +0100, Martin Frb via lazarus wrote: >On 24/11/2019 10:22, Bo Berglund via lazarus wrote: >> On Sun, 24 Nov 2019 03:21:11 +0100, Martin Frb via lazarus >> wrote: >>> If you can.... Run your Lazarus in gdb. >>>    gdb path/to/lazarus >>> >>> and then in gdb hit r and return. >> I can use different versions on the same system. So the command to >> start lazarus in the desktop file is: >> >> Exec=/home/pi/dev/lazarus/2.0.6/startlazarus >> --pcp=/home/pi/.lazarus_2.0.6 %f >> >> What should I do in order to make this work through gdb? >gdb path/to/lazarus >r  --pcp=/home/pi/.lazarus_2.0.6 > >path/to would be either >- if writeable: /home/pi/dev/lazarus/2.0.6/ >- otherwise /home/user/.lazarus_2.0.6/ I tried but.... pi at rpi4-gui:~ $ gdb /home/pi/dev/lazarus/2.0.6/lazarus r --pcp=/home/pi/.lazarus_2.0.6 gdb: unrecognized option '--pcp=/home/pi/.lazarus_2.0.6' Use `gdb --help' for a complete list of options. So now the --pcp... argument to lazarus becomes an argument to gdb??? >(startlazarus is only needed for: restart and if your laz-install dir is >write-protected (admin install for all users). In the latter case the >rebuild IDE goes into the config path, so each user can have its own >rebuild.) Does this mean that I should change the Exec in the desktop file should be changed from startlazarus to simply lazarus? >The %f is missing, so you cant double click the file. >But you need to run gdb from a terminal (so you can execute bt later), >so you need to open the file once the IDE runs. Normally the previously open project is loaded as soon as the Lazarus IDE runs, is this not going to happen now (provided one can get rid of the error message above)? I assume you mean open the project? -- Bo Berglund Developer in Sweden From aksdb at gmx.de Sun Nov 24 18:53:01 2019 From: aksdb at gmx.de (Andreas Schneider) Date: Sun, 24 Nov 2019 18:53:01 +0100 Subject: [Lazarus] Installer/uninstaller on Linux for fpc/lazarus programs? In-Reply-To: References: Message-ID: Am 2019-11-20 18:14, schrieb Bo Berglund via lazarus: > I am wondering how exactly I should package the program I am > developing for Raspberry Pi so it can be uniformly installed and > uninstalled on new RPi units... > > It is an Arm binary for RPi3 or Rpi4 type units running Raspbian > Buster. So I could stuff the binary into /usr/bin I suppose, but it > also needs a config file (below /etc, right?) and some data files > which go into a new directory tree somewhere (where?). > The dir (which needs to be created) shall be populated with some > example files and such. > > And this is a pure command line application meant to be run from cron > or possibly as a service. Not sure yet. > > On Windows for my previous Delphi applications I used InnoSetup but > that is not valid on Linux of course. > > My aim is to get a way to install which will help the production and > service people when we move away from using Windows PC as a platform. > > Needless to say I am not so familiar with everyday use/maintenance of > Linux computers. I have only used RPi boxes for dev work and > experimentation so far.... > > Or should I simply write some FPC command line utility to do the job? > Or maybe an install script and put that into a tgz file? > > What do people normally do? > > -- > Bo Berglund > Developer in Sweden That totally depends. Many applications are user space applications. Treat them as such. Users are not administrators and should not require admin rights to setup their application. I would either go with a statically linked application that has no dependencies beyond its own executable or if that is unavoidable pack it into an AppImage. If the application is a system wide tool (or some daemon, service, etc.) you will have to package it distribution specific. Focus on CentOS/RedHat (RPM) and Debian/Ubuntu (DEB). It would also help to offer a "simple" binary distribution (tgz) for all the other maintainers out there to adopt them easily to their distributions and for people who want to setup your service (again) without admin rights, as part of a CI/CD pipeline, in docker, or whatever. Speaking of docker: that would probably be also another good fit for a service/daemon. That way it is completely distribution (and even OS) agnostic. From lazarus at mfriebe.de Sun Nov 24 19:23:27 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 24 Nov 2019 19:23:27 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> Message-ID: On 24/11/2019 18:27, Bo Berglund via lazarus wrote: > On Sun, 24 Nov 2019 14:46:11 +0100, Martin Frb via lazarus > wrote: > >> On 24/11/2019 10:22, Bo Berglund via lazarus wrote: >>> On Sun, 24 Nov 2019 03:21:11 +0100, Martin Frb via lazarus >>> wrote: >>>> If you can.... Run your Lazarus in gdb. >>>>    gdb path/to/lazarus >>>> >>>> and then in gdb hit r and return. >>> I can use different versions on the same system. So the command to >>> start lazarus in the desktop file is: >>> >>> Exec=/home/pi/dev/lazarus/2.0.6/startlazarus >>> --pcp=/home/pi/.lazarus_2.0.6 %f >>> >>> What should I do in order to make this work through gdb? >> gdb path/to/lazarus >> r  --pcp=/home/pi/.lazarus_2.0.6 >> >> path/to would be either >> - if writeable: /home/pi/dev/lazarus/2.0.6/ >> - otherwise /home/user/.lazarus_2.0.6/ > I tried but.... > pi at rpi4-gui:~ $ gdb /home/pi/dev/lazarus/2.0.6/lazarus r > --pcp=/home/pi/.lazarus_2.0.6 > gdb: unrecognized option '--pcp=/home/pi/.lazarus_2.0.6' > Use `gdb --help' for a complete list of options. the "r --pcp=/home/pi/.lazarus_2.0.6" is only entered once gdb runs. Gdb has an interactive console interface of its own. Enter (in a terminal) "gdb /home/pi/dev/lazarus/2.0.6/lazarus " and you get a "(gdb)" prompt. At this prompt you do enter the "r..." >> (startlazarus is only needed for: restart and if your laz-install dir is >> write-protected (admin install for all users). In the latter case the >> rebuild IDE goes into the config path, so each user can have its own >> rebuild.) > Does this mean that I should change the Exec in the desktop file > should be changed from startlazarus to simply lazarus? In this case you can. The entire lazarus is in your home directory. So - no one else is using it, and if they were they would use your build, and your config (rather than one install for many users, with a diff config for each user (and diff installed packages) - the directory is (I assume) writeable to the IDE, when it rebuilds. (I.e. the IDE runs as the user, who has write access).   Therefore the IDE should (for all I know) place its new build into this dir. I generally do the same, and always start lazarus, never startlazarus. (the latter is still be called, if I restart the IDE from the menu) ----- *nix is multi user. So the root user could install a lazarus accessible to all users. But users could not write to this directory. Each user then has its config in their home dir. And if they install a package it affects only the one user. The rebuild (which anyway can not be written to the main dir by this user) will then be placed in the personal config dir. Calling startlazarus in the main install dir, startlazarus will find the pcp, and check for a newer lazarus. If none found, it uses the lazarus from the install dir. ------- If your install is for one user only, you can put the --pcp argument into the lazarus.cfg file (in the main install dir). This does not support multiple configs for multiple users. But if you have several installs in your home folder, then each of them can have such a lazarus.cfg file. The advantage is, that the config path will be found, even if you start lazarus or startlazarus (from that install folder in your home) without specifying an pcp argument. All my installs have that, and I just open the folder and click the lazarus executable From mailinglists at geldenhuys.co.uk Sun Nov 24 19:38:22 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 24 Nov 2019 18:38:22 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: <6bad0184-f3a4-d5cb-2a39-53a9a7f99653@geldenhuys.co.uk> On 23/11/2019 10:26 pm, Michael Van Canneyt via lazarus wrote: > I must say I am shocked to read you consider Lazarus "buggy and cumbersome". > In my experience it's way better than Delphi as an object pascal IDE. I'm > generally more productive in Lazarus than in Delphi, due to the superior > code tools. Ryan, I have to agree 110% with Michael here. If you want to see "buggy", then take a look at the last few releases of Delphi. I got *so* frustrated with it, and wished I could be using Lazarus instead. Everything around Delphi is terrible. The IDE stability, the language features, the lack (or missing or worse wrong) documentation etc. I have no idea why anybody still uses Delphi! Unfortunately, the project I was working on was purely VCL based, so I had no choice. :-/ Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Sun Nov 24 19:47:34 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 24 Nov 2019 18:47:34 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> Message-ID: On 23/11/2019 10:43 pm, Ralf Quint via lazarus wrote: > I personally loath VSCode just as much as VS itself (or XCode, for that > matter) or Eclipse. I haven't really used VSCode, but as far as I understand, it's a editor, not an IDE. The other point being, that it doesn't run on FreeBSD - a platform I use very often. Web only apps is not really my cup of tea. I don't always work where there is good any any internet. It took me a *long* time just to get used to our company using GSuite instead of something like LibreOffice. As for your comment about Eclipse. Just recently I boasted to Michael about how awesome Eclipse and IntelliJ are (I do Java development these day). They are like night and day compared to Delphi or Lazarus. The amount of feature, how well they understand your code, the refactoring ability, debugging features etc are all out of this world. As for XCode - now there I fully agree with you. I helped out on our iOS product for a while. XCode is just weird. :-) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Sun Nov 24 20:00:40 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 24 Nov 2019 19:00:40 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> Message-ID: <07371170-59ba-d130-3279-4734971f21ec@geldenhuys.co.uk> On 24/11/2019 11:19 am, Marco van de Voort via lazarus wrote: > No. More importantly it gives independence. Something that external > tools don't give. If they wither or change direction, or do the umpteen > API change you have an immediate problem and risk getting caught in an > infinite catch-up Also, myself and companies I worked for have been bitted by the fact that you used closed source software. I feel web apps fall into that same category. If the software vendor disappears (or the website), so does your development tools. Even IntelliJ IDEA seems to be prone to that issue. Just the other day we had about 500 developers that couldn't run IntelliJ for a couple of hours because the licensing server went down. We had to download and install the 30 day trial version of the Commercial edition so we could all get going. I just fired up my Eclipse and continued working as normal - no license server used! The many benefits of fully open source development tools. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Sun Nov 24 20:02:22 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 24 Nov 2019 19:02:22 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> <3ab39198-614b-aea3-f6ae-9aa8e8d8c665@pascalprogramming.org> Message-ID: <7de1a03e-b494-65bb-b60f-a644dbebc628@geldenhuys.co.uk> On 24/11/2019 11:23 am, Michael Van Canneyt via lazarus wrote: > If the external tool implements it, you get it for free. And if they don't decide to implement it, you don't get it at all. I have filed quite a few Feature Request and Bug Reports for IntelliJ IDEA. Many bugs were prompts fixed, but the feature requests has to go to a community voting system, and some have been around for years and not implement yet. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From bo.berglund at gmail.com Sun Nov 24 20:42:18 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 24 Nov 2019 20:42:18 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> Message-ID: <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> On Sun, 24 Nov 2019 18:27:40 +0100, Bo Berglund via lazarus >I tried but.... >pi at rpi4-gui:~ $ gdb /home/pi/dev/lazarus/2.0.6/lazarus r >--pcp=/home/pi/.lazarus_2.0.6 >gdb: unrecognized option '--pcp=/home/pi/.lazarus_2.0.6' >Use `gdb --help' for a complete list of options. > >So now the --pcp... argument to lazarus becomes an argument to gdb??? > > >>(startlazarus is only needed for: restart and if your laz-install dir is >>write-protected (admin install for all users). In the latter case the >>rebuild IDE goes into the config path, so each user can have its own >>rebuild.) > >Does this mean that I should change the Exec in the desktop file >should be changed from startlazarus to simply lazarus? > >>The %f is missing, so you cant double click the file. >>But you need to run gdb from a terminal (so you can execute bt later), > >>so you need to open the file once the IDE runs. > >Normally the previously open project is loaded as soon as the Lazarus >IDE runs, is this not going to happen now (provided one can get rid of >the error message above)? I assume you mean open the project? > >-- After reading the gdb --help screen: pi at rpi4-gui:~ $ gdb --args /home/pi/dev/lazarus/2.0.6/lazarus --pcp=/home/pi/.lazarus_2.0.6 GNU gdb (Raspbian 8.2.1-2) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/pi/dev/lazarus/2.0.6/lazarus...done. (gdb) quit pi at rpi4-gui:~ $ --args needed to send the last arguments to the application Still Lazarus does not show up on screen... -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Sun Nov 24 20:52:49 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 24 Nov 2019 20:52:49 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> Message-ID: On 24/11/2019 20:42, Bo Berglund via lazarus wrote: > > After reading the gdb --help screen: > > pi at rpi4-gui:~ $ gdb --args /home/pi/dev/lazarus/2.0.6/lazarus No --args In the terminal enter gdb /home/pi/dev/lazarus/2.0.6/lazarus then wait for the gdb output. It will end with a "(gdb)" prompt. Now enter r --pcp=/home/pi/.lazarus_2.0.6 Then when the IDE encounters the issue that closes it, the IDE will probably freeze. (paused by gdb) Gdb will probably print something about SigSegv (or similar), and gdb will show a prompt again. At that prompt, you can now type bt and gdb will print the stack for the issue. From freedos.la at gmail.com Sun Nov 24 21:45:54 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Sun, 24 Nov 2019 12:45:54 -0800 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> Message-ID: <02cbf6e2-adc3-9da9-8f05-75774862ee14@gmail.com> On 11/24/2019 10:47 AM, Graeme Geldenhuys via lazarus wrote: > On 23/11/2019 10:43 pm, Ralf Quint via lazarus wrote: >> I personally loath VSCode just as much as VS itself (or XCode, for that >> matter) or Eclipse. > I haven't really used VSCode, but as far as I understand, it's a editor, > not an IDE. The other point being, that it doesn't run on FreeBSD - a > platform I use very often. Don't care about FreeBSD, but it might just be the "modern" thing that someone else (Ryan?) mentioned why I loath both VS and VSCode. It could be for a good part that I am used to the Borland (WS) keyboard mappings and the general editor behavior, after almost 40 years, those have become second nature (and are thoroughly missed whenever I have to use some other environment). > Web only apps is not really my cup of tea. I > don't always work where there is good any any internet. Same here. Specially with the added discomfort of the recent PSPS (Public Safetly Power Shutdown) in our area, which are supposed to become a more common thing now, where we had twice in 10 days the power out for 30h and 38h respectively, which also means that during that time, there is no Internet service either (and no phone, TV and those of us here not on public water supply but on a well, without water, if they didn't have a separate generator for the well pumps). With a generator running to keep the fridge and freezer running as well as basic lighting, I could at least work just fine on my laptop for two long days programming in Lazarus, only interrupted by feeding the dogs and refueling once in a while the generator. And I am within the LA metropolitan area, just minutes from the sprawling urban area... > As for your comment about Eclipse. Just recently I boasted to Michael > about how awesome Eclipse and IntelliJ are (I do Java development these > day). They are like night and day compared to Delphi or Lazarus. The > amount of feature, how well they understand your code, the refactoring > ability, debugging features etc are all out of this world. I don't do Java anymore, if I can by any means avoid it. There are a few other reasons why once in a while I might be forced to use Eclipse (or one of its derivatives) and it is just a bloated, slow as molasses carp... > As for XCode - now there I fully agree with you. I helped out on our iOS > product for a while. XCode is just weird. :-) > Weird would be an extremely nice way to put it. At least they lowered the amount of masochism necessary when starting to transition from ObjectiveC to Swift. Not that this would overall make it more palatable... Ralf From mailinglists at geldenhuys.co.uk Sun Nov 24 22:24:59 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 24 Nov 2019 21:24:59 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <02cbf6e2-adc3-9da9-8f05-75774862ee14@gmail.com> References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <02cbf6e2-adc3-9da9-8f05-75774862ee14@gmail.com> Message-ID: On 24/11/2019 8:45 pm, Ralf Quint via lazarus wrote: > be for a good part that I am used to the Borland (WS) keyboard mappings > and the general editor behavior, after almost 40 years, those have > become second nature (and are thoroughly missed whenever I have to use > some other environment). Oh, I know exactly how you feel. I had a double dose of that 6 months ago, when I had to switch to OSX as my daily development system, and I had to learn IntelliJ IDEA and it's shortcuts. I'm still finding my way, but getting better. 30 plus years of using a PC and 20+ years of using Delphi/Lazarus development tools is a hard habit to kick. ;-) > other reasons why once in a while I might be forced to use Eclipse (or > one of its derivatives) and it is just a bloated, slow as molasses carp... I've heard many say that, but I have not experienced that (maybe older versions from many years ago had that issue). On my desktop PC, which is now 6 years old (Intel i7 system), it starts faster than the latest Delphi does. And while working in it, I experience no performance issues at all. My work MacBook Pro is a lot newer and faster than my desktop, and it definitely doesn't have any performance issues with Eclipse or IntelliJ IDEA. The latter does require more memory, and the fact that if you want to work with multiple projects, you need multiple instances of IntelliJ is not ideal (that's where Eclipse workspaces work very well - though I do close the projects I don't need open). Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From luca at wetron.es Sun Nov 24 22:35:50 2019 From: luca at wetron.es (Luca Olivetti) Date: Sun, 24 Nov 2019 22:35:50 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> Message-ID: <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> El 24/11/19 a les 19:47, Graeme Geldenhuys via lazarus ha escrit: > Web only apps is not really my cup of tea. I > don't always work where there is good any any internet. But you can run a custom web app on a local server, no internet needed. I never wrote something like that, but I have some applications where that could be useful. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Sun Nov 24 22:38:28 2019 From: luca at wetron.es (Luca Olivetti) Date: Sun, 24 Nov 2019 22:38:28 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> Message-ID: <2f910a87-12a6-7568-d5b5-745da6e6e5d7@wetron.es> El 24/11/19 a les 22:35, Luca Olivetti via lazarus ha escrit: > El 24/11/19 a les 19:47, Graeme Geldenhuys via lazarus ha escrit: > > >> Web only apps is not really my cup of tea. I >> don't always work where there is good any any internet. > > But you can run a custom web app on a local server, no internet needed. > I never wrote something like that, but I have some applications where > that could be useful. Correction: I *did* write a web app (using lazarus and freepascal) but a) not of the kind I was thinking of when I wrote the previous message and b) I forgot about it :-D Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From freedos.la at gmail.com Sun Nov 24 22:48:16 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Sun, 24 Nov 2019 13:48:16 -0800 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> Message-ID: <17f4311e-75a9-5695-1481-0bd6ff40c215@gmail.com> On 11/24/2019 1:35 PM, Luca Olivetti via lazarus wrote: > El 24/11/19 a les 19:47, Graeme Geldenhuys via lazarus ha escrit: > > >> Web only apps is not really my cup of tea. I >> don't always work where there is good any any internet. > > But you can run a custom web app on a local server, no internet needed. > I never wrote something like that, but I have some applications where > that could be useful. But that web server is another app that you need to install and support, and another source for dependencies likely out of your control. And certainly nothing that a single user (who just wants to get his/her work done with it) commonly wants to deal with... Ralf From fpc at pascalprogramming.org Sun Nov 24 22:56:18 2019 From: fpc at pascalprogramming.org (Marco van de Voort) Date: Sun, 24 Nov 2019 22:56:18 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> Message-ID: Op 2019-11-24 om 22:35 schreef Luca Olivetti via lazarus: > >> Web only apps is not really my cup of tea. I >> don't always work where there is good any any internet. > > But you can run a custom web app on a local server, no internet needed. Sure, basically when we did webapps we always had local installs for testing etc. But if it is to work on a single laptop, it must not reference any service on the web. So you must even be able to generate it with other locations for default javascript scripts. > I never wrote something like that, but I have some applications where > that could be useful. Mostly testing, and when you have to. But it is not something I prefer, more a hard way to do a simple thing From skalogryz.lists at gmail.com Mon Nov 25 02:00:06 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Sun, 24 Nov 2019 20:00:06 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sat, Nov 23, 2019 at 5:04 PM Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> wrote: > This week in Be.Delphi, (and last week in DüsselDorf, Germany) TMS > Software has unveiled > a VS Code plugin: an Object Pascal RAD IDE. > what about this plugin: https://marketplace.visualstudio.com/items?itemName=alefragnani.pascal it seems like it has been out there for 2 years already. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From genericptr at gmail.com Mon Nov 25 02:06:01 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Sun, 24 Nov 2019 20:06:01 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <9ce6b191acbbc51eb963f55d3ec3052f@gmx.de> Message-ID: > On Nov 24, 2019, at 8:20 AM, Dmitry Boyarintsev via lazarus wrote: > > How are debugging capabilities in VS Code? On Mac it's pretty good I would say but recently I came across a bug (which VSCode claims was from a plugin) that crashed it while debugging (ironically) a Lazarus app. It's ultimately just a LLDB front end so it has the same problems with viewing strings but I still prefer it over Lazarus and I've been using it for that last few years. Regards, Ryan Joseph From luca at wetron.es Mon Nov 25 09:11:01 2019 From: luca at wetron.es (Luca Olivetti) Date: Mon, 25 Nov 2019 09:11:01 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> Message-ID: El 24/11/19 a les 22:56, Marco van de Voort via lazarus ha escrit: > > Op 2019-11-24 om 22:35 schreef Luca Olivetti via lazarus: >> >>> Web only apps is not really my cup of tea. I >>> don't always work where there is good any any internet. >> >> But you can run a custom web app on a local server, no internet needed. > > Sure, basically when we did webapps we always had local installs for > testing etc. But if it is to work on a single laptop, it must not > reference any service on the web. So you must even be able to generate > it with other locations for default javascript scripts. No, that's not what I meant. I meant an internal network with an application specific server used by many clients. > >> I never wrote something like that, but I have some applications where >> that could be useful. > > Mostly testing, and when you have to. But it is not something I prefer, > more a hard way to do a simple thing Sure, for me it's easier to develop a rich native client with lazarus, but I wouldn't mind if, just for *some* specific cases, lazarus allowed me to easily develop a full fledged web application, independent from any external server. It seems that the infrastructure is mostly there (fcl-web, pas2js, etc.) it "just"[*] needs some support from the ide (that's what this poll was about, right?). [*] I know it's not easy, hence the double quotes Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From michael at freepascal.org Mon Nov 25 09:27:46 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 25 Nov 2019 09:27:46 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> Message-ID: On Mon, 25 Nov 2019, Luca Olivetti via lazarus wrote: > El 24/11/19 a les 22:56, Marco van de Voort via lazarus ha escrit: >> >> Op 2019-11-24 om 22:35 schreef Luca Olivetti via lazarus: >>> >>>> Web only apps is not really my cup of tea. I >>>> don't always work where there is good any any internet. >>> >>> But you can run a custom web app on a local server, no internet needed. >> >> Sure, basically when we did webapps we always had local installs for >> testing etc. But if it is to work on a single laptop, it must not >> reference any service on the web. So you must even be able to generate >> it with other locations for default javascript scripts. > > No, that's not what I meant. I meant an internal network with an > application specific server used by many clients. > >> >>> I never wrote something like that, but I have some applications where >>> that could be useful. >> >> Mostly testing, and when you have to. But it is not something I prefer, >> more a hard way to do a simple thing > > Sure, for me it's easier to develop a rich native client with lazarus, > but I wouldn't mind if, just for *some* specific cases, lazarus allowed > me to easily develop a full fledged web application, independent from > any external server. It seems that the infrastructure is mostly there > (fcl-web, pas2js, etc.) it "just"[*] needs some support from the ide > (that's what this poll was about, right?). In order to see the full potential of web components, the IDE needs to be web-enabled. This can be done through recreating the IDE as a web application itself (VS Code, Atom, electron etc) or by allowing it to talk to a browser (by embedding the browser, or invoking the browser somehow). Both approaches are possible. In that sense, this is indeed what the poll is about. Michael. From michael at freepascal.org Mon Nov 25 09:31:08 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 25 Nov 2019 09:31:08 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sun, 24 Nov 2019, Dmitry Boyarintsev via lazarus wrote: > On Sat, Nov 23, 2019 at 5:04 PM Michael Van Canneyt via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> This week in Be.Delphi, (and last week in DüsselDorf, Germany) TMS >> Software has unveiled >> a VS Code plugin: an Object Pascal RAD IDE. >> > > what about this plugin: > https://marketplace.visualstudio.com/items?itemName=alefragnani.pascal > > it seems like it has been out there for 2 years already. I am aware of it. I see 2 differences with OmniPascal: 1. You have access to the sources. This is better than OmniPascal. (I still suspect omnipascal will become paying one day) 2. It uses GNU globals to implement the needed functionality. This is less powerful than OmniPascal which uses an AST to implemment it's functionality. Michael. From bo.berglund at gmail.com Mon Nov 25 10:31:51 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 25 Nov 2019 10:31:51 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <5f82af53-0416-50ea-1a27-7556c77f42eb@mfriebe.de> <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> Message-ID: On Sun, 24 Nov 2019 20:52:49 +0100, Martin Frb via lazarus wrote: >In the terminal enter > >gdb /home/pi/dev/lazarus/2.0.6/lazarus > > >then wait for the gdb output. It will end with a "(gdb)" prompt. >Now enter > >r --pcp=/home/pi/.lazarus_2.0.6 > OK, This worked! Now I have a Lazarus IDE running after starting via gdb. Lets see how long it will take before the next crash... I really do want to work via VNC because then I can use my Win7 PC for researching stuff and copy code into Lazarus when done. If I run directly from the RPi hardware I cannot do that.. -- Bo Berglund Developer in Sweden From skalogryz.lists at gmail.com Mon Nov 25 15:49:18 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Mon, 25 Nov 2019 09:49:18 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Sat, Nov 23, 2019 at 5:26 PM Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> wrote: > > The question whether Lazarus should be remade as an Electron style app? > Do you mean the IDE or all the API/widgets? > > The IDE. That implies the API/Widgets. > Does it mean that LCL should let go all the native targets and become purely web-based? Obviously from the backwards compatibility perspective it's an unlikely option. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Mon Nov 25 15:55:38 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 25 Nov 2019 15:55:38 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Mon, 25 Nov 2019, Dmitry Boyarintsev via lazarus wrote: > On Sat, Nov 23, 2019 at 5:26 PM Michael Van Canneyt via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >>> The question whether Lazarus should be remade as an Electron style app? >> Do you mean the IDE or all the API/widgets? >> >> The IDE. That implies the API/Widgets. >> > Does it mean that LCL should let go all the native targets and become > purely web-based? No, of course not. It "just" means implementing a web widgetset. > Obviously from the backwards compatibility perspective it's an unlikely > option. Nono, I'm not entirely suicidal ;-) Michael. From skalogryz.lists at gmail.com Mon Nov 25 16:42:08 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Mon, 25 Nov 2019 10:42:08 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Mon, Nov 25, 2019 at 9:55 AM Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> wrote: > > Does it mean that LCL should let go all the native targets and become > > purely web-based? > > No, of course not. It "just" means implementing a web widgetset. > So the ultimate goal sounds like: * we need to implement WinAPI on the web-browser * Lazarus project structure needs to have means to differentiate the code between server and client-side? Wasn't there an attempt to start "web" widgetset before? or was is just limited to conversion of LFM to HTML?! thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Mon Nov 25 16:44:56 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 25 Nov 2019 16:44:56 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On Mon, 25 Nov 2019, Dmitry Boyarintsev via lazarus wrote: > On Mon, Nov 25, 2019 at 9:55 AM Michael Van Canneyt via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >>> Does it mean that LCL should let go all the native targets and become >>> purely web-based? >> >> No, of course not. It "just" means implementing a web widgetset. >> > > So the ultimate goal sounds like: > * we need to implement WinAPI on the web-browser That seems like a totally wrong approach to me. > * Lazarus project structure needs to have means to differentiate the code > between server and client-side? No. You would have an explicit server side project, explicit client-side project. Michael. From mailinglists at geldenhuys.co.uk Mon Nov 25 19:18:42 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 25 Nov 2019 18:18:42 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> Message-ID: <13a44a5e-fa2f-7d50-1d99-489ba43f3c6c@geldenhuys.co.uk> On 25/11/2019 8:11 am, Luca Olivetti via lazarus wrote: > I meant an internal network with an > application specific server used by many clients. And that is exactly how the other day we had 500+ IntelliJ IDEA developers in our company that couldn't run IntelliJ. The licensing server died for a couple of hours. I personally had such reliance on a single point of failure. Stand-alone local apps without the reliance of any service on a network (LAN or WAN) is always my preference. I've had the same argument for 15+ years about having offline help too. The help stays compatible with the version of software I have running, and if the internet goes down, I can still access the help. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Mon Nov 25 19:27:22 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 25 Nov 2019 18:27:22 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> Message-ID: <6ae15b0e-a1dd-2f3e-42db-a356f11e5453@geldenhuys.co.uk> On 25/11/2019 8:27 am, Michael Van Canneyt via lazarus wrote: > In order to see the full potential of web components, the IDE needs to be > web-enabled. So you don't like the idea how React development is done? It runs some server in the background and has some "auto reload" feature. You can use *any* text editor to edit the javascript files. As soon as you save, the web browser auto-reloads and you see the result of your changes. For example - see this video: https://youtu.be/sBws8MSXN7A?t=1105 Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From genericptr at gmail.com Mon Nov 25 19:37:31 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Mon, 25 Nov 2019 13:37:31 -0500 Subject: [Lazarus] GTK3 widgets on macOS? Message-ID: Is it possible to build projects using the GTK3 widget set while on Mac? I know GTK3 is cross platform itself so it should be possible to use this instead of the Cocoa widgets right? I try to build and I get pretty far until there is a linker error looking for a .so file: Error: ld: library not found for -lgtk-3.so.0 On macOS I would expect this to be a framework, not a .so file. Any ideas? Regards, Ryan Joseph From pascaldragon at googlemail.com Mon Nov 25 20:07:29 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Mon, 25 Nov 2019 20:07:29 +0100 Subject: [Lazarus] GTK3 widgets on macOS? In-Reply-To: References: Message-ID: Ryan Joseph via lazarus schrieb am Mo., 25. Nov. 2019, 19:37: > Is it possible to build projects using the GTK3 widget set while on Mac? I > know GTK3 is cross platform itself so it should be possible to use this > instead of the Cocoa widgets right? > > I try to build and I get pretty far until there is a linker error looking > for a .so file: > > Error: ld: library not found for -lgtk-3.so.0 > > On macOS I would expect this to be a framework, not a .so file. Any ideas? > You'll likely expect wrong considering that GTK is rather Unix centric and doesn't like to deal with the platformisms of other platforms (both Windows and macOS). You'll likely have to look for a libgtk.3.dylib or so and you'll need to adjust the import library names in the GTK3 units. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From genericptr at gmail.com Mon Nov 25 20:18:50 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Mon, 25 Nov 2019 14:18:50 -0500 Subject: [Lazarus] GTK3 widgets on macOS? In-Reply-To: References: Message-ID: > On Nov 25, 2019, at 2:07 PM, Sven Barth via lazarus wrote: > > You'll likely expect wrong considering that GTK is rather Unix centric and doesn't like to deal with the platformisms of other platforms (both Windows and macOS). > You'll likely have to look for a libgtk.3.dylib or so and you'll need to adjust the import library names in the GTK3 units. > I see in LazGdk3.pas there is a $LINKLIB line which is wrong. On my system at /usr/local/Cellar/gtk+3/3.24.5/lib there is a libgtk-3.dylib which I can link to. I changde these to this: {$LINKLIB libgtk-3.dylib} {$LINKLIB libgdk-3.dylib} I then added -Fl/usr/local/Cellar/gtk+3/3.24.5/lib to the command line but I still get a linker error "Error: ld: library not found for -lgtk-3" For proof: ls /usr/local/Cellar/gtk+3/3.24.5/lib girepository-1.0 libgailutil-3.dylib libgtk-3.0.dylib gtk-3.0 libgdk-3.0.dylib libgtk-3.dylib libgailutil-3.0.dylib libgdk-3.dylib pkgconfig Is that not correct? Regards, Ryan Joseph From Andreas at TheBergerClan.org Mon Nov 25 20:34:38 2019 From: Andreas at TheBergerClan.org (Andreas Berger) Date: Mon, 25 Nov 2019 16:34:38 -0300 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: On 11/23/2019 8:50 PM, Daithi Haxton via lazarus wrote: > For my 2 cents, keep Lazarus as an independent, native code IDE. We do instrumentation packages for manufacturing robots, and “the Web” is simply not an option. Laz makes us at least 10x more productive than any other option (and we’ve tried other options - we still maintain code in C++ and C# using VS and it’s a nightmare compared to the Lazarus environment). > > What really scares us is that all the mainstream OSes are becoming so Web and mobile centric - the way M$ is rumbling I seriously wonder if and how they’ll support any native development in the not too distant future. Lazarus, with it’s native abilities for Linux, gives us a clear path out should M$ abandon manufacturing and the desktop in general - and we are most appreciative! > > Keep up the good work! > > Be well, > Dave H. I second that. Our company would be lost if we have to use the Web. Please keep the IDE. From michael at freepascal.org Mon Nov 25 20:40:18 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 25 Nov 2019 20:40:18 +0100 (CET) Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <6ae15b0e-a1dd-2f3e-42db-a356f11e5453@geldenhuys.co.uk> References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> <6ae15b0e-a1dd-2f3e-42db-a356f11e5453@geldenhuys.co.uk> Message-ID: On Mon, 25 Nov 2019, Graeme Geldenhuys via lazarus wrote: > On 25/11/2019 8:27 am, Michael Van Canneyt via lazarus wrote: >> In order to see the full potential of web components, the IDE needs to be >> web-enabled. > > So you don't like the idea how React development is done? It runs some > server in the background and has some "auto reload" feature. You can use > *any* text editor to edit the javascript files. As soon as you save, the > web browser auto-reloads and you see the result of your changes. > > For example - see this video: > > https://youtu.be/sBws8MSXN7A?t=1105 I know this. We have the same for pas2js, there is a demo for it. But this is still not RAD. Developing a GUI with RAD is simply faster. Michael. From luca at wetron.es Mon Nov 25 20:47:39 2019 From: luca at wetron.es (Luca Olivetti) Date: Mon, 25 Nov 2019 20:47:39 +0100 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: <13a44a5e-fa2f-7d50-1d99-489ba43f3c6c@geldenhuys.co.uk> References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> <13a44a5e-fa2f-7d50-1d99-489ba43f3c6c@geldenhuys.co.uk> Message-ID: <1dc3a7df-2ed4-46a7-efdb-2adb576ff26a@wetron.es> El 25/11/19 a les 19:18, Graeme Geldenhuys via lazarus ha escrit: > On 25/11/2019 8:11 am, Luca Olivetti via lazarus wrote: >> I meant an internal network with an >> application specific server used by many clients. > > And that is exactly how the other day we had 500+ IntelliJ IDEA > developers in our company that couldn't run IntelliJ. The licensing > server died for a couple of hours. I personally had such reliance on a > single point of failure. Sure, but that's not a custom application > > Stand-alone local apps without the reliance of any service on a network > (LAN or WAN) is always my preference. Since the application I'm thinking of needs to access the server anyway, even as it is now (a native executable) it would stop working if the server wasn't accessible. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From mailinglists at geldenhuys.co.uk Mon Nov 25 20:58:49 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 25 Nov 2019 19:58:49 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <32ac1dbc-4d29-0840-84b9-e44fe62d5a9e@gmail.com> <49357229-8de4-9ab1-0a9f-5dfecf902fbc@wetron.es> <6ae15b0e-a1dd-2f3e-42db-a356f11e5453@geldenhuys.co.uk> Message-ID: On 25/11/2019 7:40 pm, Michael Van Canneyt via lazarus wrote: > I know this. We have the same for pas2js, there is a demo for it. > > But this is still not RAD. Developing a GUI with RAD is simply faster. I need to watch some FPC videos and try some more demos. I'm clearly lagging behind on what FPC can do for the web these days. ;-) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From pascaldragon at googlemail.com Tue Nov 26 00:03:53 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Tue, 26 Nov 2019 00:03:53 +0100 Subject: [Lazarus] GTK3 widgets on macOS? In-Reply-To: References: Message-ID: Ryan Joseph via lazarus schrieb am Mo., 25. Nov. 2019, 20:19: > > > > On Nov 25, 2019, at 2:07 PM, Sven Barth via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > > > > You'll likely expect wrong considering that GTK is rather Unix centric > and doesn't like to deal with the platformisms of other platforms (both > Windows and macOS). > > You'll likely have to look for a libgtk.3.dylib or so and you'll need to > adjust the import library names in the GTK3 units. > > > > I see in LazGdk3.pas there is a $LINKLIB line which is wrong. On my system > at /usr/local/Cellar/gtk+3/3.24.5/lib there is a libgtk-3.dylib which I can > link to. I changde these to this: > > {$LINKLIB libgtk-3.dylib} > {$LINKLIB libgdk-3.dylib} > > I then added -Fl/usr/local/Cellar/gtk+3/3.24.5/lib to the command line but > I still get a linker error "Error: ld: library not found for -lgtk-3" > > For proof: > > ls /usr/local/Cellar/gtk+3/3.24.5/lib > girepository-1.0 libgailutil-3.dylib libgtk-3.0.dylib > gtk-3.0 libgdk-3.0.dylib libgtk-3.dylib > libgailutil-3.0.dylib libgdk-3.dylib pkgconfig > > Is that not correct? > Should be. 🤔 Would you please compile with -sh option which will generate a ppas.sh file (I think) in the output directory (I think as well) which will contain the command line the linker will be called with and check that? Maybe you can then pass some verbosity switch to the linker to find out what goes wrong... Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From genericptr at gmail.com Tue Nov 26 00:12:12 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Mon, 25 Nov 2019 18:12:12 -0500 Subject: [Lazarus] GTK3 widgets on macOS? In-Reply-To: References: Message-ID: > On Nov 25, 2019, at 6:03 PM, Sven Barth via lazarus wrote: > > Should be. 🤔 > > Would you please compile with -sh option which will generate a ppas.sh file (I think) in the output directory (I think as well) which will contain the command line the linker will be called with and check that? Maybe you can then pass some verbosity switch to the linker to find out what goes wrong... > Maybe I'm just doing Lazarus wrong. It appears -sh is already enabled because I get a ppaslink.sh. #!/bin/sh DoExitAsm () { echo "An error occurred while assembling $1"; exit 1; } DoExitLink () { echo "An error occurred while linking $1"; exit 1; } OFS=$IFS IFS=" " /usr/bin/ld /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/crt1.10.5.o -multiply_defined suppress -L. -o /Users/ryanjoseph/Desktop/lazgtktest/project1 `cat /Users/ryanjoseph/Desktop/lazgtktest/link.res` if [ $? != 0 ]; then DoExitLink ; fi IFS=$OFS Here's the full command line copied from Lazarus. /usr/local/bin/fpc -MObjFPC -Scghi -O1 -gw -gl -l -vewnhibq -Filib/x86_64-darwin -Fl/usr/local/Cellar/gtk+3/3.24.5/lib -Fu../../Developer/lazarus/lcl/units/x86_64-darwin/gtk3 -Fu../../Developer/lazarus/lcl/units/x86_64-darwin -Fu../../Developer/lazarus/components/lazutils/lib/x86_64-darwin -Fu../../Developer/lazarus/packager/units/x86_64-darwin -Fu. -FUlib/x86_64-darwin -FE. -oproject1 -dLCL -dLCLgtk3 Regards, Ryan Joseph From bo.berglund at gmail.com Tue Nov 26 21:38:09 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 26 Nov 2019 21:38:09 +0100 Subject: [Lazarus] The future of the Lazarus IDE References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> Message-ID: On Sun, 24 Nov 2019 11:35:20 +0100, Florian Klämpfl via lazarus wrote: >> I for one spend 3-4 months every year in my cottage where we only have >> mobile Internet and at speeds that vary depending on how many >> neighbors are visiting the island all at the same time. In popular >> summer weeks speeds go down into low single digit Mbit/s. > >May I quote you in discussions :)))? Here in Germany, Sweden is always >taken as an example where even the smallest cottage has internet by fiber. Of course :-) But my summer cottage case is a special one: sparesly populated area with difficult terrain, mostly granite islands with very little soil for digging. At least 2, maybe 3 years ago I signed up for fiber access to my summer cottage in the Stockholm archipelago. Apparently they would get me connected within a year. Still no fiber... But only yesterday I received an email from the company stating that they were now working on the fiber poroject on these islands. Apparently they think they can connect us within 2 years or so.... At home (a suburb of Stockholm) I have 250/100 fiber since 2013. That makes it even more of a drag to be subjected to the mobile broadband data speeds. When it is good at the island (spring/autumn) one can get maybe 20/5 Mbit/s but during summer vacations when the population multiplies many times over it drops to sub-Mbit/s very often. Too much on-line video usage, I think. -- Bo Berglund Developer in Sweden From doug at moosemail.net Tue Nov 26 21:59:29 2019 From: doug at moosemail.net (DougC) Date: Tue, 26 Nov 2019 15:59:29 -0500 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> Message-ID: <16ea98310c7.daad382f263179.7348959026407713722@moosemail.net> On coastal islands here in Maine, USA, some islands have chosen to simply lay the fiber cables on the ground rather than bury them or place them on poles as long as the run does not cross roads or other potentially damaging obstacles. Seems to be working well. Good luck getting faster service! Doug C. ---- On Tue, 26 Nov 2019 15:38:09 -0500 Bo Berglund via lazarus wrote ---- On Sun, 24 Nov 2019 11:35:20 +0100, Florian Klämpfl via lazarus wrote: >May I quote you in discussions :)))? Here in Germany, Sweden is always >taken as an example where even the smallest cottage has internet by fiber. Of course :-) But my summer cottage case is a special one: sparesly populated area with difficult terrain, mostly granite islands with very little soil for digging. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Wed Nov 27 19:56:48 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 27 Nov 2019 18:56:48 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: <42884876-11ec-c748-94b0-5ea1e9d329fd@freepascal.org> Message-ID: <271d6ef0-23a7-68eb-ca42-80eef70ec526@geldenhuys.co.uk> On 26/11/2019 8:38 pm, Bo Berglund via lazarus wrote: > one can get maybe 20/5 Mbit/s but during summer vacations when the > population multiplies many times over it drops to sub-Mbit/s very > often. > Too much on-line video usage, I think. LOL - 7 years ago when I still lived in South Africa... "super broadband" was considered 5-10/0.5 MBps, but in reality you only got around 2-3/0.25 MBps. The most popular (affordable) broadband was still 512/256 KBps! Fibre didn't exist back then, and is probably not affordable now (if it exist). So imagine my delight when I arrived in the UK and order fibre to the home with 200MBps speeds, and was really affordable. :-) I now have 250/30 (the most we can get in our area) and still smiling all the way. The UK is still lagging behind many other countries for upload speeds [as far as I know], but hopefully we will get there some day. First we got to sort out that little thorn in the side called Brexit. ;-) Regards, Graeme From bo.berglund at gmail.com Thu Nov 28 12:08:30 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 28 Nov 2019 12:08:30 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> Message-ID: On Mon, 25 Nov 2019 10:31:51 +0100, Bo Berglund via lazarus wrote: >OK, This worked! >Now I have a Lazarus IDE running after starting via gdb. >Lets see how long it will take before the next crash... So it has been running fine now for 72 hours while I have coded a lot. No crashes that plagued me last week. :) Two possibilities: 1) GDB itself makes the Lazarus application behave better? 2) Not using startlazarus when starting lazarus? I did use the lazarus program for gdb and not startlazarus... If it is the second item then I could well create another desktop file that starts lazarus directly instead of using startlazarus in the exec command in the desktop file. OTOH, if I want to add a package to Lazarus it is my understanding that it needs startlazarus in order to recompile itself properly. So is that only possible if I have started lazarus by startlazarus or will it be able to do the same also if it runs from lazarus only? Note that here I am talking about running in Linux (Raspbian) and NOT on Windows... -- Bo Berglund Developer in Sweden From nc-gaertnma at netcologne.de Thu Nov 28 12:11:45 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 28 Nov 2019 12:11:45 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> Message-ID: <20191128121145.0c603613@limapholos.matflo.wg> On Thu, 28 Nov 2019 12:08:30 +0100 Bo Berglund via lazarus wrote: > On Mon, 25 Nov 2019 10:31:51 +0100, Bo Berglund via lazarus > wrote: > > >OK, This worked! > >Now I have a Lazarus IDE running after starting via gdb. > >Lets see how long it will take before the next crash... > > So it has been running fine now for 72 hours while I have coded a lot. > No crashes that plagued me last week. :) > > Two possibilities: > 1) GDB itself makes the Lazarus application behave better? > 2) Not using startlazarus when starting lazarus? > > I did use the lazarus program for gdb and not startlazarus... > > If it is the second item then I could well create another desktop file > that starts lazarus directly instead of using startlazarus in the exec > command in the desktop file. > > OTOH, if I want to add a package to Lazarus it is my understanding > that it needs startlazarus in order to recompile itself properly. > So is that only possible if I have started lazarus by startlazarus or > will it be able to do the same also if it runs from lazarus only? It can be started either way. The restart uses startlazarus. Of course you can just close and start it manually as well. > Note that here I am talking about running in Linux (Raspbian) and NOT > on Windows... Mattias From bo.berglund at gmail.com Thu Nov 28 14:04:33 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 28 Nov 2019 14:04:33 +0100 Subject: [Lazarus] Customizing Lazarus IDE, some items hard to find... Message-ID: I am used to a certain style of code formatting including coloring etc. Now I am strugglking again to find where one sets these items... It is not obvious to me but I know I have gotten advice before but I cannot find it again. So: when a property of an item is completed the IDE puts =; after the item. Like so: TS.Active:=; The 3 last chars are entered by Lazarus when I select the Active word in the drop-down that appears. I want it to look like this inmstead: TS.Active := ; So I want to have a space both before and after := How can that be done? The closest I get is Options/CodeTools/Space But no matter if I check or uncheck the box before "Colon" there is no space added. Where can I locate this setting (the working one)? -- Bo Berglund Developer in Sweden From nc-gaertnma at netcologne.de Thu Nov 28 14:21:51 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 28 Nov 2019 14:21:51 +0100 Subject: [Lazarus] Customizing Lazarus IDE, some items hard to find... In-Reply-To: References: Message-ID: <20191128142151.147ebfb0@limapholos.matflo.wg> On Thu, 28 Nov 2019 14:04:33 +0100 Bo Berglund via lazarus wrote: > I am used to a certain style of code formatting including coloring > etc. > Now I am strugglking again to find where one sets these items... > > It is not obvious to me but I know I have gotten advice before but I > cannot find it again. > > So: when a property of an item is completed the IDE puts =; after the > item. Like so: > TS.Active:=; > > The 3 last chars are entered by Lazarus when I select the Active word > in the drop-down that appears. > > I want it to look like this inmstead: > > TS.Active := ; > > So I want to have a space both before and after := > How can that be done? > > The closest I get is Options/CodeTools/Space > But no matter if I check or uncheck the box before "Colon" there is no > space added. Insert space before "Symbol". ":" and ":=" are different tokens. > Where can I locate this setting (the working one)? Mattias From lazarus at mfriebe.de Thu Nov 28 15:10:00 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Thu, 28 Nov 2019 15:10:00 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> Message-ID: <7a7e149d-93c2-8fb2-a6f7-863ee7d0260e@mfriebe.de> On 28/11/2019 12:08, Bo Berglund via lazarus wrote: > On Mon, 25 Nov 2019 10:31:51 +0100, Bo Berglund via lazarus > wrote: > >> OK, This worked! >> Now I have a Lazarus IDE running after starting via gdb. >> Lets see how long it will take before the next crash... > So it has been running fine now for 72 hours while I have coded a lot. > No crashes that plagued me last week. :) > > Two possibilities: > 1) GDB itself makes the Lazarus application behave better? > 2) Not using startlazarus when starting lazarus? > > I did use the lazarus program for gdb and not startlazarus... > Yes, it is important to use "lazarus" not "startlazarus" in gdb. gdb only debugs the program it started. By default it will not do anything to sub  processes. That also means restarting the IDE will stop it from being debugged. gdb should not have much effect. So there a slight changes in timing (eg when libraries are loaded). This could change race-conditions. It could be something different in the remote connection.... There could be a bug in startlazarus, and maybe it started an old/buggy lazarus from some other place... (not sure, but....) Or it could be, that when launching in GDB (and with that in a terminal) there is a console. That means, if someone put an unprotected "writeln" somewhere in the IDE code, it could write to console. Otherwise stdout would be a closed handle. You could try running lazarus, without gdb, but with output redirection to a file. Lazarus has some logging that checks for an open console. So there will be content in that file, that does not confirm anything about a rogue writeln. But if there were no crash, it could be a hint. From lazarus at mfriebe.de Thu Nov 28 15:14:47 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Thu, 28 Nov 2019 15:14:47 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: <7a7e149d-93c2-8fb2-a6f7-863ee7d0260e@mfriebe.de> References: <922rrel924n9muvkhh48o6pigecc3qbujn@4ax.com> <2a0a646a-8477-2c63-f273-da0a32036aff@mfriebe.de> <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> <7a7e149d-93c2-8fb2-a6f7-863ee7d0260e@mfriebe.de> Message-ID: <3a12b96d-35c2-7860-3e98-e1eb61d9f2dc@mfriebe.de> On 28/11/2019 15:10, Martin Frb via lazarus wrote: > > You could try running lazarus, without gdb, but with output > redirection to a file. > Lazarus has some logging that checks for an open console. So there > will be content in that file, that does not confirm anything about a > rogue writeln. But if there were no crash, it could be a hint. you could try lazarus --debug-log=/home/NAME/good-log.txt  > /home/NAME/bad-log.txt The first part redirects any proper logging. So anything that goes into the 2nd file, would need to be checked. From bo.berglund at gmail.com Thu Nov 28 19:05:03 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 28 Nov 2019 19:05:03 +0100 Subject: [Lazarus] Customizing Lazarus IDE, some items hard to find... References: <20191128142151.147ebfb0@limapholos.matflo.wg> Message-ID: On Thu, 28 Nov 2019 14:21:51 +0100, Mattias Gaertner via lazarus wrote: >> So I want to have a space both before and after := >> How can that be done? >> >> The closest I get is Options/CodeTools/Space >> But no matter if I check or uncheck the box before "Colon" there is no >> space added. > >Insert space before "Symbol". >":" and ":=" are different tokens. > > >> Where can I locate this setting (the working one)? So "Symbol" is a generic term in this case? It solved the problem when completing the call to a method of the object. :) I removed the add space before Comma and Semicolon too. Now working much better! Thanks! -- Bo Berglund Developer in Sweden From MSchnell at lumino.de Fri Nov 29 10:58:42 2019 From: MSchnell at lumino.de (Michael Schnell) Date: Fri, 29 Nov 2019 09:58:42 +0000 Subject: [Lazarus] The future of the Lazarus IDE In-Reply-To: References: Message-ID: IMHO, in the end it should be possible to do an application in an RAD-way (if desired), test it on a desktop (using the desktop Widgets for its GUI), scale it (by defining parts of the procedures as "Remote"), and finally (just by re-compiling) have it run as a combination of application-parts running as WEBASM in the browser (and used the browser for its GUI) and application-parts running on the Server as fully compiled native code. The infrastructure would need to automatically provide the communication means (shared objects, remote procedure calls, ...) via Websockts. -Michael From bo.berglund at gmail.com Fri Nov 29 17:27:53 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 29 Nov 2019 17:27:53 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> <7a7e149d-93c2-8fb2-a6f7-863ee7d0260e@mfriebe.de> <3a12b96d-35c2-7860-3e98-e1eb61d9f2dc@mfriebe.de> Message-ID: <0mg2ue52lb66fut5bgvulu181ineoeav05@4ax.com> On Thu, 28 Nov 2019 15:14:47 +0100, Martin Frb via lazarus wrote: >On 28/11/2019 15:10, Martin Frb via lazarus wrote: >> >> You could try running lazarus, without gdb, but with output >> redirection to a file. >> Lazarus has some logging that checks for an open console. So there >> will be content in that file, that does not confirm anything about a >> rogue writeln. But if there were no crash, it could be a hint. > >you could try > >lazarus --debug-log=/home/NAME/good-log.txt  > /home/NAME/bad-log.txt > >The first part redirects any proper logging. So anything that goes into >the 2nd file, would need to be checked. So I shut down the gdb session and edited the desktop file to not use startlazarus, but lazarus directly. Then started Lazarus IDE and continued writing code. Seemed to work fine until just a couple of minutes ago when the crash happened again. So it was not the fact I was using startlazarus that made it vulnerable... The crash happened as I doubleclicked an identifier in the code in order to replace the name with the clipboard content. I will now go back to starting lazarus with gdb again like I did before so I can get a longer crash-free session. I also wonder exactly what you meant for me to do above concerning the debug-log? Do you mean for me to use that command inside gdb to start lazarus? In that case I also need to set the --pcp option, right? Or did you mean it as an alternative test to what I tried just before with a *regular* start but with lazarus rather than startlazarus? I.e. in terminal: /home/pi/dev/lazarus/2.6.0/lazarus --pcp=/home/pi/.lazarus_2.0.6 --debug-log=/home/pi/log/good-log.txt  > /home/pi/log/bad-log.txt I am now running via gdb again exactly as I did before the test without gdb. -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Fri Nov 29 18:11:12 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 29 Nov 2019 18:11:12 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: <0mg2ue52lb66fut5bgvulu181ineoeav05@4ax.com> References: <929b92da-ce60-37d8-9d3e-82872d836986@mfriebe.de> <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> <7a7e149d-93c2-8fb2-a6f7-863ee7d0260e@mfriebe.de> <3a12b96d-35c2-7860-3e98-e1eb61d9f2dc@mfriebe.de> <0mg2ue52lb66fut5bgvulu181ineoeav05@4ax.com> Message-ID: <8882f5ac-af3c-0ec6-e2f4-17910a5a8af1@mfriebe.de> On 29/11/2019 17:27, Bo Berglund via lazarus wrote: > I also wonder exactly what you meant for me to do above concerning the > debug-log? > Do you mean for me to use that command inside gdb to start lazarus? > In that case I also need to set the --pcp option, right? > > Or did you mean it as an alternative test to what I tried just before > with a *regular* start but with lazarus rather than startlazarus? > > I.e. in terminal: > /home/pi/dev/lazarus/2.6.0/lazarus --pcp=/home/pi/.lazarus_2.0.6 > --debug-log=/home/pi/log/good-log.txt  > /home/pi/log/bad-log.txt > As an alternative test, with a command line as you wrote above. Background (not sure if it applies on all OS....): - If you start a GUI app from your desktop it usually has no stdout/stdin. Those handles are closed. - If you use write/read on such a closed handle, then that usually leads to a crash. - Most code in Lazarus uses the debug logger, which only writes to stdout if it is open When you start from gdb, gdb has stdin/out => and lazarus inherits those handles. "write" will therefore be fine. In the above "--debug-log" you redirect all the safe output to one file (which you can periodically clean), and leave any other "writeln" output to go to the other file. If you check "bad-log" for any content, then we will know if (and even what) was written in a maybe un-safe way (the code could still be governed by appropriate checks, but that could be verified). Also knowing where such text is written, it could be asserted if it might be related to mouse clicks (or other actions)  in the source editor. Of course this is just a guess. But it may be worth following it through. The only odd part is, that if there was such a writeln, I would expect a lot more people having problems.... But one never knows. Maybe something particular in your code causes this "write". Or a package added to the IDE.... From bo.berglund at gmail.com Fri Nov 29 22:26:21 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 29 Nov 2019 22:26:21 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... References: <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> <7a7e149d-93c2-8fb2-a6f7-863ee7d0260e@mfriebe.de> <3a12b96d-35c2-7860-3e98-e1eb61d9f2dc@mfriebe.de> <0mg2ue52lb66fut5bgvulu181ineoeav05@4ax.com> <8882f5ac-af3c-0ec6-e2f4-17910a5a8af1@mfriebe.de> Message-ID: On Fri, 29 Nov 2019 18:11:12 +0100, Martin Frb via lazarus wrote: >The only odd part is, that if there was such a writeln, I would expect a >lot more people having problems.... But one never knows. Maybe something >particular in your code causes this "write". Or a package added to the >IDE.... Well, my code does not really get involved in this because it is just a bunch of text files the IDE is showing for editing, right? Because the crash happens when I am editing and typically when I click on something in the editor window. I never ever run my code in the IDE, I just compile and then I run it from a command window. Concerning packages I have added a few to the IDE (and rebuilt it afterwards): Indylaz, UniqueInstance (via OLPM) and PasLibVlc (for video editing) via a package file I downloaded. -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Sat Nov 30 00:02:54 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sat, 30 Nov 2019 00:02:54 +0100 Subject: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits... In-Reply-To: References: <82ilte1aup6kbd65b2cqtfe9re6r70fd7n@4ax.com> <7a7e149d-93c2-8fb2-a6f7-863ee7d0260e@mfriebe.de> <3a12b96d-35c2-7860-3e98-e1eb61d9f2dc@mfriebe.de> <0mg2ue52lb66fut5bgvulu181ineoeav05@4ax.com> <8882f5ac-af3c-0ec6-e2f4-17910a5a8af1@mfriebe.de> Message-ID: On 29/11/2019 22:26, Bo Berglund via lazarus wrote: > > Well, my code does not really get involved in this because it is just > a bunch of text files the IDE is showing for editing, right? > Because the crash happens when I am editing and typically when I click > on something in the editor window. But the editor has stuff like codetools and highlighters, and those parse your code. So they behave according to what they find. From nc-gaertnma at netcologne.de Sat Nov 30 10:06:53 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 30 Nov 2019 10:06:53 +0100 Subject: [Lazarus] macOS Catalina Message-ID: <20191130100653.02cfcfa7@limapholos.matflo.wg> Hi all, I uploaded a fixed version of the macOS 64bit fpc installer on sourceforge: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/ Mattias