Closed GoogleCodeExporter closed 9 years ago
Here as attach the corrected Compile.java, the change to Wire.cpp is so easy
that I won't upload it
Original comment by mombelli...@gmail.com
on 29 Apr 2011 at 8:03
Attachments:
[deleted comment]
Here I'm again.
The previous code solved the problem for the libraries folder, but not for the
sketch folder.
To solve i've added 2 method at Base.java:
public static void updateLib(File sketchPath)
and
private static boolean addLib(File folder) throws IOException
This second one, is just public void rebuildImportMenu(JMenu importMenu)
rewritten to look in sketch folder and will not update the menu.
Then in class Sketch.java, method:
public String preprocess(String buildPath, PdePreprocessor preprocessor) throws
RunnerException
add the line
Base.updateLib(folder);
just before
for (String item : preprocessor.getExtraImports()) {
GOOD: you don't need to restart IDE if you add a new libraries in the paths
(core, libraries in sketchbook, sketch folder)
BAD: menu aren't updated
all the file from libraries in sketchbook and sketch folder will loose their
subfolder organization, due to recursive setted as true. This can be avoided
modifying findFilesInFolder() in Compiler.java, this also means if you put two
file with the same name in subfolder and one of it's recursive, the results are
unknown.
As attach the code
Original comment by mombelli...@gmail.com
on 1 May 2011 at 2:35
Attachments:
Are there any issues related to picking up the example files in the libraries
folder?
Original comment by rick.rickanderson
on 11 May 2011 at 7:51
When you say menus aren't updated, what are you looking to see?
Original comment by rick.rickanderson
on 11 May 2011 at 10:01
"Are there any issues related to picking up the example files in the
libraries folder?"
no, example files doesn't have any problem
"When you say menus aren't updated, what are you looking to see?"
When arduino look for recursive libraries, it doesn't add them to the menu
Sketch -> "Import Library". probably this is a secondary problem, as
recursive will be used form advanced user, that should know how use import.
Another problem: in the import you doesn't have to add the relative path,
because in compilation time all recursive library is copied in the same
temporary .pde's folder
Original comment by mombelli...@gmail.com
on 12 May 2011 at 10:27
Recursive compilation will be available in IDE 1.5.2 and will be triggered only
for fat libraries
Original comment by federico...@gmail.com
on 28 Jan 2013 at 10:07
Original comment by federico...@gmail.com
on 6 Feb 2013 at 11:04
Original issue reported on code.google.com by
mombelli...@gmail.com
on 29 Apr 2011 at 7:52