File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -378,7 +378,6 @@ constructor TFormMain.Create(AOwner: TComponent);
378378
379379 FDocument := TRibbonDocument.Create;
380380 FCompiler := TRibbonCompiler.Create;
381- FCompiler.OnMessage := RibbonCompilerMessage;
382381
383382 FFrameCommands := TFrameCommands.Create(Self);
384383 FFrameCommands.Parent := TabSheetCommands;
@@ -389,10 +388,19 @@ constructor TFormMain.Create(AOwner: TComponent);
389388 FFrameXmlSource := TFrameXmlSource.Create(Self);
390389 FFrameXmlSource.Parent := TabSheetXmlSource;
391390
392- if (ParamCount > 0 ) and FileExists(ParamStr(1 )) then
393- OpenFile(ParamStr(1 ))
394- else
395- NewFile(True);
391+ // Handle command line options
392+ if (ParamCount > 0 ) and FileExists(ParamStr(1 )) then begin // File passed at the command line?
393+ OpenFile(ParamStr(1 ));
394+ if FindCmdLineSwitch(' BUILD' ) then begin
395+ ActionBuild.Execute();
396+ Application.ShowMainForm := False;
397+ Application.Terminate();
398+ end // if /BUILD
399+ else begin
400+ NewFile(True);
401+ FCompiler.OnMessage := RibbonCompilerMessage;
402+ end ;// else
403+ end // if file passed
396404end ;
397405
398406destructor TFormMain.Destroy;
You can’t perform that action at this time.
0 commit comments