IDE-induced lhelp compile does not use --primary-config-path
Original Reporter info from Mantis: BigChimp
-
Reporter name: Reinier Olislagers
Original Reporter info from Mantis: BigChimp
- Reporter name: Reinier Olislagers
Description:
On a cleanly compiled useride (e.g. on Windows), if lhelp.exe is not compiled, pressing F1 will cause chmhelppkg to compile lhelp.
It does not however use the primary config path of the currently running IDE but the default primary config path (e.g. c:\users&LtPos;username>\AppData\Local\lazarus)
If this directory does not exist or contains corrupt/incompatible settings, the build will fail.
Solution: get the primary config path and pass it to the lazbuild call with --primary-config-path=
Steps to reproduce:
Found this out on a clean (no Lazarus installed) Win2K test system using fpcup. FPCUP will set up a primary config path like this:
c:\documents and settings\administrator\local settings\application
data\lazarusdevsettings
After the fpcup run is complete, pressing F1 leads to failure building lhelp and these messages:
- Building lhelp -
primary config path: C:\Documents and Settings\Administrator\Local
Settings\Application Data\lazarus
Error: invalid Lazarus directory "": directory lcl not found
Failed building D:\development\lazarus\components\chmhelp\lhelp\lhelp.lpi
Additional information:
$(lazarusdir)\components\chmhelp\packages\idehelp\lazchmhelp.pas
lines 194..201 show lazbuild is called to compile lhelp without specifying --primary-config-path:
{$if (fpc_version=2) and (fpc_release<5)}
Proc.CommandLine := Lazbuild + ' ' + WS + ' ' + LHelpProject;
{$else}
Proc.Executable := Lazbuild;
Proc.Parameters.Add(WS);
Proc.Parameters.Add(LHelpProject);
{$endif}
Mantis conversion info:
- Mantis ID: 22565
- OS: Windows
- OS Build: Vista
- Build: r38123
- Platform: x64
- Version: 1.1 (SVN)
- Fixed in revision: 38133 (#ef38ed2d)