mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Started fat (multi-architecture) libraries support (work in progress)
This commit is contained in:
parent
01bd432af3
commit
5c0eca5fa7
@ -1038,12 +1038,27 @@ public class Base {
|
||||
continue;
|
||||
}
|
||||
|
||||
subfolder = scanFatLibrary(subfolder);
|
||||
|
||||
// (also replace previously found libs with the same name)
|
||||
res.put(libName, subfolder);
|
||||
if (subfolder != null)
|
||||
res.put(libName, subfolder);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public File scanFatLibrary(File libFolder) {
|
||||
// Fat libraries must have metadata.txt file
|
||||
File propFile = new File(libFolder, "metadata.txt");
|
||||
if (!propFile.exists())
|
||||
return libFolder;
|
||||
// Search for a subfolder for actual architecture, return null if not found
|
||||
File archSubfolder = new File(libFolder, Base.getTargetPlatform().getName());
|
||||
if (!archSubfolder.exists() || !archSubfolder.isDirectory())
|
||||
return null;
|
||||
return archSubfolder;
|
||||
}
|
||||
|
||||
public void onBoardOrPortChange() {
|
||||
// Calculate paths for libraries and examples
|
||||
examplesFolder = getContentFile("examples");
|
||||
|
Loading…
x
Reference in New Issue
Block a user