diff --git a/ide/editdefinetree.pas b/ide/editdefinetree.pas index b8c939b61d..290e5848bc 100644 --- a/ide/editdefinetree.pas +++ b/ide/editdefinetree.pas @@ -124,7 +124,7 @@ begin // create the template for the project directory ProjectDir:=TDefineTemplate.Create(ProjectDirDefTemplName, - 'Current Project Directory','','$(#ProjectDir)',da_Directory); + 'Current Project Directory','','$(#ProjPath)',da_Directory); Result.AddChild(ProjectDir); ProjectDirTemplate:=ProjectDir; diff --git a/ide/project.pp b/ide/project.pp index fb7a6638ad..1b89456f9d 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -1450,7 +1450,7 @@ begin RunParameterOptions.Load(xmlconfig,'ProjectOptions/'); {$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TProject.ReadProject update ct boss');{$ENDIF} - CodeToolBoss.GlobalValues.Variables[ExternalMacroStart+'ProjectDir']:= + CodeToolBoss.GlobalValues.Variables[ExternalMacroStart+'ProjPath']:= ProjectDirectory; CodeToolBoss.DefineTree.ClearCache; @@ -2654,6 +2654,9 @@ end. { $Log$ + Revision 1.115 2003/04/29 09:31:10 mattias + changed macro name ProjectDir to ProjPath + Revision 1.114 2003/04/24 16:44:28 mattias implemented define templates for projects with packages diff --git a/packager/pkgmanager.pas b/packager/pkgmanager.pas index 502432493b..561f5d5580 100644 --- a/packager/pkgmanager.pas +++ b/packager/pkgmanager.pas @@ -1352,14 +1352,31 @@ begin ConflictPkg:=PackageGraph.FindAPackageWithName(APackage.Name,nil); if ConflictPkg<>nil then begin if not PackageGraph.PackageCanBeReplaced(ConflictPkg,APackage) then begin - Result:=MessageDlg('Package Name already loaded', - 'There is already a package with the name "'+APackage.Name+'" loaded'#13 + Result:=MessageDlg('Package conflicts', + 'There is already a package "'+ConflictPkg.IDAsString+'" loaded'#13 +'from file "'+ConflictPkg.Filename+'".'#13 - +'See Components -> Package Graph.', + +'See Components -> Package Graph.'#13 + +'Replace is impossible.', mtError,[mbCancel,mbAbort],0); exit; end; + if ConflictPkg.Modified and (not ConflictPkg.ReadOnly) then begin + Result:=MessageDlg('Save Package?', + 'Loading package '+APackage.IDAsString + +' will replace package '+ConflictPkg.IDAsString+#13 + +'from file '+ConflictPkg.Filename+'.'#13 + +'The old package is modified.'#13 + +#13 + +'Save old package '+ConflictPkg.Filename+'?', + mtConfirmation,[mbYes,mbNo,mbCancel,mbAbort],0); + if Result=mrNo then Result:=mrOk; + if Result=mrYes then begin + Result:=DoSavePackage(ConflictPkg,[]); + end; + if Result<>mrOk then exit; + end; + // replace package PackageGraph.ReplacePackage(ConflictPkg,APackage); end else begin