From 936c1b4a9844239ccd0972dbda8294144cc83a8d Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Fri, 15 May 2015 09:35:53 +0200 Subject: [PATCH] added message to diagnose libman entry registration failure --- src/ce_libmaneditor.pas | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ce_libmaneditor.pas b/src/ce_libmaneditor.pas index 6329e8d9..3b39941d 100644 --- a/src/ce_libmaneditor.pas +++ b/src/ce_libmaneditor.pas @@ -160,10 +160,19 @@ procedure TCELibManEditorWidget.btnRegClick(Sender: TObject); var str: TStringList; root: string; + lalias: string; i: integer; begin if fProj = nil then exit; // + lalias := ExtractFileNameOnly(fProj.Filename); + if List.Items.FindCaption(0, lalias, false, false, false) <> nil then + begin + dlgOkInfo(format('a library item with the alias "%s" already exists, delete it before trying again.', + [lalias])); + exit; + end; + // str := TStringList.Create; try for i := 0 to fProj.Sources.Count-1 do @@ -171,7 +180,10 @@ begin root := commonFolder(str); root := ExtractFileDir(root); if root = '' then + begin + dlgOkInfo('the static library can not be registered because its sources files has not a common folder'); exit; + end; // with List.Items.Add do begin @@ -181,6 +193,8 @@ begin else SubItems.add(fProj.outputFilename); SubItems.add(root); + if not FileExists(SubItems[0]) then + dlgOkInfo('the library file does not exist, maybe the project not been already compiled ?'); Selected:= true; end; SetFocus;