Advertisement
TLama

Untitled

Aug 20th, 2015
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.85 KB | None | 0 0
  1. [Code]
  2. procedure AppendFile(const SrcFile, DestFile: string);
  3. var
  4.   SrcStream: TFileStream;
  5.   DestStream: TFileStream;
  6. begin
  7.   SrcStream := TFileStream.Create(SrcFile, fmOpenRead);
  8.   try
  9.     DestStream := TFileStream.Create(DestFile, fmOpenWrite);
  10.     try
  11.       DestStream.Seek(0, soFromEnd);
  12.       DestStream.CopyFrom(SrcStream, SrcStream.Size);
  13.     finally
  14.       DestStream.Free;
  15.     end;
  16.   finally
  17.     SrcStream.Free;
  18.   end;
  19. end;
  20.  
  21. procedure CurStepChanged(CurStep: TSetupStep);
  22. begin
  23.   // if the current step is post-installation (this is after the [Run] section has been processed), then...
  24.   if CurStep = ssPostInstall then
  25.     // do not hardcode file paths here; I don't know details to suggest a better way, but it's a wrong way
  26.     AppendFile('C:\COBIAX\cobiax_path.lsp', 'C:\Program Files\Autodesk\AutoCAD 2016\Support\acad2016.lsp');
  27. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement