mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 19:39:17 +02:00
IDE: renamed build macros in compiler options frame to IDE macros
git-svn-id: trunk@34636 -
This commit is contained in:
parent
6e4efa1d2e
commit
bf3313f631
@ -377,8 +377,7 @@ begin
|
|||||||
// check syntax
|
// check syntax
|
||||||
if (S='') or (not IsValidIdent(S)) then begin
|
if (S='') or (not IsValidIdent(S)) then begin
|
||||||
MessageDlg(lisCCOErrorCaption,
|
MessageDlg(lisCCOErrorCaption,
|
||||||
Format(lisInvalidBuildMacroTheBuildMacroMustBeAPascalIdentifie, ['"',
|
Format(lisInvalidMacroTheMacroMustBeAPascalIdentifie, ['"', S, '"']),
|
||||||
S, '"']),
|
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel],0);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -389,7 +388,7 @@ begin
|
|||||||
then begin
|
then begin
|
||||||
BetterName:=GetMacroNamePrefix(cbmpMedium)+S;
|
BetterName:=GetMacroNamePrefix(cbmpMedium)+S;
|
||||||
DlgResult:=QuestionDlg(lisCCOWarningCaption,
|
DlgResult:=QuestionDlg(lisCCOWarningCaption,
|
||||||
Format(lisTheBuildMacroDoesNotBeginWith, [S, Prefix]),
|
Format(lisTheMacroDoesNotBeginWith, [S, Prefix]),
|
||||||
mtWarning, [mrCancel, mrYes, Format(lisRenameTo, [BetterName]),
|
mtWarning, [mrCancel, mrYes, Format(lisRenameTo, [BetterName]),
|
||||||
mrIgnore], 0);
|
mrIgnore], 0);
|
||||||
if DlgResult=mrIgnore then begin
|
if DlgResult=mrIgnore then begin
|
||||||
@ -403,7 +402,7 @@ begin
|
|||||||
// check for keyword
|
// check for keyword
|
||||||
if WordIsKeyWord.DoItCaseInsensitive(S) then begin
|
if WordIsKeyWord.DoItCaseInsensitive(S) then begin
|
||||||
MessageDlg(lisCCOErrorCaption,
|
MessageDlg(lisCCOErrorCaption,
|
||||||
Format(lisInvalidBuildMacroTheNameIsAKeyword, [S]),
|
Format(lisInvalidMacroTheNameIsAKeyword, [S]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel],0);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -426,7 +425,7 @@ begin
|
|||||||
or (SysUtils.CompareText('LCLWidgetType',S)=0)
|
or (SysUtils.CompareText('LCLWidgetType',S)=0)
|
||||||
then begin
|
then begin
|
||||||
MessageDlg(lisCCOErrorCaption,
|
MessageDlg(lisCCOErrorCaption,
|
||||||
Format(lisThereIsAlreadyABuildMacroWithTheName, ['"', S, '"']),
|
Format(lisThereIsAlreadyAMacroWithTheName, ['"', S, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel],0);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -437,7 +436,7 @@ begin
|
|||||||
Vars:=GetBuildMacroValues(TBaseCompilerOptions(BuildMacros.Owner),false);
|
Vars:=GetBuildMacroValues(TBaseCompilerOptions(BuildMacros.Owner),false);
|
||||||
if (Vars<>nil) and Vars.IsDefined(PChar(S)) then begin
|
if (Vars<>nil) and Vars.IsDefined(PChar(S)) then begin
|
||||||
DlgResult:=MessageDlg(lisCCOWarningCaption,
|
DlgResult:=MessageDlg(lisCCOWarningCaption,
|
||||||
Format(lisThereIsAlreadyABuildMacroWithTheName, ['"', S, '"']),
|
Format(lisThereIsAlreadyAMacroWithTheName, ['"', S, '"']),
|
||||||
mtWarning,[mbCancel,mbIgnore],0);
|
mtWarning,[mbCancel,mbIgnore],0);
|
||||||
if DlgResult<>mrIgnore then
|
if DlgResult<>mrIgnore then
|
||||||
exit;
|
exit;
|
||||||
@ -540,7 +539,7 @@ begin
|
|||||||
if i>=0 then aBuildMacro.Values.Delete(i);
|
if i>=0 then aBuildMacro.Values.Delete(i);
|
||||||
end else begin
|
end else begin
|
||||||
if MessageDlg(lisConfirmDelete,
|
if MessageDlg(lisConfirmDelete,
|
||||||
Format(lisDeleteBuildMacro, ['"', aBuildMacro.Identifier, '"']),
|
Format(lisDeleteMacro, ['"', aBuildMacro.Identifier, '"']),
|
||||||
mtConfirmation,[mbYes,mbCancel],0)<>mrYes
|
mtConfirmation,[mbYes,mbCancel],0)<>mrYes
|
||||||
then exit;
|
then exit;
|
||||||
i:=BuildMacros.IndexOfIdentifier(aBuildMacro.Identifier);
|
i:=BuildMacros.IndexOfIdentifier(aBuildMacro.Identifier);
|
||||||
@ -712,7 +711,7 @@ begin
|
|||||||
BuildMacroDescriptionEdit.Text:=aBuildMacro.Description;
|
BuildMacroDescriptionEdit.Text:=aBuildMacro.Description;
|
||||||
BMAddMacroValueSpeedButton.Hint:=Format(lisAddValueToMacro, [aBuildMacro.Identifier]);
|
BMAddMacroValueSpeedButton.Hint:=Format(lisAddValueToMacro, [aBuildMacro.Identifier]);
|
||||||
if NodeType=cbmntBuildMacro then
|
if NodeType=cbmntBuildMacro then
|
||||||
BMDeleteMacroSpeedButton.Hint:=Format(lisDeleteMacro, [aBuildMacro.Identifier])
|
BMDeleteMacroSpeedButton.Hint:=Format(lisDeleteMacro, ['"',aBuildMacro.Identifier,'"'])
|
||||||
else
|
else
|
||||||
BMDeleteMacroSpeedButton.Hint:=Format(lisDeleteValue2, [BuildMacrosTreeView.
|
BMDeleteMacroSpeedButton.Hint:=Format(lisDeleteValue2, [BuildMacrosTreeView.
|
||||||
Selected.Text]);
|
Selected.Text]);
|
||||||
@ -964,7 +963,7 @@ begin
|
|||||||
FBuildMacros:=TIDEBuildMacros.Create(nil);
|
FBuildMacros:=TIDEBuildMacros.Create(nil);
|
||||||
fEngine:=TCTConfigScriptEngine.Create;
|
fEngine:=TCTConfigScriptEngine.Create;
|
||||||
|
|
||||||
MacrosGroupBox.Caption:=lisBuildMacros2;
|
MacrosGroupBox.Caption:=lisIDEMacros;
|
||||||
BuildMacrosTreeView.Images := IDEImages.Images_24;
|
BuildMacrosTreeView.Images := IDEImages.Images_24;
|
||||||
fVarImgID:=IDEImages.LoadImage(24,'da_define');
|
fVarImgID:=IDEImages.LoadImage(24,'da_define');
|
||||||
fValueImgID:=IDEImages.LoadImage(24,'da_define');
|
fValueImgID:=IDEImages.LoadImage(24,'da_define');
|
||||||
@ -1008,7 +1007,7 @@ end;
|
|||||||
|
|
||||||
function TCompOptBuildMacrosFrame.GetTitle: String;
|
function TCompOptBuildMacrosFrame.GetTitle: String;
|
||||||
begin
|
begin
|
||||||
Result:=lisBuildMacros;
|
Result:=lisIDEMacros;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptBuildMacrosFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompOptBuildMacrosFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
|
@ -4935,16 +4935,14 @@ resourcestring
|
|||||||
lisValue = 'Value:';
|
lisValue = 'Value:';
|
||||||
lisValues = 'Values';
|
lisValues = 'Values';
|
||||||
lisDefaultValue = 'Default value';
|
lisDefaultValue = 'Default value';
|
||||||
lisBuildMacros = 'Build Macros';
|
lisIDEMacros = 'IDE Macros';
|
||||||
lisBuildMacros2 = 'Build macros';
|
|
||||||
//lisCustomBuildMacros = 'Custom build macros';
|
|
||||||
lisConfirmDelete = 'Confirm delete';
|
lisConfirmDelete = 'Confirm delete';
|
||||||
lisDeleteBuildMacro = 'Delete build macro %s%s%s?';
|
lisDeleteMacro = 'Delete macro %s%s%s?';
|
||||||
lisValue2 = 'Value%s';
|
lisValue2 = 'Value%s';
|
||||||
lisDeleteValue = 'Delete value %s%s%s';
|
lisDeleteValue = 'Delete value %s%s%s';
|
||||||
lisInvalidBuildMacroTheBuildMacroMustBeAPascalIdentifie = 'Invalid build '
|
lisInvalidMacroTheMacroMustBeAPascalIdentifie = 'Invalid '
|
||||||
+'macro %s%s%s. The build macro must be a pascal identifier.';
|
+'macro %s%s%s. The macro name must be a pascal identifier.';
|
||||||
lisThereIsAlreadyABuildMacroWithTheName = 'There is already a build macro '
|
lisThereIsAlreadyAMacroWithTheName = 'There is already a macro '
|
||||||
+'with the name %s%s%s.';
|
+'with the name %s%s%s.';
|
||||||
lisDuplicateFoundOfValue = 'Duplicate found of value %s%s%s.';
|
lisDuplicateFoundOfValue = 'Duplicate found of value %s%s%s.';
|
||||||
lisSetValue = 'Set value';
|
lisSetValue = 'Set value';
|
||||||
@ -5153,12 +5151,11 @@ resourcestring
|
|||||||
synfHideCommentsInSelection = 'Hide comments in selection';
|
synfHideCommentsInSelection = 'Hide comments in selection';
|
||||||
lisCanNotCompileProject = 'Cannot compile project';
|
lisCanNotCompileProject = 'Cannot compile project';
|
||||||
lisTheProjectHasNoMainSourceFile = 'The project has no main source file.';
|
lisTheProjectHasNoMainSourceFile = 'The project has no main source file.';
|
||||||
lisInvalidBuildMacroTheNameIsAKeyword = 'Invalid build macro "%s". The name '
|
lisInvalidMacroTheNameIsAKeyword = 'Invalid macro name "%s". The name '
|
||||||
+'is a keyword.';
|
+'is a keyword.';
|
||||||
lisTheBuildMacroDoesNotBeginWith = 'The build macro "%s" does not begin with "%s".';
|
lisTheMacroDoesNotBeginWith = 'The macro "%s" does not begin with "%s".';
|
||||||
lisRenameTo = 'Rename to %s';
|
lisRenameTo = 'Rename to %s';
|
||||||
lisAddValueToMacro = 'Add value to macro %s';
|
lisAddValueToMacro = 'Add value to macro %s';
|
||||||
lisDeleteMacro = 'Delete macro %s';
|
|
||||||
lisDeleteValue2 = 'Delete value %s';
|
lisDeleteValue2 = 'Delete value %s';
|
||||||
lisNoMacroSelected = 'No macro selected';
|
lisNoMacroSelected = 'No macro selected';
|
||||||
lisMacro = 'Macro %s';
|
lisMacro = 'Macro %s';
|
||||||
|
@ -28,8 +28,8 @@ uses
|
|||||||
type
|
type
|
||||||
|
|
||||||
{ TLazBuildMacro
|
{ TLazBuildMacro
|
||||||
Every package/project can define build macros. A build macro has a name,
|
Every package/project can define build macros / ide macros. A build macro
|
||||||
a description, a list of possible values and a default value.
|
has a name, a description, a list of possible values and a default value.
|
||||||
The default value can be an expression using other build macros.
|
The default value can be an expression using other build macros.
|
||||||
The IDE defines basic macros like TargetOS and TargetCPU.
|
The IDE defines basic macros like TargetOS and TargetCPU.
|
||||||
The LCL package defines the macro LCLWidgetType. }
|
The LCL package defines the macro LCLWidgetType. }
|
||||||
|
Loading…
Reference in New Issue
Block a user