LongDirtyAnimAlf / fpcupdeluxe

A GUI based installer for FPC and Lazarus
505 stars 94 forks source link

Fix installation of pas2js_rtl #696

Closed rcla closed 4 months ago

rcla commented 5 months ago

We currently have the following errors: Windows: Warning: Source file "pas2js.pp" from package pas2js not found for x86_64-win64

Linux: Warning: Source file "pas2js.pp" from package pas2js not found for x86_64-linux

In the pas2js source code, in fpmake.pp:

FPCSrcDir:=GetEnvironmentVariable('FPCDIR');
  if FPCSrcDir<>'' then
    FPCSrcDir:=IncludeTrailingPathDelimiter(ExpandFileName(FPCSrcDir));
  if FPCSrcDir='' then
    FPCSrcDir:=IncludeTrailingPathDelimiter(GetCurrentDir)+'compiler'+PathDelim;

Inside function TPas2jsInstaller.BuildModule Set FPCDIR environment variable

Processor.Environment.SetVar('FPCDIR',FFPCSourceDir);

And finally I restore it

Processor.Environment.SetVar('FPCDIR',OldPathFPCD);
LongDirtyAnimAlf commented 4 months ago

Thanks !