[Lazarus] Using different FPC versions
Hello, A single Lazarus installation * Can work with different CPUs. * It can work with different OS-es. * It can work with different widgetsets. It caters for this by adapting the compiler unit search/output path into $(cpu)-$(os)/$(widgetset) - and it does so by default. This is great. (the variable names used may differ from actual names). Lazarus also can work with different compilers versions: you can select the compiler in the options dialog. This is great too, since I must work with the trunk and release versions of FPC on a regular basis. But, in contrast with the other parameters, the compiler version is not built in the unit path (search/output) by default, as it is for the installed FPC itself. This means that each time I switch compiler version, lazarus recompiles every package (lclbase/lcl) - as it must. I can avoid this by using 2 lazarus installations, and using --primary-config-path. Which means a restart. However, this can be avoided to a large extent by simply also adding the compiler version to the unit output path: $(fpcversion)/$(cpu)-$(os)/$(widgetset) or $(cpu)-$(os)/$(widgetset)/$(fpcversion) or even $(fpcversion)-$(cpu)-$(os)/$(widgetset) I could probably set this path manually in every package on my system. Cumbersome, and would probably conflict with svn updates. Is there any plan to add such a feature by default, or have I missed something, and there is actually an easier way than 2 separate installations to achieve the same effect, i.e. use 2 compiler versions without requiring a restart and a complete recompile ? Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 10:33:20 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] However, this can be avoided to a large extent by simply also adding the compiler version to the unit output path: $(fpcversion)/$(cpu)-$(os)/$(widgetset) or $(cpu)-$(os)/$(widgetset)/$(fpcversion) or even $(fpcversion)-$(cpu)-$(os)/$(widgetset) The Lazarus macro for the FPC version (e.g. 2.6.2) is $FPCVer. Macro names are case insensitive. I know, you know that. :) I could probably set this path manually in every package on my system. Cumbersome, and would probably conflict with svn updates. Is there any plan to add such a feature by default, or have I missed something, and there is actually an easier way than 2 separate installations to achieve the same effect, i.e. use 2 compiler versions without requiring a restart and a complete recompile ? The Additions and Overrides of Lazarus 1.1+ can do that. I added it as an example: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Hi, Στις 10/2/2014 12:15 μμ, ο/η Mattias Gaertner έγραψε: snip Is there any plan to add such a feature by default, or have I missed something, and there is actually an easier way than 2 separate installations to achieve the same effect, i.e. use 2 compiler versions without requiring a restart and a complete recompile ? The Additions and Overrides of Lazarus 1.1+ can do that. I added it as an example: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages i didn't know that such a feature exist.Thx a lot. Going to delete all the dir's of different compinations of fpc/lazarus i have. Thx again !!! -- Dimitrios Chr. Ioannidis -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, Mattias Gaertner wrote: On Mon, 10 Feb 2014 10:33:20 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] However, this can be avoided to a large extent by simply also adding the compiler version to the unit output path: $(fpcversion)/$(cpu)-$(os)/$(widgetset) or $(cpu)-$(os)/$(widgetset)/$(fpcversion) or even $(fpcversion)-$(cpu)-$(os)/$(widgetset) The Lazarus macro for the FPC version (e.g. 2.6.2) is $FPCVer. Macro names are case insensitive. I know, you know that. :) No, actually I don't. Which is why I wrote that the names may be fictitious :) I never (actively) use IDE macros. Probably they get used in the background. I could probably set this path manually in every package on my system. Cumbersome, and would probably conflict with svn updates. Is there any plan to add such a feature by default, or have I missed something, and there is actually an easier way than 2 separate installations to achieve the same effect, i.e. use 2 compiler versions without requiring a restart and a complete recompile ? The Additions and Overrides of Lazarus 1.1+ can do that. I added it as an example: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages Ah, in this completely un-understandable dialog. I am avoiding it like the plague :( A GUI is meant to make things simpler, not complicate them, this dialog is IMHO a prime example of a violation of that principle. (somewhat like the MS Access visual query builder) Since the presence of different compiler versions is a given for the lazarus ecosystem, you might consider changing the defaults to what you propose in the example. Thanks for the answer, and taking the trouble to provide an example :) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Michael Van Canneyt wrote: Ah, in this completely un-understandable dialog. I am avoiding it like the plague :( A GUI is meant to make things simpler, not complicate them, this dialog is IMHO a prime example of a violation of that principle. (somewhat like the MS Access visual query builder) A useful feature of makefiles (and, for that matter, SQL queries) is that you can annotate them and tell the viewers why you're doing something and warn them of subtleties in your technique. Apart from that I'm using something like what you describe for the final executable, ordered as B5k5-$(TargetCPU)-$(TargetOS)-$(LCLWidgetType) since that seems to be the best match to e.g. Debian naming conventions. I've also looked at putting a timestamp in DLL names, but that turned out to be far more complex and I ended up running a separate Execute after command. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Threads and Libraries (dll and so)
On 02/07/2014 05:31 PM, Hans-Peter Diettrich wrote: Window managers do not care about widgets,,, So maybe I am confused about the term Window Manager (I think I did not introduce it here) -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] kzdesktop...
Yeah, Flavio. I'm Brazilian too. As you said, for large audience, is good to it in english but it's a developer option and if he didn't make this choice, well, bing translator on it. Maybe someone could offer tor help translating it to english but he must accept this help. 2014-02-07 12:31 GMT-02:00 Flávio Etrusco flavio.etru...@gmail.com: On Fri, Feb 7, 2014 at 12:20 PM, William Oliveira Ferreira bdexterholl...@gmail.com wrote: 2014-02-07 10:03 GMT-02:00 Michael Schnell mschn...@lumino.de: On 02/07/2014 12:51 PM, William Oliveira Ferreira wrote: KZDesktop could be followed by here... http://www.raphaelz.com.br/page/KZDesktop-Uma-interface-robusta-para-seu-Lazarus!.aspx Yeah. That's where I got the information. And it's even more outdated than the SVN, it just contains the first announcement. And it's ironic that its advertised as a robust GUI for Lazarus :) IMHO, non-English technical websites are very inappropriate :-( -Michael But it's a brazillian project... So what? FreePascal started (AFAICT) mostly as a German project. If you want a large audience you have to do English. -Flávio PS. I'm Brazilian. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- William de Oliveira Ferreira -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Mattias Gaertner schrieb: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages Nice :-) I don't understand the IDE directories in Paths: The IDE has one set of search paths for every directory. That means a package can have different search paths than the active project. Here directory is not clear, sounds like a recursive definition? Eventually the more detailed description (second last item in the list) should be moved in front of above item, or replace it? I suspect a problem with the ambiguous definition/usage of path. It is used both for a single directory (relative path), or for a list of directories (search path). The same for paths, which can denote either the elements in an search path, or multiple search paths. I know that this confusion is common practice, but it makes just the Paths topic very hard to understand. Perhaps directory is used here to denote an *element* of an search path, as an disambiguation attempt, but this should be mentioned before its first use. Else directory will be associated with an folder on a disk, what here obviously is not the intended interpretation. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 11:57:08 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I never (actively) use IDE macros. Probably they get used in the background. [...] Ah, in this completely un-understandable dialog. I am avoiding it like the plague :( A GUI is meant to make things simpler, not complicate them, this dialog is IMHO a prime example of a violation of that principle. (somewhat like the MS Access visual query builder) I don't know the MS Access visual query builder. You want different settings for different compiler versions. The current GUI allows this with a few clicks and a macro. You dislike/avoid build modes, sessions, macros and custom packages, so you dislike 90% of this page. I wonder if it is the GUI you dislike or the features you don't need. Since the presence of different compiler versions is a given for the lazarus ecosystem, you might consider changing the defaults to what you propose in the example. Many users do not switch often between different compiler versions. Some packages do not support overriding the output directory. Others have asked to add the buildmode by default. I guess this should be kept optional. Of course we can add menu items for frequently asked overrides. Another possibility is to add a wizard to quickly setup some common options. Similar to the initial setup dialog. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/2014 12:17, Hans-Peter Diettrich wrote: Mattias Gaertner schrieb: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages Nice :-) I don't understand the IDE directories in Paths: The IDE has one set of search paths for every directory. That means a package can have different search paths than the active project. Here directory is not clear, sounds like a recursive definition? I guess it means package directory. Then the sentence reads ok. IMHO it should be The IDE has one set of search paths for every package and project. That means a package can have different search paths than the active project. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 12:15, Mattias Gaertner wrote: The Additions and Overrides of Lazarus 1.1+ can do that. I added it as an example: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages Additions and overrides are very powerful if one understands them, and it is not so difficult. However, is it possible to have a category (like #project) for packages bundled with Lazarus (LCL, lazreport, lazdaemon, etc...)? Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 11:33, Michael Van Canneyt wrote: Hello, A single Lazarus installation * Can work with different CPUs. * It can work with different OS-es. * It can work with different widgetsets. It caters for this by adapting the compiler unit search/output path into $(cpu)-$(os)/$(widgetset) - and it does so by default. This is great. (the variable names used may differ from actual names). Lazarus also can work with different compilers versions: you can select the compiler in the options dialog. What exactly do you change in your setup? Compiler path + make path? Do you use fpc or ppc386 as compiler path? With a fully qualified path or without any path? Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
patspiper patspi...@gmail.com hat am 10. Februar 2014 um 14:15 geschrieben: [...] However, is it possible to have a category (like #project) for packages bundled with Lazarus (LCL, lazreport, lazdaemon, etc...)? Why do you need that? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, Mattias Gaertner wrote: On Mon, 10 Feb 2014 11:57:08 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I never (actively) use IDE macros. Probably they get used in the background. [...] Ah, in this completely un-understandable dialog. I am avoiding it like the plague :( A GUI is meant to make things simpler, not complicate them, this dialog is IMHO a prime example of a violation of that principle. (somewhat like the MS Access visual query builder) I don't know the MS Access visual query builder. I meant it just as an example where the visual layer is actually worse than the original text-based interface: it is easier to type SQL than use the visual dialog in MS-access. You want different settings for different compiler versions. The current GUI allows this with a few clicks and a macro. If you understand it, yes... You dislike/avoid build modes, sessions, macros and custom packages, so you dislike 90% of this page. I wonder if it is the GUI you dislike or the features you don't need. Hm. Let's analyse this paragraph: 1. Build modes are IMHO indeed a misguided concept. 2. I didn't say I dislike macros ? I simply don't use them in the IDE. 3. custom packages, I simply don't know what you mean by that. 4. Not sure what you mean by 'sessions' either ? So you got at least 1/4 statements correct :) That said: It really is the GUI that presents me with problems: I find makefiles with all the variables, rules and whatnot far easier to understand than this dialog. (just like I find it easier to type SQL than use the visual query builder in MS-Access) Unfortunately, it is difficult to mix makefiles with the lazarus packages. (that is just meant as a constatation, not meant as critique) Since the presence of different compiler versions is a given for the lazarus ecosystem, you might consider changing the defaults to what you propose in the example. Many users do not switch often between different compiler versions. I would think all Lazarus/FPC team members, as well as component creators are in this situation. I may be wrong, of course. Some packages do not support overriding the output directory. Huh ? These packages are not very well designed then. A package should always be oblivious to the output dir. If it is not, it should IMHO be discarded from the lazarus installation. It also means that these packages must ALWAYS be recompiled. That is strange, to say the least. Others have asked to add the buildmode by default. Hm. I don't even understand this sentence :-( I guess this should be kept optional. Of course we can add menu items for frequently asked overrides. Another possibility is to add a wizard to quickly setup some common options. Similar to the initial setup dialog. In view of the Some packages do not support overriding the output directory. you mentioned earlier, I somehow doubt this is a workable idea ? But hey, never mind, my mail was not meant as a complaint. I got an answer to my original question. That this answer does not please me, is my problem entirely :) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, patspiper wrote: On 10/02/14 11:33, Michael Van Canneyt wrote: Hello, A single Lazarus installation * Can work with different CPUs. * It can work with different OS-es. * It can work with different widgetsets. It caters for this by adapting the compiler unit search/output path into $(cpu)-$(os)/$(widgetset) - and it does so by default. This is great. (the variable names used may differ from actual names). Lazarus also can work with different compilers versions: you can select the compiler in the options dialog. What exactly do you change in your setup? Compiler path + make path? Just compiler. Do you use fpc or ppc386 as compiler path? With a fully qualified path or without any path? I use a full path to ppcx64-x.y.z I do this, because lazarus does not - out of the box - support the passing of the version to FPC as in: fpc -V2.6.4 for instance, the above command will execute the correct binary: ppcx64-2.6.4, as can be seen as: home: fpc -V2.6.4 -iV 2.6.4 home: fpc -V2.7.1 -iV 2.7.1 I guess this can also be solved with the dialog that Mattias mentions, but I believe that this should in fact be solved at a more fundamental level. Maybe the lazarus devels are not aware of this -V option. It's not widely used or propagated, after all. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Am 10.02.2014 14:38, schrieb Michael Van Canneyt: 1. Build modes are IMHO indeed a misguided concept. Would you please elaborate on that? I like it very much that I can switch between Win32/Debug, WinCE/Debug and WinCE/Release configuration options with just two mouse clicks in the project at my old company. Since the presence of different compiler versions is a given for the lazarus ecosystem, you might consider changing the defaults to what you propose in the example. Many users do not switch often between different compiler versions. I would think all Lazarus/FPC team members, as well as component creators are in this situation. I may be wrong, of course. If one is solely working on the compiler and not on GUI projects or projects that depend on packages this is less of an issue as - in my case - I'm always compiling with 2.6.2 (aka last release) and debug the compiler... Others have asked to add the buildmode by default. Hm. I don't even understand this sentence :-( He means that users had requested to add the current build mode to the output path which seems to be the default in 1.1/1.2/1.3. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Am 10.02.2014 14:44, schrieb Michael Van Canneyt: Maybe the lazarus devels are not aware of this -V option. It's not widely used or propagated, after all. The options provided by FPC are also shown in the help output since 2.7.1 (help output is always done by ppcXXX). Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, Sven Barth wrote: Am 10.02.2014 14:44, schrieb Michael Van Canneyt: Maybe the lazarus devels are not aware of this -V option. It's not widely used or propagated, after all. The options provided by FPC are also shown in the help output since 2.7.1 (help output is always done by ppcXXX). Indeed. And this option was one of the reasons for creating FPC, so available since many years. More's the pity that we didn't make it more widely known. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Martin Frb laza...@mfriebe.de hat am 10. Februar 2014 um 14:08 geschrieben: [...] I don't understand the IDE directories in Paths: The IDE has one set of search paths for every directory. That means a package can have different search paths than the active project. Here directory is not clear, sounds like a recursive definition? I guess it means package directory. Then the sentence reads ok. Actually, it means directory - any directory. A package can have source files in many directories. The search paths of a package are used for all files in all directories of a package. Same for projects. The IDE has one set of search paths (unit search path, include search path, sources search path) for each directory. It creates these sets on demand. Whenever a file is parsed the IDE looks up its cache. If this is the first time that a file in that directory is parsed, the IDE collects all settings and calculates the search paths and compiler options. This data is not stored on disk. IMHO it should be The IDE has one set of search paths for every package and project. That means a package can have different search paths than the active project. That is true too. If you think that is less confusing please change it. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Am 10.02.2014 14:48, schrieb Sven Barth: Am 10.02.2014 14:44, schrieb Michael Van Canneyt: Maybe the lazarus devels are not aware of this -V option. It's not widely used or propagated, after all. The options provided by FPC are also shown in the help output since 2.7.1 (help output is always done by ppcXXX). In that context I just noticed the following: if you use Lazarus 1.1 or newer and a 2.7.1 compiler you can set -V inside the Compiler settings - Other - All Settings (Alle Einstellungen in German). Of course I don't know what might happen to this settings page when you do indeed set -V to 2.6.2 :) (because in 2.6.2 the corresponding help output does not exist yet and thus the dialog will not show the option as it parses the help output) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [OT] Re: Lazarus/FPC for Web Development only
2014-02-09 22:39 GMT-02:00 Allan E. Registos allan.regis...@smpc.steniel.com.ph: [...] The FOSS project Docker (docker.io) has a very good tutorial in my opinion. I am now at tutorial level 2, maybe your documentation team will be able to get good ideas from this project. Very nice, and thanks for the indication! :) -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Threads and Libraries (dll and so)
Michael Schnell schrieb: On 02/07/2014 05:31 PM, Hans-Peter Diettrich wrote: Window managers do not care about widgets,,, So maybe I am confused about the term Window Manager (I think I did not introduce it here) MS Windows does not distinguish between the window manager and widgetset, it provides both. The Windows-provided widgets again are windows (have a HWND...), so that the window manager must handle *nested* windows. Also both send messages to a window's message queue (WM_...), so that an ordinary Windows user doesn't notice a difference between both. X11 instead does not provide widgets itself, these must be added by dedicated libraries (widgetsets). The communication between an application and the window manager and an widgetset works differently, events from both sources must be merged into the LCL message queue, for VCL/Windows compatibility. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Mark Morgan Lloyd schrieb: Michael Van Canneyt wrote: Ah, in this completely un-understandable dialog. I am avoiding it like the plague :( A GUI is meant to make things simpler, not complicate them, this dialog is IMHO a prime example of a violation of that principle. (somewhat like the MS Access visual query builder) A useful feature of makefiles (and, for that matter, SQL queries) is that you can annotate them and tell the viewers why you're doing something and warn them of subtleties in your technique. A drawback of makefiles and all commandline tools is the lack of interaction, between the client and server. A decent API for every tool instead allows to configure it with e.g. immediate error handling and callback functions, before starting an operation. The documentation then resides in the source code, that can do much more than only provide it all options and cross your fingers. In so far I dislike the need for setting up everything in a way so that finally commandlines can be created for some tool (fpc,linker...), and the tools possibly must be restarted multiple times, with variations of the commandline options. And I agree with Michael that I never understood that dialog, too. It reflects the tools, models and strategies used by its designer, which have to be explained to, and understood by, every user of that dialog. Perhaps the wiki page now makes parts of that puzzle clearer to me, once I find the time to study it (and related material) in detail. Lately I tried to make Lazarus (release and trunk) work in a dedicated VM, but ended up in strange error messages in every attempt to run something like a hello-world program. Nobody could or wanted to explain me what these error messages mean, what might be wrong with my installation, and how to cure the problems. So all the nice looking configuration dialogs are worth nothing without assistance by further wizards, be tools or persons :-( DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/2014 13:50, Mattias Gaertner wrote: Martin Frb laza...@mfriebe.de hat am 10. Februar 2014 um 14:08 geschrieben: [...] I don't understand the IDE directories in Paths: The IDE has one set of search paths for every directory. That means a package can have different search paths than the active project. Here directory is not clear, sounds like a recursive definition? I guess it means package directory. Then the sentence reads ok. Actually, it means directory - any directory. A package can have source files in many directories. The search paths of a package are used for all files in all directories of a package. Same for projects. Ok, then package directory is wrong, but just package and project (as in the example below) is right. The IDE has one set of search paths for every package and project. That means a package can have different search paths than the active project. And imho better than directory. Especially, since you just explained that directory stands for the set of directories of the package (or project). Unless the sentence is supposed to mean: each directory (as in truly one directory on the medium) is included in one (and just one) search path (a set of dirs), therefore there is one search path for each dir. The IDE has one set of search paths (unit search path, include search path, sources search path) for each directory. The term set of search path should then also be explained on the wiki, the same as in the above quote. The term directory in that sentence is still misleading/ambiguous It creates these sets on demand. Whenever a file is parsed the IDE looks up its cache. If this is the first time that a file in that directory is parsed, the IDE collects all settings and calculates the search paths and compiler options. This data is not stored on disk. I thought they are stored in the project/pacckage options? Only they get updated (if the user confirms) when files are added, removed, moved? IMHO it should be The IDE has one set of search paths for every package and project. That means a package can have different search paths than the active project. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 15:44, Michael Van Canneyt wrote: On Mon, 10 Feb 2014, patspiper wrote: On 10/02/14 11:33, Michael Van Canneyt wrote: Hello, A single Lazarus installation * Can work with different CPUs. * It can work with different OS-es. * It can work with different widgetsets. It caters for this by adapting the compiler unit search/output path into $(cpu)-$(os)/$(widgetset) - and it does so by default. This is great. (the variable names used may differ from actual names). Lazarus also can work with different compilers versions: you can select the compiler in the options dialog. What exactly do you change in your setup? Compiler path + make path? Just compiler. Do you use fpc or ppc386 as compiler path? With a fully qualified path or without any path? I use a full path to ppcx64-x.y.z My solution to this is: - Install different fpc versions in folders differing only by the fpc version - Use a script (with an fpc version variable) that includes in the environment PATH the bin folder (where fpc is) and the compiler folder (where ppcx64 is) to launch the Lazarus IDE. - Specify fpc with no path for the IDE compiler options. The IDE will query fpc for the version and set the $FPCVER macro accordingly. Note: using ppcx64 instead will prevent you from cross-compiling. I do this, because lazarus does not - out of the box - support the passing of the version to FPC as in: fpc -V2.6.4 for instance, the above command will execute the correct binary: ppcx64-2.6.4, as can be seen as: home: fpc -V2.6.4 -iV 2.6.4 home: fpc -V2.7.1 -iV 2.7.1 I guess this can also be solved with the dialog that Mattias mentions, Overrides do not solve this particular issue. but I believe that this should in fact be solved at a more fundamental level. Maybe the lazarus devels are not aware of this -V option. It's not widely used or propagated, after all. I look forward to being able to specify options for fpc in the compiler path. This allows me to change my method above as follows: - No need for the environment path anymore - Specify the full path of fpc, using fully qualified paths that include the version (ex 2.6.3). That means there is no more need to restart the IDE to switch versions. - Specify the fpc option that allows fpc to locate the compiler folder (where ppcx64 is) Btw, IIRC some fpc options are not even included in the fpc help (fpc -h). Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, patspiper wrote: My solution to this is: - Install different fpc versions in folders differing only by the fpc version To my knowledge, this is done by default, both on Unix and on Windows. - Use a script (with an fpc version variable) that includes in the environment PATH the bin folder (where fpc is) and the compiler folder (where ppcx64 is) to launch the Lazarus IDE. I don't see why you would need this. - Specify fpc with no path for the IDE compiler options. The IDE will query fpc for the version and set the $FPCVER macro accordingly. Note: using ppcx64 instead will prevent you from cross-compiling. Not an issue: I never cross-compile. Overrides do not solve this particular issue. As far as I understand it after Mattias' example, it would. But as argued elsewhere, my understanding of that dialog is limited. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 15:31, Mattias Gaertner wrote: patspiper patspi...@gmail.com hat am 10. Februar 2014 um 14:15 geschrieben: [...] However, is it possible to have a category (like #project) for packages bundled with Lazarus (LCL, lazreport, lazdaemon, etc...)? Why do you need that? By default, all bundled lazarus packages are compiled and placed in the units folder (located in the top level lazarus folder). However, specifying an override will create object folders everywhere. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Michael Van Canneyt mich...@freepascal.org hat am 10. Februar 2014 um 14:38 geschrieben: On Mon, 10 Feb 2014, Mattias Gaertner wrote: On Mon, 10 Feb 2014 11:57:08 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I never (actively) use IDE macros. Probably they get used in the background. [...] Ah, in this completely un-understandable dialog. I am avoiding it like the plague :( A GUI is meant to make things simpler, not complicate them, this dialog is IMHO a prime example of a violation of that principle. (somewhat like the MS Access visual query builder) I don't know the MS Access visual query builder. I meant it just as an example where the visual layer is actually worse than the original text-based interface: it is easier to type SQL than use the visual dialog in MS-access. I see. A text based edit with the pascal like syntax of the conditionals was considered, but selection of build modes and storage would be awkward and it would be too flexible - you would need a debugger. Also upgrading would be much harder. You want different settings for different compiler versions. The current GUI allows this with a few clicks and a macro. If you understand it, yes... A grid is powerful and not intuitive. I agree. You dislike/avoid build modes, sessions, macros and custom packages, so you dislike 90% of this page. I wonder if it is the GUI you dislike or the features you don't need. Hm. Let's analyse this paragraph: 1. Build modes are IMHO indeed a misguided concept. 2. I didn't say I dislike macros ? I simply don't use them in the IDE. That's why I wrote dislike/avoid. I does not matter why you don't use them. My point is that if you don't use them, then you (obviously) don't need a GUI for it. It's like you want to change a value in a database and someone gives you phpmyadmin. That's a bad GUI for changing one value. 3. custom packages, I simply don't know what you mean by that. Packages that require special settings. For example if you want to compile all packages with -O2, but one package crashes with that, you have to define an exception. 4. Not sure what you mean by 'sessions' either ? When several people work on a project, you need your own settings, that are not stored in svn/git/whatever. These settings are stored in the session. So you got at least 1/4 statements correct :) That said: It really is the GUI that presents me with problems: I find makefiles with all the variables, rules and whatnot far easier to understand than this dialog. A Makefile is more like the whole lazbuild. You have to read several documentations to understand a Makefile. You need to know the Makefile syntax, variables, shell syntax, environment, tools options, etc. BTW, 'make' supports build modes too. But even after years with Makefiles I still have trouble understanding them, so I doubt that Makefiles are far easier. (just like I find it easier to type SQL than use the visual query builder in MS-Access) IMO the SQL comparison does not fit in this case. SQL has far more possibilties than the Additions and Overrides. The data could be stored in SQL in only 1..3 tables. Unfortunately, it is difficult to mix makefiles with the lazarus packages. (that is just meant as a constatation, not meant as critique) You can call 'make' instead of the compiler. And you can pass options. The problem is the missing way back from the Makefile to the IDE. The IDE needs the options for parsing the sources. Since the presence of different compiler versions is a given for the lazarus ecosystem, you might consider changing the defaults to what you propose in the example. Many users do not switch often between different compiler versions. I would think all Lazarus/FPC team members, as well as component creators are in this situation. I may be wrong, of course. That's an important group. But I do hope that Lazarus is used by more people than this small group. ;) Some packages do not support overriding the output directory. Huh ? These packages are not very well designed then. A package should always be oblivious to the output dir. Examples: -closed source packages -packages compiled via script or Makefile (user has to adapt the script, which might be difficult). If it is not, it should IMHO be discarded from the lazarus installation. All packages of the Lazarus installation can be compiled to other directories. That's needed because they could be installed read only. [...] Others have asked to add the buildmode by default. Hm. I don't even understand this sentence :-( Sorry. Theoretically: When we ask how should the output directory override look like in order to reduce compilation, you will add FPVVer macro, others will add the buildmode macro, and other will want to add some environment variables. I guess this should be kept optional. Of course we can add menu items for frequently
Re: [Lazarus] kzdesktop...
On Fri, Feb 7, 2014 at 1:45 PM, Hans-Peter Diettrich drdiettri...@aol.com wrote: Flávio Etrusco schrieb: -Flávio PS. I'm Brazilian. Oh, I always thought you were an old Italian guy ;-) DoDi No, that's my cousin, Flavivs Etrvscvs :-p -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 17:19, Michael Van Canneyt wrote: On Mon, 10 Feb 2014, patspiper wrote: My solution to this is: - Install different fpc versions in folders differing only by the fpc version To my knowledge, this is done by default, both on Unix and on Windows. True. I just felt I should emphasise the fact. - Use a script (with an fpc version variable) that includes in the environment PATH the bin folder (where fpc is) and the compiler folder (where ppcx64 is) to launch the Lazarus IDE. I don't see why you would need this. So that the IDE is able to locate fpc, ppcxxx and other fpc executables (including make) for the required version by just specifying executables without paths. The alternative would be to specify a full path for fpc (including the version) and adding -Xpppcxxxpath. - Specify fpc with no path for the IDE compiler options. The IDE will query fpc for the version and set the $FPCVER macro accordingly. Note: using ppcx64 instead will prevent you from cross-compiling. Not an issue: I never cross-compile. OK Overrides do not solve this particular issue. As far as I understand it after Mattias' example, it would. But as argued elsewhere, my understanding of that dialog is limited. I might have misunderstood what you were referring to. As far as your original issue is, then yes overrides are a solution. AFAIK, overrides are quite powerful, though delicate to handle. For example, I even specify the buildmode (debug/release/etc...) in the output folder, and overrides handle that quite well. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, Mattias Gaertner wrote: If someone uses such a package, he can choose 'no override'. That's what I meant with 'keep it optional'. Such packages (closed source) etc. obviously cannot be used with various compiler versions anyway. But hey, never mind, my mail was not meant as a complaint. If that was not a complaint, then what is? I meant my original reply as 'Pity, this particular answer is not what I was hoping for'. My apologies if that was misunderstood. I didn't mean to go into the details of the dialog when I answered your solution (did that already at the time the dialog appeared). Like I wrote in another mail: I consider setting and catering for the version of the FPC compiler far too fundamental in the use of Lazarus to relegate it to the dialog called 'additions and overrides'. I consider it as fundamental as the OS/CPU pair, which is treated specially in the options. But as a member of the core developer group I may be biased. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Am 10.02.2014 16:57, schrieb Michael Van Canneyt: On Mon, 10 Feb 2014, Mattias Gaertner wrote: If someone uses such a package, he can choose 'no override'. That's what I meant with 'keep it optional'. Such packages (closed source) etc. obviously cannot be used with various compiler versions anyway. Those package providers can use the same principles they use for Delphi packages: provide binaries for each supported version (of course this is problematic with the development versions of FPC ^^) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Michael Van Canneyt mich...@freepascal.org hat am 10. Februar 2014 um 16:19 geschrieben: [...] On Mon, 10 Feb 2014, patspiper wrote: - Install different fpc versions in folders differing only by the fpc version To my knowledge, this is done by default, both on Unix and on Windows. Yes. - Use a script (with an fpc version variable) that includes in the environment PATH the bin folder (where fpc is) and the compiler folder (where ppcx64 is) to launch the Lazarus IDE. I don't see why you would need this. Normally you can simply switch the compiler in the environment options. But this shares tools like fpcres, which you might not want. [...] Overrides do not solve this particular issue. As far as I understand it after Mattias' example, it would. You can not (yet) override environment variables like PATH when invoking FPC. Once this is implemented, it can be done by additions and overrides too. But as argued elsewhere, my understanding of that dialog is limited. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Michael Van Canneyt mich...@freepascal.org hat am 10. Februar 2014 um 16:57 geschrieben: On Mon, 10 Feb 2014, Mattias Gaertner wrote: If someone uses such a package, he can choose 'no override'. That's what I meant with 'keep it optional'. Such packages (closed source) etc. obviously cannot be used with various compiler versions anyway. Yes, it can. The package can use $FPCVer in its output directory. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 18:11, Mattias Gaertner wrote: patspiper patspi...@gmail.com hat am 10. Februar 2014 um 16:18 geschrieben: On 10/02/14 15:31, Mattias Gaertner wrote: patspiper patspi...@gmail.com hat am 10. Februar 2014 um 14:15 geschrieben: [...] However, is it possible to have a category (like #project) for packages bundled with Lazarus (LCL, lazreport, lazdaemon, etc...)? Why do you need that? By default, all bundled lazarus packages are compiled and placed in the units folder (located in the top level lazarus folder). If you mean with 'the top level lazarus folder' the folder lazarus/units/cpu-os: That are only the ppu/o/lfm files of the IDE. All packages have their own output directories, which are always sub directories of the corresponding package directory. Example: package IDEIntf is in lazarus/components/ideintf and uses the output directory lazarus/components/ideintf/units/x86_64-linux. Now that I checked again, you are right. The only difference is that by default the folder(s) name is units, whereas if I force lib/... (as is the default for new packages and projects), then the folder(s) name is lib. A subtle but acceptable difference. Why is the default name 'units' when building Lazarus and not lib? However, specifying an override will create object folders everywhere. everywhere sounds as if the IDE creates folders wildly at unexpected places. That is not the case. If you specify an override like 'lib' the package IDEIntf would use lazarus/components/ideintf/lib. So the created folder will only have a different name and sub dirs, but the same location. You can specify an override like '/home/user/units/$(pkgname)'. In that case all created files will go outside the package directory. All in one location. I used 'wildly' as opposed to a single folder. Now that I realised what you said, the same folders are no more wild :) Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, Mattias Gaertner wrote: Michael Van Canneyt mich...@freepascal.org hat am 10. Februar 2014 um 16:57 geschrieben: On Mon, 10 Feb 2014, Mattias Gaertner wrote: If someone uses such a package, he can choose 'no override'. That's what I meant with 'keep it optional'. Such packages (closed source) etc. obviously cannot be used with various compiler versions anyway. Yes, it can. The package can use $FPCVer in its output directory. I understand that, and had thought of it. But I consider this not very useful or even remotely likely: The purpose of me changing the version of FPC is testing some change in a branch. So, when compiling such a - hypothetical - closed source package, this will almost definitely cause an error from the compiler, telling me that I need to recompile the units in it. And as Sven points out: for trunk it will be really hard to find such a package to begin with. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 18:21, Mattias Gaertner wrote: - Use a script (with an fpc version variable) that includes in the environment PATH the bin folder (where fpc is) and the compiler folder (where ppcx64 is) to launch the Lazarus IDE. I don't see why you would need this. Normally you can simply switch the compiler in the environment options. But this shares tools like fpcres, which you might not want. [...] Overrides do not solve this particular issue. As far as I understand it after Mattias' example, it would. You can not (yet) override environment variables like PATH when invoking FPC. Once this is implemented, it can be done by additions and overrides too. Although it is a welcome feature, it will make the usage really complicated considering build modes might cater for debug/release, FPC version, win/linux, etc... I instead propose to have a field next to the compiler path in the IDE options that accepts fpc's -Xp parameter. Xp allows one to specify the relative folder of the actual compiler (ppcxxx) with respect to the fpc executable. That would work well since each ppcxxx's location is fixed with respect to its associated fpc executable. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, patspiper wrote: Once this is implemented, it can be done by additions and overrides too. Although it is a welcome feature, it will make the usage really complicated considering build modes might cater for debug/release, FPC version, win/linux, etc... I instead propose to have a field next to the compiler path in the IDE options that accepts fpc's -Xp parameter. Xp allows one to specify the relative folder of the actual compiler (ppcxxx) with respect to the fpc executable. That would work well since each ppcxxx's location is fixed with respect to its associated fpc executable. That assumption is not correct on Unix. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 19:12, Michael Van Canneyt wrote: On Mon, 10 Feb 2014, patspiper wrote: Once this is implemented, it can be done by additions and overrides too. Although it is a welcome feature, it will make the usage really complicated considering build modes might cater for debug/release, FPC version, win/linux, etc... I instead propose to have a field next to the compiler path in the IDE options that accepts fpc's -Xp parameter. Xp allows one to specify the relative folder of the actual compiler (ppcxxx) with respect to the fpc executable. That would work well since each ppcxxx's location is fixed with respect to its associated fpc executable. That assumption is not correct on Unix. That's interesting and unexpected. Can you give an example on fpc's folder hierarchy on unix? Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 19:01:28 +0200 patspiper patspi...@gmail.com wrote: [...] You can not (yet) override environment variables like PATH when invoking FPC. Once this is implemented, it can be done by additions and overrides too. Although it is a welcome feature, it will make the usage really complicated considering build modes might cater for debug/release, FPC version, win/linux, etc... You *can* override an env var, you don't need to. You can still use your script and set env vars and restart the IDE. I instead propose to have a field next to the compiler path in the IDE options that accepts fpc's -Xp parameter. Xp allows one to specify the relative folder of the actual compiler (ppcxxx) with respect to the fpc executable. That would work well since each ppcxxx's location is fixed with respect to its associated fpc executable. fpc -h does not mention -Xp. fpc -Xpdummy does not give any error. What does it do? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014, patspiper wrote: On 10/02/14 19:12, Michael Van Canneyt wrote: On Mon, 10 Feb 2014, patspiper wrote: Once this is implemented, it can be done by additions and overrides too. Although it is a welcome feature, it will make the usage really complicated considering build modes might cater for debug/release, FPC version, win/linux, etc... I instead propose to have a field next to the compiler path in the IDE options that accepts fpc's -Xp parameter. Xp allows one to specify the relative folder of the actual compiler (ppcxxx) with respect to the fpc executable. That would work well since each ppcxxx's location is fixed with respect to its associated fpc executable. That assumption is not correct on Unix. That's interesting and unexpected. Can you give an example on fpc's folder hierarchy on unix? Well: fpc is in /usr/local/bin/fpc various compilers are in /usr/local/lib/fpc/$version/ppcXXX or (depending on how it was installed): /usr/bin/fpc and /usr/lib/fpc/$version/ppcXXX Same paths are used on Darwin. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10.02.2014 18:26, Mattias Gaertner wrote: I instead propose to have a field next to the compiler path in the IDE options that accepts fpc's -Xp parameter. Xp allows one to specify the relative folder of the actual compiler (ppcxxx) with respect to the fpc executable. That would work well since each ppcxxx's location is fixed with respect to its associated fpc executable. fpc -h does not mention -Xp. As already said in some other mail in this thread today: fpc specific options are only printed in the help screen since 2.7.1 and there it is indeed mentioned. fpc -Xpdummy does not give any error. What does it do? To quote fpc -h: -Xpx First search for the compiler binary in the directory x Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 19:38, Michael Van Canneyt wrote: On Mon, 10 Feb 2014, patspiper wrote: On 10/02/14 19:12, Michael Van Canneyt wrote: On Mon, 10 Feb 2014, patspiper wrote: Once this is implemented, it can be done by additions and overrides too. Although it is a welcome feature, it will make the usage really complicated considering build modes might cater for debug/release, FPC version, win/linux, etc... I instead propose to have a field next to the compiler path in the IDE options that accepts fpc's -Xp parameter. Xp allows one to specify the relative folder of the actual compiler (ppcxxx) with respect to the fpc executable. That would work well since each ppcxxx's location is fixed with respect to its associated fpc executable. That assumption is not correct on Unix. That's interesting and unexpected. Can you give an example on fpc's folder hierarchy on unix? Well: fpc is in /usr/local/bin/fpc various compilers are in /usr/local/lib/fpc/$version/ppcXXX or (depending on how it was installed): /usr/bin/fpc and /usr/lib/fpc/$version/ppcXXX Same paths are used on Darwin. Great! You can use -Xp../lib/fpc/$(FPCVER) in both cases, and hence it is a fixed relative path (considering the $FPCVER macro). Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 14:44:50 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I use a full path to ppcx64-x.y.z How did you create ppcx64-x.y.z? AFAIK none of the installers create this. I do this, because lazarus does not - out of the box - support the passing of the version to FPC as in: fpc -V2.6.4 You can pass it in the custom compiler options, but it is currently not parsed by the IDE, so it uses the default version for codetools. [...] Maybe the lazarus devels are not aware of this -V option. It's not widely used or propagated, after all. You are the first I know who uses it. :) Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 19:26, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:01:28 +0200 patspiper patspi...@gmail.com wrote: [...] You can not (yet) override environment variables like PATH when invoking FPC. Once this is implemented, it can be done by additions and overrides too. Although it is a welcome feature, it will make the usage really complicated considering build modes might cater for debug/release, FPC version, win/linux, etc... You *can* override an env var, you don't need to. You can still use your script and set env vars and restart the IDE. This is exactly what I meant. I was maybe not 'verbose' enough. I instead propose to have a field next to the compiler path in the IDE options that accepts fpc's -Xp parameter. Xp allows one to specify the relative folder of the actual compiler (ppcxxx) with respect to the fpc executable. That would work well since each ppcxxx's location is fixed with respect to its associated fpc executable. fpc -h does not mention -Xp. fpc -Xpdummy does not give any error. What does it do? It allows the caller to specify the location (AFAIK it can be a relative path) of ppcxxx (the actual compiler). That option removes the need to rely on env variables to specify the fpc and ppcxxx paths. It would be enough to provide a qualified path in the IDE options for the fpc executable, and coupled with a -Xp field, it would allow fpc to locate the ppcxxx executable. ex: ./fpc -h -Xp../lib/fpc/2.6.3 I suppose -Xp is not included in fpc -h output because its functionality is in the fpc executable whereas the general help is in the ppcxxx executable. Probably the same applies to the -V option (to use ppcx64-version). Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 19:54, Mattias Gaertner wrote: On Mon, 10 Feb 2014 14:44:50 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I use a full path to ppcx64-x.y.z How did you create ppcx64-x.y.z? AFAIK none of the installers create this. This seems to be one way to use different fpc versions with Lazarus, and the renaming or soft linking is done manually. I do this, because lazarus does not - out of the box - support the passing of the version to FPC as in: fpc -V2.6.4 You can pass it in the custom compiler options, but it is currently not parsed by the IDE, so it uses the default version for codetools. [...] Maybe the lazarus devels are not aware of this -V option. It's not widely used or propagated, after all. You are the first I know who uses it. :) AFAIK, allowing one to specify -Xpcompilerpath in the IDE options makes the -V unnecessary in most cases. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 19:45:44 +0200 patspiper patspi...@gmail.com wrote: [...] It allows the caller to specify the location (AFAIK it can be a relative path) of ppcxxx (the actual compiler). That option removes the need to rely on env variables to specify the fpc and ppcxxx paths. It would be enough to provide a qualified path in the IDE options for the fpc executable, and coupled with a -Xp field, it would allow fpc to locate the ppcxxx executable. ex: ./fpc -h -Xp../lib/fpc/2.6.3 Sorry. I don't get it. With this option I can select a ppcxxx executable. But I can already select a ppc executable directly. So what do I gain? And how can I select the right sub tools like fpcres? I still need to specify the PATH, don't I? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Michael Van Canneyt wrote: I do this, because lazarus does not - out of the box - support the passing of the version to FPC as in: fpc -V2.6.4 for instance, the above command will execute the correct binary: ppcx64-2.6.4, as can be seen as: home: fpc -V2.6.4 -iV 2.6.4 home: fpc -V2.7.1 -iV 2.7.1 I guess this can also be solved with the dialog that Mattias mentions, but I believe that this should in fact be solved at a more fundamental level. Maybe the lazarus devels are not aware of this -V option. It's not widely used or propagated, after all. The other issue is how to tell the IDE where the FPC sources are, and to keep everything in step. I normally copy a cleaned version of the sources into e.g. /usr/local/lib/fpc/2.6.2/fpcsrc. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 19:50:14 +0200 patspiper patspi...@gmail.com wrote: [...] fpc is in /usr/local/bin/fpc various compilers are in /usr/local/lib/fpc/$version/ppcXXX or (depending on how it was installed): /usr/bin/fpc and /usr/lib/fpc/$version/ppcXXX Same paths are used on Darwin. AFAIK Darwin uses /usr/local/lib/fpc/$version/... Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 20:09, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:45:44 +0200 patspiper patspi...@gmail.com wrote: [...] It allows the caller to specify the location (AFAIK it can be a relative path) of ppcxxx (the actual compiler). That option removes the need to rely on env variables to specify the fpc and ppcxxx paths. It would be enough to provide a qualified path in the IDE options for the fpc executable, and coupled with a -Xp field, it would allow fpc to locate the ppcxxx executable. ex: ./fpc -h -Xp../lib/fpc/2.6.3 Sorry. I don't get it. With this option I can select a ppcxxx executable. But I can already select a ppc executable directly. So what do I gain? You can't specify a ppcxxx executable directly if you cross compile. And how can I select the right sub tools like fpcres? I still need to specify the PATH, don't I? When a fully qualified path for the fpc executable is specified in the IDE options, aren't tools such as fpcres searched for over there? compiler path: fullpathtofpc/fpc additional switches: -Xp../lib/fpc/$(FPCVER) The above will allow you to change the path of the fpc executable explicitly, and the ppcxxx path follows implicitly due to the -Xp switch. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10.02.2014 19:20, patspiper wrote: On 10/02/14 20:09, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:45:44 +0200 patspiper patspi...@gmail.com wrote: [...] It allows the caller to specify the location (AFAIK it can be a relative path) of ppcxxx (the actual compiler). That option removes the need to rely on env variables to specify the fpc and ppcxxx paths. It would be enough to provide a qualified path in the IDE options for the fpc executable, and coupled with a -Xp field, it would allow fpc to locate the ppcxxx executable. ex: ./fpc -h -Xp../lib/fpc/2.6.3 Sorry. I don't get it. With this option I can select a ppcxxx executable. But I can already select a ppc executable directly. So what do I gain? You can't specify a ppcxxx executable directly if you cross compile. Of course I can. I just need to specify the right ppcXXX executable. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 18:10:21 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: [...] The other issue is how to tell the IDE where the FPC sources are, and to keep everything in step. I normally copy a cleaned version of the sources into e.g. /usr/local/lib/fpc/2.6.2/fpcsrc. /usr/local/lib/fpc/$(FPCVer)/fpcsrc The installers use the FPCVer macro since several versions. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 20:24, Sven Barth wrote: On 10.02.2014 19:20, patspiper wrote: On 10/02/14 20:09, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:45:44 +0200 patspiper patspi...@gmail.com wrote: [...] It allows the caller to specify the location (AFAIK it can be a relative path) of ppcxxx (the actual compiler). That option removes the need to rely on env variables to specify the fpc and ppcxxx paths. It would be enough to provide a qualified path in the IDE options for the fpc executable, and coupled with a -Xp field, it would allow fpc to locate the ppcxxx executable. ex: ./fpc -h -Xp../lib/fpc/2.6.3 Sorry. I don't get it. With this option I can select a ppcxxx executable. But I can already select a ppc executable directly. So what do I gain? You can't specify a ppcxxx executable directly if you cross compile. Of course I can. I just need to specify the right ppcXXX executable. I didn't mean it is not possible, but it is a hassle. You'll have to select at least the right ppcxxx and the right widgetset. Whereas if you specify the fpc executable, you can, with a single click, change targets (using build modes). Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Mattias Gaertner wrote: On Mon, 10 Feb 2014 18:10:21 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: [...] The other issue is how to tell the IDE where the FPC sources are, and to keep everything in step. I normally copy a cleaned version of the sources into e.g. /usr/local/lib/fpc/2.6.2/fpcsrc. /usr/local/lib/fpc/$(FPCVer)/fpcsrc The installers use the FPCVer macro since several versions. Thanks for that. So is this a fairly accurate description of what happens on e.g. x86: * If -V isn't specified, fpc runs ppc386. * If -Vx.y.z is specified, fpc runs ppc386-x.y.z. * In either case, the IDE queries the ppc386 version using -iV. * The IDE sets $(FPCVer) as appropriate. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 20:20:40 +0200 patspiper patspi...@gmail.com wrote: On 10/02/14 20:09, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:45:44 +0200 patspiper patspi...@gmail.com wrote: [...] And how can I select the right sub tools like fpcres? I still need to specify the PATH, don't I? When a fully qualified path for the fpc executable is specified in the IDE options, aren't tools such as fpcres searched for over there? Maybe, but fpcres is not there. compiler path: fullpathtofpc/fpc additional switches: -Xp../lib/fpc/$(FPCVER) The above will allow you to change the path of the fpc executable explicitly, and the ppcxxx path follows implicitly due to the -Xp switch. fpcres is not installed under /usr/lib/fpc, but under /usr/bin/. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 19:24:18 +0100 Sven Barth pascaldra...@googlemail.com wrote: On 10.02.2014 19:20, patspiper wrote: On 10/02/14 20:09, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:45:44 +0200 patspiper patspi...@gmail.com wrote: [...] It allows the caller to specify the location (AFAIK it can be a relative path) of ppcxxx (the actual compiler). That option removes the need to rely on env variables to specify the fpc and ppcxxx paths. It would be enough to provide a qualified path in the IDE options for the fpc executable, and coupled with a -Xp field, it would allow fpc to locate the ppcxxx executable. ex: ./fpc -h -Xp../lib/fpc/2.6.3 Note: The -Xp is relative to the current working directory. When compiling a project the cwd is the project directory. That means ../lib/fpc/2.6.3 won't work. You have to specify the full path -Xp/usr/lib/fpc/2.6.3. The bad thing about -Xp is that if the directory does not exist, there is no error, no warning, no hint. fpc simply takes the default compiler. [...] Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On Mon, 10 Feb 2014 20:31:20 +0200 patspiper patspi...@gmail.com wrote: [...] You can't specify a ppcxxx executable directly if you cross compile. Of course I can. I just need to specify the right ppcXXX executable. I didn't mean it is not possible, but it is a hassle. You'll have to select at least the right ppcxxx and the right widgetset. Whereas if you specify the fpc executable, you can, with a single click, change targets (using build modes). The default widgetset depends on the target OS. Normally you don't need to set the widgetset, unless you want a non default widgetset. If you use build modes you can switch several options anyway. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 20:31, Mattias Gaertner wrote: On Mon, 10 Feb 2014 20:20:40 +0200 patspiper patspi...@gmail.com wrote: On 10/02/14 20:09, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:45:44 +0200 patspiper patspi...@gmail.com wrote: [...] And how can I select the right sub tools like fpcres? I still need to specify the PATH, don't I? When a fully qualified path for the fpc executable is specified in the IDE options, aren't tools such as fpcres searched for over there? Maybe, but fpcres is not there. In my installation (Linux/manual compilation ie not package installer) fpcres is in the same folder as fpc. compiler path: fullpathtofpc/fpc additional switches: -Xp../lib/fpc/$(FPCVER) The above will allow you to change the path of the fpc executable explicitly, and the ppcxxx path follows implicitly due to the -Xp switch. fpcres is not installed under /usr/lib/fpc, but under /usr/bin/. In case it is in /usr/bin, then it is in the standard PATH, so no worries here. But it is not wise to have multiple fpc version with one of them in the standard PATH. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 20:48, Mattias Gaertner wrote: On Mon, 10 Feb 2014 20:31:20 +0200 patspiper patspi...@gmail.com wrote: [...] You can't specify a ppcxxx executable directly if you cross compile. Of course I can. I just need to specify the right ppcXXX executable. I didn't mean it is not possible, but it is a hassle. You'll have to select at least the right ppcxxx and the right widgetset. Whereas if you specify the fpc executable, you can, with a single click, change targets (using build modes). The default widgetset depends on the target OS. Normally you don't need to set the widgetset, unless you want a non default widgetset. I might not be very correct on that, but since he wants to specify the ppcxxx manually, then specifying the OS target is not as useful as changing the widgetset. If you use build modes you can switch several options anyway. That's what I use seamlessly. But since Michael mentioned the fpc version issue, why not integrate it smoothly as well. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
On 10/02/14 20:43, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:24:18 +0100 Sven Barth pascaldra...@googlemail.com wrote: On 10.02.2014 19:20, patspiper wrote: On 10/02/14 20:09, Mattias Gaertner wrote: On Mon, 10 Feb 2014 19:45:44 +0200 patspiper patspi...@gmail.com wrote: [...] It allows the caller to specify the location (AFAIK it can be a relative path) of ppcxxx (the actual compiler). That option removes the need to rely on env variables to specify the fpc and ppcxxx paths. It would be enough to provide a qualified path in the IDE options for the fpc executable, and coupled with a -Xp field, it would allow fpc to locate the ppcxxx executable. ex: ./fpc -h -Xp../lib/fpc/2.6.3 Note: The -Xp is relative to the current working directory. When compiling a project the cwd is the project directory. That means ../lib/fpc/2.6.3 won't work. You have to specify the full path -Xp/usr/lib/fpc/2.6.3. That would be a snag as one won't be able to use the $FPCVER macro with the Xp switch. But come to think about it, it won't work anyway as it is ppcxxx that provides the fpc version, so using -Xp/usr/lib/fpc/$(FPCVER) will result in a catch 22 situation! :( The bad thing about -Xp is that if the directory does not exist, there is no error, no warning, no hint. fpc simply takes the default compiler. I always avoid fpc stuff to be in the default PATH. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Michael Van Canneyt schrieb: I find makefiles with all the variables, rules and whatnot far easier to understand than this dialog. I only can interpret the final commandlines, generated from makefiles after macro substitution. From there it's a puzzle to find out what deserves an adjustment, in order to yield the intended result. Some packages do not support overriding the output directory. Huh ? These packages are not very well designed then. A package should always be oblivious to the output dir. This again indicates to me that it is overly complicated to understand the rules, and to provide proper/conforming configurations. If it is not, it should IMHO be discarded from the lazarus installation. Why not simply fix the packages? Another possibility is to add a wizard to quickly setup some common options. Similar to the initial setup dialog. In view of the Some packages do not support overriding the output directory. you mentioned earlier, I somehow doubt this is a workable idea ? Just that problem (and all others) should be fixable by such a tool. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Mattias Gaertner schrieb: Martin Frb laza...@mfriebe.de hat am 10. Februar 2014 um 14:08 geschrieben: [...] I don't understand the IDE directories in Paths: The IDE has one set of search paths for every directory. That means a package can have different search paths than the active project. Here directory is not clear, sounds like a recursive definition? I guess it means package directory. Then the sentence reads ok. Actually, it means directory - any directory. A package can have source files in many directories. The search paths of a package are used for all files in all directories of a package. Same for projects. Sounds reasonable, if the search path is applied to every file (unit) in whatsoever directory. The IDE has one set of search paths (unit search path, include search path, sources search path) for each directory. This instead would indicate that the search path can vary, for units of the *same* package/project in *different* directories? It creates these sets on demand. Whenever a file is parsed the IDE looks up its cache. If this is the first time that a file in that directory is parsed, the IDE collects all settings and calculates the search paths and compiler options. This data is not stored on disk. Does this mean that the IDE determines to which project/package the directory belongs, and then applies the settings for that package (owner?) to that directory? Then we could eliminate the confusing directory references at all, and instead state that the project/package rules apply to every unit of that project/package. When the IDE uses directories internally, to find out to which project/package a file belongs, that's nothing that the user must know or care of. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using different FPC versions
Martin Frb schrieb: On 10/02/2014 12:17, Hans-Peter Diettrich wrote: Mattias Gaertner schrieb: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages Nice :-) I don't understand the IDE directories in Paths: The IDE has one set of search paths for every directory. That means a package can have different search paths than the active project. Here directory is not clear, sounds like a recursive definition? I guess it means package directory. Then the sentence reads ok. IMHO it should be The IDE has one set of search paths for every package and project. That means a package can have different search paths than the active project. That was my first impression, too, but it conflicts with following sentences. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Getting help for a type if its unit is not in uses
On 2014-02-05 08:03, Sven Barth wrote: Are there any ideas for improving this situation for people that know that there is an identifier in the RTL, FCL, whatever, but don't know which unit it resides in? Yes, simply use DocView and make sure you specified a help directory where INF help files are located, or concatenate the RTL, FCL and LCL inf help files as a command line parameter. DocView searches are instant, so don't worry about speed by concatenating help files. For DocView integration in Lazarus IDE (no need for a IDE recompile) follow this link. http://fpgui.sourceforge.net/docview_ide_integration.shtml Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus