mirror of https://gitlab.com/basile.b/dexed.git
libman, improved register from project.
- libraries made of a single source are more likely to be registered without having to patch the path
- some exception still exist, for example the libraries with several leading empty sub folders (shitty example src/org/eclipse/swt...) 💩
This commit is contained in:
parent
1fb0c2b432
commit
1d769d3583
|
@ -187,8 +187,14 @@ begin
|
|||
try
|
||||
for i := 0 to fProj.Sources.Count-1 do
|
||||
str.Add(fProj.getAbsoluteSourceName(i));
|
||||
root := commonFolder(str);
|
||||
root := ExtractFileDir(root);
|
||||
// single source libs usually have the structure "src/<fname>"
|
||||
if str.Count = 1 then
|
||||
root := ExtractFileDir(str.Strings[0])
|
||||
// multi source libs have the structure "src/LibName/<fname>"/...
|
||||
else begin
|
||||
root := commonFolder(str);
|
||||
root := ExtractFileDir(root);
|
||||
end;
|
||||
if root = '' then
|
||||
begin
|
||||
dlgOkInfo('the static library can not be registered because its source files have no common folder');
|
||||
|
|
Loading…
Reference in New Issue