Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On Tue, 9 Feb 2016 15:21:30 -0500 Dmitry Boyarintsevwrote: > On Mon, Feb 8, 2016 at 6:22 PM, Mattias Gaertner > wrote: >[...] > Is it true to say that there are only 2 ways in IDE to set defines. > 1) Project Options/Custom Options > 2) Project Options/Additions and Overrides (+ Custom Option) 3) Packages have their own custom options and can add custom options to the project. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On 02/09/2016 04:10 AM, Bo Berglund wrote: On Mon, 8 Feb 2016 23:24:35 +0100, mic...@gmail.com wrote: I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie. reboot ist not needed on linux use a console and kill command Ctrl-Alt-F1 for console Or use the terminal icon on the taskbar, right? But then what? How do I use kill to shut down Lazarus? I am used to Windows Task Manager where the running programs are listed and one can stop it, but how do I get a corresponding list in which to select Lazarus in Linux? i generally use something like this ps aux | grep -Ei -e "[l]azarus" the square braces around the first letter in the grep cause grep to find the real occurrence and not a second one which would be itself... one can also use the system monitor or top or numerous other tools that show what programs and services are running... most all of those will show the pid... i was also thinking that there might be a pid file for lazarus... they're generally found in /var/run but i don't see one in there... IF there were one, one could use a command similar to this... kill -TERM `cat /var/run/Lazarus.pid` OR kill -TERM `pgrep Lazarus` note that there is case sensitivity at play with the file name of the PID... and once again, lazarus apparently does not have a pid file... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On Mon, Feb 8, 2016 at 6:22 PM, Mattias Gaertnerwrote: > Do you mean you added -dUseCThreads in > Project/Project_Options/Custom_Options, > but it is not appended to options passed to FPC? > Is it true to say that there are only 2 ways in IDE to set defines. 1) Project Options/Custom Options 2) Project Options/Additions and Overrides (+ Custom Option) thanks, Dmitry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On Tue, 9 Feb 2016 00:22:21 +0100 (CET), Mattias Gaertnerwrote: >> I tried setting the conditional "UseCThreads" for my test project but >> even though I can reach the place where this apparently is set: >> Menu: Project/Project_Options/Custom_Options/Defines >> it seems not to work! > >Do you mean you added -dUseCThreads in Project/Project_Options/Custom_Options, >but it is not appended to options passed to FPC? No I did not add the -d in front of the UseCThreads symbol, just the symbol itself. I used Menu: Project/Project_Options/Compiler_Options/Custom_Options This was the only place I found the word Defines, which appears on a button to the right. It is in subnode Compiler_Options, which did not sound right to me anyway since I wanted the symbol to be global including the Lazarus IDE code parser, but I did not find defines anywhere else... Then I clicked the button and an input dialog named Defines popped up. It has a text input box named Define into which I typed UseCThreads Then I clicked the Add button and this name appeared in the list below, so I clicked OK and the input dialog disappeared and I was back in the Custom_Options dialog with nothing showing in the list there. If I cancel at this point everything works out except for the define but on the second try I clicked OK and then Lazarus locked up. > >> When I use this dialog to enter the symbol UseCThreads the effect is >> invisible when I hit OK > >Did you enable the checkbox of the define? I see a checkbox "Build modes" on top of the Custom_Options dialog, is this the box you mean? I have not checked it. >>, nothing gets added to the list of >> defines/options and when I OK on the main options window anyway >> Lazarus locks up completely!!! > >It works here on OS X/carbon. Maybe the bug only appears on your platform. It should not be any different, Lazarus itself uses the same sources on all plöatforms as far as I understand. I retrieved 1.6RC2 from svn when I built Lazarus. Different workaround solution: If I open the project file and add this directly on the next line following the top line "program MyTCPTest": {$DEFINE UseCThreads} then it actually does work. But the Delphi way seems easier with a separate project option for the defines... -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On Mon, 8 Feb 2016 23:24:35 +0100, mic...@gmail.com wrote: >> I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie. >reboot ist not needed on linux >use a console and kill command >Ctrl-Alt-F1 for console Or use the terminal icon on the taskbar, right? But then what? How do I use kill to shut down Lazarus? I am used to Windows Task Manager where the running programs are listed and one can stop it, but how do I get a corresponding list in which to select Lazarus in Linux? 'man kill' indicates that I need a value but 'man pid' returns nothing. >Ctrl-Alt-F7 to go back to X > >UseCThreads is normaly added in the *.lpr file >Project->Project Inspektor > doubleclick lpr file When I added {$DEFINE UseCThreads} as the first line following the program line it works. :) -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On 02/09/2016 10:10 AM, Bo Berglund wrote: > On Mon, 8 Feb 2016 23:24:35 +0100, mic...@gmail.com wrote: > > I am used to Windows Task Manager where the running programs are > listed and one can stop it, but how do I get a corresponding list in > which to select Lazarus in Linux? All linux flavors have this as well. In kUbuntu it is called system monitor (underlying name is ksysguard). > 'man kill' indicates that I need a value but 'man pid' returns > nothing. use ps command (ps --help all) to get PID's. ps aux is a good start, but use grep to winnow it down. Julius -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On Tue, 9 Feb 2016 11:32:10 +0100, JuuSwrote: >> 'man kill' indicates that I need a value but 'man pid' returns >> nothing. > >use ps command (ps --help all) to get PID's. ps aux is a good start, >but use grep to winnow it down. Tried this: pi@rpi2-jessie2:~ $ ps -u pi |grep lazarus 5091 ?00:00:00 startlazarus 5094 ?00:00:10 lazarus Seems to be two processes with lazarus in the name. Which one (or both) do I kill? -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On Tue, Feb 09, 2016 at 10:10:05AM +0100, Bo Berglund wrote: > 'man kill' indicates that I need a value but 'man pid' returns > nothing. `killall` takes the name of the process, and tab completion works on most systems I've tried. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On 09/02/16 10:38, Bo Berglund wrote: No I did not add the -d in front of the UseCThreads symbol, just the symbol itself. I used Menu: Project/Project_Options/Compiler_Options/Custom_Options This was the only place I found the word Defines, which appears on a button to the right. It is in subnode Compiler_Options, which did not sound right to me anyway since I wanted the symbol to be global including the Lazarus IDE code parser, but I did not find defines anywhere else... Manual way: Add -dUseCThreads in Project/Project_Options/Compiler_Options/Custom_Options Then I clicked the button and an input dialog named Defines popped up. It has a text input box named Define into which I typed UseCThreads Then I clicked the Add button and this name appeared in the list below, so I clicked OK and the input dialog disappeared and I was back in the Custom_Options dialog with nothing showing in the list there. If I cancel at this point everything works out except for the define but on the second try I clicked OK and then Lazarus locked up. If you use the defines button, make sure the checkbox next to UseCThreads is ticked. -dUseCThreads will show up automatically in Project/Project_Options/Compiler_Options/Custom_Options Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On 02/09/2016 11:56 AM, Bo Berglund wrote: > On Tue, 9 Feb 2016 11:32:10 +0100, JuuSwrote: > >>> 'man kill' indicates that I need a value but 'man pid' returns >>> nothing. >> >> use ps command (ps --help all) to get PID's. ps aux is a good start, >> but use grep to winnow it down. > > Tried this: > pi@rpi2-jessie2:~ $ ps -u pi |grep lazarus > 5091 ?00:00:00 startlazarus > 5094 ?00:00:10 lazarus > > Seems to be two processes with lazarus in the name. > Which one (or both) do I kill? I would assume the higher PID is the child of the lower. You can also specify --forest with the ps command and it gives ascii art tree showing parent child relationships. I'm no linux expert but I would kill child first then parent. But it may be killing parent automatically kills child.?. Then again you can use (at least in kUbuntu) the system monitor to kill processes, right click on the entry on the processes tab. > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
Am Tuesday 09 February 2016 10:10:05 schrieb Bo Berglund: > On Mon, 8 Feb 2016 23:24:35 +0100, mic...@gmail.com wrote: > >> I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie. > > > >reboot ist not needed on linux > >use a console and kill command > >Ctrl-Alt-F1 for console > > Or use the terminal icon on the taskbar, right? > But then what? How do I use kill to shut down Lazarus? > I am used to Windows Task Manager where the running programs are > listed and one can stop it, but how do I get a corresponding list in > which to select Lazarus in Linux? > 'man kill' indicates that I need a value but 'man pid' returns > nothing. > > >Ctrl-Alt-F7 to go back to X > > > >UseCThreads is normaly added in the *.lpr file > >Project->Project Inspektor > > doubleclick lpr file > > When I added > {$DEFINE UseCThreads} > as the first line following the program line it works. > > :) man top ;) 'top' command is your friend then k for kill then the signal to kill 9 for termination ;) 15 for asking polite to close ;) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] How to set defines for a project? Lazarus crashes...
I tried setting the conditional "UseCThreads" for my test project but even though I can reach the place where this apparently is set: Menu: Project/Project_Options/Custom_Options/Defines it seems not to work! When I use this dialog to enter the symbol UseCThreads the effect is invisible when I hit OK, nothing gets added to the list of defines/options and when I OK on the main options window anyway Lazarus locks up completely!!! Only way out seems to be to reboot the machine! I have not fond any way to open a menu or interact with the Lazarus IDE any other way after this happened so now my option is to restart the operating system. It IS still possible to move the Lazarus windows around on the desktop but not to close Lazarus or interact in any other way. :( Is it not supposed to be possible to use this dialog that clearly offers to add a define to actually do this? In Delphi this is available in a dialog along with the path settings, which is very convenient to use... I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie. -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
Am Monday 08 February 2016 20:24:36 schrieb Bo Berglund: > I tried setting the conditional "UseCThreads" for my test project but > even though I can reach the place where this apparently is set: > Menu: Project/Project_Options/Custom_Options/Defines > it seems not to work! > > When I use this dialog to enter the symbol UseCThreads the effect is > invisible when I hit OK, nothing gets added to the list of > defines/options and when I OK on the main options window anyway > Lazarus locks up completely!!! > Only way out seems to be to reboot the machine! > I have not fond any way to open a menu or interact with the Lazarus > IDE any other way after this happened so now my option is to restart > the operating system. > It IS still possible to move the Lazarus windows around on the desktop > but not to close Lazarus or interact in any other way. :( > > Is it not supposed to be possible to use this dialog that clearly > offers to add a define to actually do this? > > In Delphi this is available in a dialog along with the path settings, > which is very convenient to use... > > I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie. reboot ist not needed on linux use a console and kill command Ctrl-Alt-F1 for console and Ctrl-Alt-F7 to go back to X UseCThreads is normaly added in the *.lpr file Project->Project Inspektor doubleclick lpr file -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
> Bo Berglundhat am 8. Februar 2016 um 20:24 > geschrieben: > > I tried setting the conditional "UseCThreads" for my test project but > even though I can reach the place where this apparently is set: > Menu: Project/Project_Options/Custom_Options/Defines > it seems not to work! Do you mean you added -dUseCThreads in Project/Project_Options/Custom_Options, but it is not appended to options passed to FPC? > When I use this dialog to enter the symbol UseCThreads the effect is > invisible when I hit OK Did you enable the checkbox of the define? >, nothing gets added to the list of > defines/options and when I OK on the main options window anyway > Lazarus locks up completely!!! It works here on OS X/carbon. Maybe the bug only appears on your platform. >[...] Only way out seems to be to reboot the machine! > I have not fond any way to open a menu or interact with the Lazarus > IDE any other way after this happened so now my option is to restart > the operating system. > It IS still possible to move the Lazarus windows around on the desktop > but not to close Lazarus or interact in any other way. :( Maybe the focus is captured. > Is it not supposed to be possible to use this dialog that clearly > offers to add a define to actually do this? > > In Delphi this is available in a dialog along with the path settings, > which is very convenient to use... > > I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus