mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 05:30:45 +02:00
IDE: Build Advanced Lazarus improvements by Stephano
git-svn-id: trunk@28797 -
This commit is contained in:
parent
ae6986f2bd
commit
25edafc5a6
@ -1133,6 +1133,10 @@ begin
|
||||
end;
|
||||
|
||||
procedure TConfigureBuildLazarusDlg.CompileAdvancedButtonClick(Sender: TObject);
|
||||
// mrOk=change selected profiles. Selected profiels will be saved or discarded
|
||||
// depending on the calling dialog
|
||||
// mrYes=save and compile
|
||||
// mrCancel=do nothing
|
||||
var
|
||||
EditForm: TGenericCheckListForm;
|
||||
i, ind: Integer;
|
||||
@ -1148,15 +1152,17 @@ begin
|
||||
EditForm.CheckListBox1.Checked[ind]:=True;
|
||||
end;
|
||||
// Show the form.
|
||||
if EditForm.ShowModal=mrOK then begin
|
||||
EditForm.ShowModal;
|
||||
if EditForm.ModalResult in [mrOK, mrYes] then begin
|
||||
// Copy checked profile names to Selected.
|
||||
fProfiles.Selected.Clear;
|
||||
for i:=0 to fProfiles.Count-1 do begin // fProfiles and CheckListBox1
|
||||
if EditForm.CheckListBox1.Checked[i] then // indexes match now.
|
||||
fProfiles.Selected.Add(fProfiles[i].Name);
|
||||
end;
|
||||
ModalResult:=mrAll;
|
||||
end;
|
||||
if EditForm.ModalResult=mrYes then
|
||||
ModalResult:=mrAll;
|
||||
finally
|
||||
EditForm.Free;
|
||||
end;
|
||||
|
@ -3,6 +3,7 @@ object GenericCheckListForm: TGenericCheckListForm
|
||||
Height = 301
|
||||
Top = 526
|
||||
Width = 343
|
||||
ActiveControl = CheckListBox1
|
||||
Caption = 'GenericCheckListForm'
|
||||
ClientHeight = 301
|
||||
ClientWidth = 343
|
||||
@ -11,8 +12,8 @@ object GenericCheckListForm: TGenericCheckListForm
|
||||
LCLVersion = '0.9.29'
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 34
|
||||
Top = 261
|
||||
Height = 37
|
||||
Top = 258
|
||||
Width = 331
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.Caption = '&OK'
|
||||
@ -30,7 +31,7 @@ object GenericCheckListForm: TGenericCheckListForm
|
||||
end
|
||||
object CheckListBox1: TCheckListBox
|
||||
Left = 0
|
||||
Height = 255
|
||||
Height = 252
|
||||
Top = 0
|
||||
Width = 343
|
||||
Align = alClient
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ButtonPanel,
|
||||
StdCtrls, CheckLst, LazarusIDEStrConsts;
|
||||
StdCtrls, CheckLst, LazarusIDEStrConsts, Buttons;
|
||||
|
||||
type
|
||||
|
||||
@ -32,9 +32,19 @@ implementation
|
||||
{ TGenericCheckListForm }
|
||||
|
||||
procedure TGenericCheckListForm.FormCreate(Sender: TObject);
|
||||
var
|
||||
BitButtonYes: TBitBtn;
|
||||
begin
|
||||
ButtonPanel1.OKButton.Caption:=lisOk;
|
||||
ButtonPanel1.CancelButton.Caption:=dlgCancel;
|
||||
|
||||
// save and compile
|
||||
BitButtonYes:=TBitBtn.Create(ButtonPanel1);
|
||||
BitButtonYes.Kind:=bkCustom;
|
||||
BitButtonYes.ModalResult:=mrYes;
|
||||
BitButtonYes.Caption:=lisLazBuildBuild;
|
||||
BitButtonYes.Align:=alRight;
|
||||
BitButtonYes.Parent:=ButtonPanel1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
29
ide/main.pp
29
ide/main.pp
@ -327,6 +327,7 @@ type
|
||||
procedure mnuToolConvertDelphiPackageClicked(Sender: TObject);
|
||||
procedure mnuToolConvertEncodingClicked(Sender: TObject);
|
||||
procedure mnuToolBuildLazarusClicked(Sender: TObject);
|
||||
procedure mnuToolBuildAdvancedLazarusClicked(Sender: TObject);
|
||||
procedure mnuToolConfigBuildLazClicked(Sender: TObject);
|
||||
procedure mnuCustomExtToolClick(Sender: TObject);
|
||||
|
||||
@ -3191,7 +3192,7 @@ begin
|
||||
DoConvertDFMtoLFM;
|
||||
|
||||
ecBuildLazarus:
|
||||
DoBuildLazarus([]);
|
||||
mnuToolBuildLazarusClicked(Self);
|
||||
|
||||
ecConfigBuildLazarus:
|
||||
mnuToolConfigBuildLazClicked(Self);
|
||||
@ -4371,6 +4372,32 @@ begin
|
||||
DoBuildLazarus([]);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuToolBuildAdvancedLazarusClicked(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
FoundProfToBuild: Boolean;
|
||||
s: String;
|
||||
begin
|
||||
with MiscellaneousOptions do begin
|
||||
FoundProfToBuild:=False;
|
||||
s:=sLineBreak+sLineBreak;
|
||||
for i:=0 to BuildLazProfiles.Selected.Count-1 do
|
||||
if BuildLazProfiles.IndexByName(BuildLazProfiles.Selected[i])<>-1 then begin
|
||||
s:=s+BuildLazProfiles.Selected[i]+sLineBreak;
|
||||
FoundProfToBuild:=True;
|
||||
end;
|
||||
if not FoundProfToBuild then begin
|
||||
ShowMessage(lisNoBuildProfilesSelected);
|
||||
exit;
|
||||
end;
|
||||
if BuildLazProfiles.ConfirmBuild then
|
||||
if MessageDlg(Format(lisConfirmBuildAllProfiles, [s+sLineBreak]),
|
||||
mtConfirmation, mbYesNo, 0)<>mrYes then
|
||||
exit;
|
||||
DoBuildAdvancedLazarus(BuildLazProfiles.Selected);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuToolConfigBuildLazClicked(Sender: TObject);
|
||||
var
|
||||
CmdLineDefines: TDefineTemplate;
|
||||
|
Loading…
Reference in New Issue
Block a user