mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-26 20:54:22 +01:00
Re-enabled 'Fat' library detection (with a better method)
This commit is contained in:
parent
8cc080fbd9
commit
e7193ac42c
@ -1067,8 +1067,6 @@ public class Base {
|
||||
}
|
||||
|
||||
/**
|
||||
* <b>XXX FAT lib detection temporary disabled: compatibility issues arised.</b><br/>
|
||||
* <br />
|
||||
* Scans inside a "FAT" (multi-platform) library folder to see if it contains
|
||||
* a version suitable for the actual selected architecture. If a suitable
|
||||
* version is found the folder containing that version is returned, otherwise
|
||||
@ -1081,25 +1079,10 @@ public class Base {
|
||||
* @return
|
||||
*/
|
||||
public File scanFatLibrary(File libFolder) {
|
||||
// A library is considered "fat" if there are folders besides
|
||||
// examples and utility
|
||||
boolean fat = false;
|
||||
String[] folders = libFolder.list(new OnlyDirs());
|
||||
for (String folder : folders) {
|
||||
if (folder.equalsIgnoreCase("examples"))
|
||||
continue;
|
||||
if (folder.equalsIgnoreCase("utility"))
|
||||
continue;
|
||||
fat = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// XXX: Temporary override "FAT" (multiplatform) library detection.
|
||||
// Compatibility issues arised: many library uses additional folders
|
||||
// https://code.google.com/p/arduino/issues/detail?id=1079
|
||||
fat = false;
|
||||
|
||||
if (!fat)
|
||||
// A library is considered "fat" if it contains a file called
|
||||
// "library.properties"
|
||||
File libraryPropFile = new File(libFolder, "library.properties");
|
||||
if (!libraryPropFile.exists() || !libraryPropFile.isFile())
|
||||
return libFolder;
|
||||
|
||||
// Search for a subfolder for actual architecture, return null if not found
|
||||
|
Loading…
x
Reference in New Issue
Block a user