[fpc-devel] Lazarus IDE / Packages - SetAlternativeCompile for Before and After

Michael Van Canneyt michael at freepascal.org
Sun Sep 9 18:33:49 CEST 2018


I think you mailed to the wrong list ?

Michael.

On Sun, 9 Sep 2018, Mathias wrote:

> Hello Lazarus team,
>
> i build an AVR package for the Lazarus IDE.
> It is absolutely necessary, that I can enter something with compiler 
> commands, with "afterwards". There comes in an avrdude call.
>
> This works, I made the following changes in Lazarus.
> It would be nice who the Lazarus team could put this firmly in place.
>
> Even more ingenious would be who you could even read it out, eg. with 
> "GetAlternativeCompile"
>
> The current state of my AVR package I have on GitHub. 
> https://github.com/sechshelme/AVR-Lazarus/tree/master/AVR_Package
>
>
>
> // === Lazarus 1.9.0 r58920M ===
>
>
>      // components/ideintf/compoptsintf.pas: Zeile 454
>
>      // old
>
>         procedureSetAlternativeCompile(constCommand:string;
>      ScanFPCMsgs:boolean); virtual; abstract;// disable normal compile and 
> call this instead
>
>      // new
>
>         procedureSetAlternativeCompile(constCommand:string;
>      ScanFPCMsgs:boolean; After:Boolean=False); virtual; abstract;// disable 
> normal compile and call this instead
>
>
>
>      // ide/compileroptions.pp: Zeile 499 + 3695
>
>
>      // old
>
>         procedureSetAlternativeCompile(constCommand:string;
>      ScanFPCMsgs:boolean); override;
>
>      .....
>
>      procedureTBaseCompilerOptions.SetAlternativeCompile(constCommand:string;
>
>        ScanFPCMsgs:boolean);
>
>      begin
>
>        CompilerPath:='';
>
>        ExecuteBefore.Command:=Command;
>
>       ifScanFPCMsgsthen
>
>          ExecuteBefore.Parsers.Text:=SubToolFPC+LineEnding+SubToolMake
>
>       else
>
>          ExecuteBefore.Parsers.Clear;
>
>      end;
>
>
>      // new
>
>         procedureSetAlternativeCompile(constCommand:string;
>      ScanFPCMsgs:boolean; After:Boolen); override;
>
>      .....
>
>      procedureTBaseCompilerOptions.SetAlternativeCompile(constCommand:string;
>
>        ScanFPCMsgs:boolean; After:Boolen);
>
>      begin
>
>        CompilerPath:='';
>
>
>       ifAfterthenbegin
>
>          ExecuteAfter.Command:=Command;
>
>         ifScanFPCMsgsthen
>
>            ExecuteAfter.Parsers.Text:=SubToolFPC+LineEnding+SubToolMake
>
>         else
>
>            ExecuteAfter.Parsers.Clear;
>
>       endelsebegin
>
>          ExecuteBefore.Command:=Command;
>
>         ifScanFPCMsgsthen
>
>            ExecuteBefore.Parsers.Text:=SubToolFPC+LineEnding+SubToolMake
>
>         else
>
>            ExecuteBefore.Parsers.Clear;
>
>       end;
>
>      end;
>
>
>      // ide/project.pp: Zeile 551 + 6255
>
>
>      // old
>
>         procedureSetAlternativeCompile(constCommand:string;
>      ScanFPCMsgs:boolean); override;
>
>      .....
>
>      procedureTProjectCompilerOptions.SetAlternativeCompile(constCommand:string;
>
>        ScanFPCMsgs:boolean);
>
>      begin
>
>       inheritedSetAlternativeCompile(Command,ScanFPCMsgs);
>
>        CompileReasons:=[];
>
>      end;
>
>
>      // new
>
>         procedureSetAlternativeCompile(constCommand:string;
>      ScanFPCMsgs:boolean; After:Boolean); override;
>
>      .....
>
>      procedureTProjectCompilerOptions.SetAlternativeCompile(constCommand:string;
>
>        ScanFPCMsgs:boolean; After:Boolean);
>
>      begin
>
>       inheritedSetAlternativeCompile(Command,ScanFPCMsgs,After);
>
>        CompileReasons:=[];
>
>      end;
>
>


More information about the fpc-devel mailing list