LongDirtyAnimAlf / fpcupdeluxe

A GUI based installer for FPC and Lazarus
476 stars 88 forks source link

Fix installation of pas2js_rtl #696

Closed rcla closed 15 hours ago

rcla commented 2 weeks 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 15 hours ago

Thanks !