<br><br><div class="gmail_quote">On 3 October 2010 11:41, Frank Church <span dir="ltr"><<a href="mailto:vfclists@gmail.com">vfclists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><br><div class="gmail_quote"><div class="im">On 29 September 2010 08:38, Mattias Gaertner <span dir="ltr"><<a href="mailto:nc-gaertnma@netcologne.de" target="_blank">nc-gaertnma@netcologne.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>On Wed, 29 Sep 2010 06:59:02 +0100<br>
Frank Church <<a href="mailto:vfclists@gmail.com" target="_blank">vfclists@gmail.com</a>> wrote:<br>
<br>
> If you are using different Lazarus versions but with same components and<br>
> packages, how would you organize separate build directories for the<br>
> different versions, but same source location.<br>
><br>
> eg. say I am using fpc 2.2.4/ lazarus 0.9.28, fpc 2.4.0 / lazarus 0.9.29 and<br>
> fpc 2.5.1/ lazarus 0.9.29<br>
><br>
> All though the package source files would be in one place (with necessary<br>
> ifdefs for compiler and lazarus versions) I would like the units to go into<br>
> say lazarus_0928_224/components/package_name_dir, lazarus0928240/components<br>
> package_name_dir, lazarus0929251/components/package_name_dir.<br>
><br>
> Would I have to configure that in the separate IDEs, or in the package<br>
> source files themselves?<br>
<br>
</div>There are many ways.<br>
For example use one lazarus config directory for each version<br>
combination and make all package output directories read only. Then the<br>
IDE will put the ppu files into the config directory.<br>
<br>
<br></blockquote></div><div><br>Can this be achieved via macros?<br><br> For instance I have just posted a blog article on FPC/Lazarus compilaton at <a href="http://devblog.brahmancreations.com/content/build-scripts-for-installing-freepascal-and-lazarus-from-source" target="_blank">http://devblog.brahmancreations.com/content/build-scripts-for-installing-freepascal-and-lazarus-from-source</a>, and what I want to do is to have the build_name variable as available to the IDE.<br>
<br>e.g if a lazarus build is named lazarus_0920_27001, I would like to use a macro based on the package name as well as the lazarus build name, so the compiler knows that units for zeoslib for instance go to directory /components/lazarus_0920_27001/zeoslib.<br>
<br>Even if the package sources must be modified that should be a minor problem.<br><br>Surely something like that must be possible.<br><br>I think it would also solve the problem of backporting packages made for fpc 2.5.1/lazarus 0.9.29 to the 0.9.28 and even the 0.9.26 series as it is extremely unlikely that they depend on language features only present in fpc 2.5.1.<br>
<br>Delphi developers are still producing code compatible with Delphi 7. Delphi 7 still appears to be the reference platform for Delphi development.<br><br><br> </div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Mattias<br>
<font color="#888888"><br>
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</font></blockquote></div></div><br clear="all"><div><div></div><div class="h5"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com" target="_blank">http://devblog.brahmancreations.com</a><br>
</div></div></blockquote></div><br>I am looking at <a href="http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames">http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames</a> and I am considering using a combinatin of PrimaryConfigPath and package name to set the output directory.<br>
<br><ul><li> <b>Package macros</b> - these can be used in the fields of a
package. For example in the search paths of a package. To use them
elsewhere give a package name as parameter.
<ul><li> <b>PkgDir()</b> - macro function for the directory (location of the .lpk) of a package ID given as parameter
</li><li> <b>PkgIncPath(id)</b> - macro function for the include path of a package ID given as parameter
</li><li> <b>PkgOutDir(id)</b> - macro function for the output directory of a package (e.g. where the ppu files are created)
</li><li> <b>PkgSrcPath(id)</b> - macro function for the source path (unit path + src path) of a package ID given as parameter
</li><li> <b>PkgUnitPath(id)</b> - macro function for the unit path of a package ID given as parameter
</li></ul>
</li></ul>
<br>However there doesn't seem to be a macro for the package name itself in the package related macros. Can NameOnly(xxx) be applied to one of the above macros to obtain the package name referring to "packagename.lpk"? As packages have their own directories, I might settle for a macro to retrieve the last element of the directory so that ..\components\componentdir produces componentdir. I want to avoid having to edit the packages themselves, or just edit them in one place. <br>
<br>I'd like to use a combination of ConfPath or PrimaryConfigPath or the FallBackOutputRoot to handle the issue.<br><br>Something like PrimaryConfigPath\NameOnly(packagepath)\lib/$(TargetCPU)-$(TargetOS) would be ideal.<br>
<br>Do ConfPath and PrimaryConfigPath refer to the same thing?<br><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>