mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:39:19 +02:00
MG: fixed saving unitlinks after changing fpc soure path
git-svn-id: trunk@1675 -
This commit is contained in:
parent
872140dc14
commit
55c755f6f0
63
ide/main.pp
63
ide/main.pp
@ -2231,6 +2231,38 @@ var EnvironmentOptionsDialog: TEnvironmentOptionsDialog;
|
|||||||
MacroValueChanged:=true;
|
MacroValueChanged:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure RescanCompilerDefines;
|
||||||
|
begin
|
||||||
|
// rescan compiler defines
|
||||||
|
// ask the compiler for its settings
|
||||||
|
CompilerTemplate:=CodeToolBoss.DefinePool.CreateFPCTemplate(
|
||||||
|
EnvironmentOptions.CompilerFilename,CompilerUnitSearchPath);
|
||||||
|
if CompilerTemplate<>nil then begin
|
||||||
|
CodeToolBoss.DefineTree.ReplaceRootSameNameAddFirst(CompilerTemplate);
|
||||||
|
// create compiler macros to simulate the Makefiles of the FPC sources
|
||||||
|
FPCSrcTemplate:=CodeToolBoss.DefinePool.CreateFPCSrcTemplate(
|
||||||
|
CodeToolBoss.GlobalValues.Variables[ExternalMacroStart+'FPCSrcDir'],
|
||||||
|
CompilerUnitSearchPath, false, CompilerUnitLinks);
|
||||||
|
if FPCSrcTemplate<>nil then begin
|
||||||
|
CodeToolBoss.DefineTree.RemoveRootDefineTemplateByName(
|
||||||
|
FPCSrcTemplate.Name);
|
||||||
|
FPCSrcTemplate.InsertBehind(CompilerTemplate);
|
||||||
|
end else begin
|
||||||
|
MessageDlg(lisFPCSourceDirectoryError,
|
||||||
|
lisPLzCheckTheFPCSourceDirectory,
|
||||||
|
mtError,[mbOk],0);
|
||||||
|
end;
|
||||||
|
// save unitlinks
|
||||||
|
InputHistories.SetLastFPCUnitLinks(
|
||||||
|
EnvironmentOptions.CompilerFilename,
|
||||||
|
CompilerUnitSearchPath,CompilerUnitLinks);
|
||||||
|
InputHistories.Save;
|
||||||
|
end else begin
|
||||||
|
MessageDlg(lisCompilerError,lisPlzCheckTheCmpilerName,
|
||||||
|
mtError,[mbOk],0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
EnvironmentOptionsDialog:=TEnvironmentOptionsDialog.Create(Application);
|
EnvironmentOptionsDialog:=TEnvironmentOptionsDialog.Create(Application);
|
||||||
try
|
try
|
||||||
@ -2257,29 +2289,7 @@ Begin
|
|||||||
|
|
||||||
if MacroValueChanged then CodeToolBoss.DefineTree.ClearCache;
|
if MacroValueChanged then CodeToolBoss.DefineTree.ClearCache;
|
||||||
if FPCCompilerChanged or FPCSrcDirChanged then begin
|
if FPCCompilerChanged or FPCSrcDirChanged then begin
|
||||||
// rescan compiler defines
|
RescanCompilerDefines;
|
||||||
// ask the compiler for his settings
|
|
||||||
CompilerTemplate:=CodeToolBoss.DefinePool.CreateFPCTemplate(
|
|
||||||
EnvironmentOptions.CompilerFilename,CompilerUnitSearchPath);
|
|
||||||
if CompilerTemplate<>nil then begin
|
|
||||||
CodeToolBoss.DefineTree.ReplaceRootSameNameAddFirst(CompilerTemplate);
|
|
||||||
// create compiler macros to simulate the Makefiles of the FPC sources
|
|
||||||
FPCSrcTemplate:=CodeToolBoss.DefinePool.CreateFPCSrcTemplate(
|
|
||||||
CodeToolBoss.GlobalValues.Variables[ExternalMacroStart+'FPCSrcDir'],
|
|
||||||
CompilerUnitSearchPath, false, CompilerUnitLinks);
|
|
||||||
if FPCSrcTemplate<>nil then begin
|
|
||||||
CodeToolBoss.DefineTree.RemoveRootDefineTemplateByName(
|
|
||||||
FPCSrcTemplate.Name);
|
|
||||||
FPCSrcTemplate.InsertBehind(CompilerTemplate);
|
|
||||||
end else begin
|
|
||||||
MessageDlg(lisFPCSourceDirectoryError,
|
|
||||||
lisPLzCheckTheFPCSourceDirectory,
|
|
||||||
mtError,[mbOk],0);
|
|
||||||
end;
|
|
||||||
end else begin
|
|
||||||
MessageDlg(lisCompilerError,lisPlzCheckTheCmpilerName,
|
|
||||||
mtError,[mbOk],0);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// save to disk
|
// save to disk
|
||||||
@ -5308,8 +5318,7 @@ begin
|
|||||||
writeln('');
|
writeln('');
|
||||||
writeln('NOTE: Compiler Filename not set! (see Environment Options)');
|
writeln('NOTE: Compiler Filename not set! (see Environment Options)');
|
||||||
end;
|
end;
|
||||||
InputHistories.LastFPCPath:=EnvironmentOptions.CompilerFilename;
|
|
||||||
|
|
||||||
if (EnvironmentOptions.LazarusDirectory='') then begin
|
if (EnvironmentOptions.LazarusDirectory='') then begin
|
||||||
writeln('');
|
writeln('');
|
||||||
writeln(
|
writeln(
|
||||||
@ -5340,6 +5349,7 @@ begin
|
|||||||
'NOTE: Could not create Define Template for Free Pascal Compiler');
|
'NOTE: Could not create Define Template for Free Pascal Compiler');
|
||||||
|
|
||||||
// create compiler macros to simulate the Makefiles of the FPC sources
|
// create compiler macros to simulate the Makefiles of the FPC sources
|
||||||
|
InputHistories.LastFPCPath:=EnvironmentOptions.CompilerFilename;
|
||||||
CompilerUnitLinks:=InputHistories.LastFPCUnitLinks;
|
CompilerUnitLinks:=InputHistories.LastFPCUnitLinks;
|
||||||
UnitLinksChanged:=InputHistories.LastFPCUnitLinksNeedsUpdate(
|
UnitLinksChanged:=InputHistories.LastFPCUnitLinksNeedsUpdate(
|
||||||
CompilerUnitSearchPath);
|
CompilerUnitSearchPath);
|
||||||
@ -6339,6 +6349,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.294 2002/05/13 06:12:54 lazarus
|
||||||
|
MG: fixed saving unitlinks after changing fpc soure path
|
||||||
|
|
||||||
Revision 1.293 2002/05/10 06:57:42 lazarus
|
Revision 1.293 2002/05/10 06:57:42 lazarus
|
||||||
MG: updated licenses
|
MG: updated licenses
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TCustomRadioGroup.CanModify : boolean;
|
function TCustomRadioGroup.CanModify : boolean;
|
||||||
begin
|
begin
|
||||||
Result := true;
|
Result := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -305,6 +305,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.10 2002/05/13 06:12:57 lazarus
|
||||||
|
MG: fixed saving unitlinks after changing fpc soure path
|
||||||
|
|
||||||
Revision 1.9 2002/05/10 06:05:52 lazarus
|
Revision 1.9 2002/05/10 06:05:52 lazarus
|
||||||
MG: changed license to LGPL
|
MG: changed license to LGPL
|
||||||
|
|
||||||
|
@ -48,14 +48,14 @@
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
constructor TRadioButton.Create(AOwner : TComponent);
|
constructor TRadioButton.Create(AOwner : TComponent);
|
||||||
begin
|
begin
|
||||||
if assigned(AOwner) then
|
if assigned(AOwner) then
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
fCompStyle := csRadioButton;
|
fCompStyle := csRadioButton;
|
||||||
Visible := False;
|
Visible := False;
|
||||||
Hint := 'Radiobutton';
|
Hint := 'Radiobutton';
|
||||||
ShowHint := True;
|
ShowHint := True;
|
||||||
fGroup := 0;
|
fGroup := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -153,6 +153,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.4 2002/05/13 06:12:57 lazarus
|
||||||
|
MG: fixed saving unitlinks after changing fpc soure path
|
||||||
|
|
||||||
Revision 1.3 2002/05/10 06:05:55 lazarus
|
Revision 1.3 2002/05/10 06:05:55 lazarus
|
||||||
MG: changed license to LGPL
|
MG: changed license to LGPL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user