Changeset 8 for trunk/UInstance.pas


Ignore:
Timestamp:
Feb 9, 2011, 1:36:53 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: Do not create new Lazarus config on every start.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UInstance.pas

    r7 r8  
    123123var
    124124  Config: TStringList;
     125  ConfigFileName: string;
    125126begin
     127  ConfigFileName := GetPath + DirectorySeparator + IDESource.ProjectShortName +
     128    DirectorySeparator + 'config' + DirectorySeparator + 'environmentoptions.xml';
     129  if not FileExistsUTF8(ConfigFileName) then
    126130  try
    127131    Config := TStringList.Create;
     
    133137    Config.Text := StringReplace(Config.Text, '%FPCPlatform%', MainForm.Platform, [rfReplaceAll]);
    134138    Config.Text := StringReplace(Config.Text, '%Temp%', GetEnvironmentVariableUTF8('Temp'), [rfReplaceAll]);
    135     Config.SaveToFile(GetPath + DirectorySeparator + IDESource.ProjectShortName +
    136       DirectorySeparator + 'config' + DirectorySeparator + 'environmentoptions.xml');
     139    Config.SaveToFile(ConfigFileName);
    137140  finally
    138141    Config.Free;
Note: See TracChangeset for help on using the changeset viewer.