Changeset 11 for trunk/UInstance.pas


Ignore:
Timestamp:
Mar 19, 2011, 12:17:53 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: Right setting of FPC instance location on Linux for Lazarus.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UInstance.pas

    r10 r11  
    108108var
    109109  Process: TProcess;
     110  I: Integer;
    110111begin
    111112  if Assigned(IDESource) then
     
    113114    UpdateFPCConfig;
    114115    UpdateLazarusConfig;
     116
    115117    Process := TProcess.Create(nil);
     118
     119    for I := 0 to GetEnvironmentVariableCount - 1 do
     120      Process.Environment.Add(GetEnvironmentString(I));
     121
     122    Process.Environment.Values['PATH'] := GetPath + DirectorySeparator + FPCSource.ProjectShortName +
     123      '/lib/fpc/' + FPCSource.VersionNumber + ':' + Process.Environment.Values['PATH'];
     124    Process.Environment.Values['PPC_CONFIG_PATH'] := GetBinPath;
     125    ShowMessage(Process.Environment.Text);
     126
    116127    Process.CurrentDirectory := GetPath + DirectorySeparator + IDESource.ProjectShortName;
    117128    Process.CommandLine := GetPath + DirectorySeparator + IDESource.ProjectShortName +
     
    167178    Config.LoadFromFile(MainForm.GetBaseDir + DirectorySeparator +
    168179      MainForm.TemplateDir + DirectorySeparator + 'fpc.cfg');
     180    {$IFDEF Windows}
    169181    Config.Text := StringReplace(Config.Text, '$(FPCDir)', GetPath +
    170182      DirectorySeparator + FPCSource.ProjectShortName, [rfReplaceAll]);
     183    {$ENDIF}
     184    {$IFDEF Linux}
     185    Config.Text := StringReplace(Config.Text, '$(FPCDir)', GetPath +
     186      DirectorySeparator + FPCSource.ProjectShortName +
     187      '/lib/fpc/' + FPCSource.VersionNumber, [rfReplaceAll]);
     188    {$ENDIF}
    171189    Config.SaveToFile(GetBinPath + DirectorySeparator + 'fpc.cfg');
    172190  finally
Note: See TracChangeset for help on using the changeset viewer.