diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 4d7e8dd1c..628056d52 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -84,6 +84,8 @@ public class Base { // (both those in the p5/libs folder and those with lib subfolders // found in the sketchbook) static public String librariesClassPath; + + static HashMap platformsTable; // Location for untitled items static File untitledFolder; @@ -275,6 +277,9 @@ public class Base { defaultFolder.mkdirs(); } } + + loadHardware(getHardwareFolder()); + loadHardware(getSketchbookHardwareFolder()); // Check if there were previously opened sketches to be restored boolean opened = restoreSketches(); @@ -985,6 +990,31 @@ public class Base { e.printStackTrace(); } } + + + public void rebuildBoardsMenu(JMenu menu) { + //System.out.println("rebuilding boards menu"); + try { + menu.removeAll(); + ButtonGroup group = new ButtonGroup(); + for (String board : Preferences.getSubKeys("boards")) { + JMenu item = + new JRadioButtonMenuItem( + new AbstractAction(Preferences.get("boards", "board", "name")) { + { putValue("board", board); } + public void actionPerformed(ActionEvent actionevent) { + //System.out.println("Switching to " + board); + Preferences.set("board", getValue("board")); + } + })); + if (board.equals(Preferences.get("board"))) item.setSelected(true); + group.add(item); + menu.add(item); + } + } catch (IOException e) { + e.printStackTrace(); + } + } /** @@ -1138,7 +1168,8 @@ public class Base { // String packages[] = // Compiler.packageListFromClassPath(libraryClassPath); libraries.add(subfolder); - String packages[] = Compiler.headerListFromIncludePath(subfolder.getAbsolutePath()); + String packages[] = + Compiler.headerListFromIncludePath(subfolder.getAbsolutePath()); for (String pkg : packages) { importToLibraryTable.put(pkg, subfolder); } @@ -1162,6 +1193,42 @@ public class Base { } return ifound; } + + + protected boolean loadHardware(File folder) { + if (!folder.isDirectory()) return false; + + String list[] = folder.list(new FilenameFilter() { + public boolean accept(File dir, String name) { + // skip .DS_Store files, .svn folders, etc + if (name.charAt(0) == '.') return false; + if (name.equals("CVS")) return false; + return (new File(dir, name).isDirectory()); + } + }); + // if a bad folder or something like that, this might come back null + if (list == null) return false; + + // alphabetize list, since it's not always alpha order + // replaced hella slow bubble sort with this feller for 0093 + Arrays.sort(list, String.CASE_INSENSITIVE_ORDER); + + for (String platform : list) { + File subfolder = new File(folder, platform); + + File boardsFile = new File(subfolder, "boards.txt"); + if (boardsFile.exists()) { + Preferences.load(new FileInputStream(boardsFile), "boards"); + } + + File programmersFile = new File(subfolder, "programmers.txt"); + if (programmersFile.exists()) { + Preferences.load(new FileInputStream(programmersFile), "programmers"); + } + + platformsTable.put(platform, subfolder); + } + } // ................................................................. diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 193444385..baff66111 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1842,10 +1842,7 @@ public class Editor extends JFrame implements RunnerListener { SwingUtilities.invokeLater(new Runnable() { public void run() { try { - sketch.compile(new Target( - Base.getHardwarePath() + File.separator + "cores", - Preferences.get("boards." + Preferences.get("board") + ".build.core")), - verbose); + sketch.compile(verbose); statusNotice("Done compiling."); } catch (RunnerException e) { //statusError("Error compiling..."); @@ -2257,10 +2254,7 @@ public class Editor extends JFrame implements RunnerListener { uploading = true; - boolean success = sketch.exportApplet(new Target( - Base.getHardwarePath() + File.separator + "cores", - Preferences.get("boards." + Preferences.get("board") + ".build.core")), - verbose); + boolean success = sketch.exportApplet(verbose); if (success) { statusNotice("Done uploading."); } else { diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index 1bb505373..cb1ba9975 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -198,25 +198,6 @@ public class Preferences { " and restart Arduino.", ex); } } - } - - try { - load(new FileInputStream(new File(Base.getHardwareFolder(), "boards.txt")), - "boards"); - } catch (Exception ex) { - Base.showError("Error reading board definitions", - "Error reading the board definitions file (" + - new File(Base.getHardwareFolder(), "boards.txt").getAbsolutePath() + "). " + - "Please re-download or re-unzip Arduino.\n", ex); - } - - try { - load(new FileInputStream(new File(Base.getHardwareFolder(), "programmers.txt")), - "programmers"); - } catch (Exception ex) { - Base.showError("Error reading programmers definitions", - "Error reading the programmers definitions file. " + - "Please re-download or re-unzip Arduino.\n", ex); } } @@ -570,9 +551,8 @@ public class Preferences { } static protected void load(InputStream input, String prefix) throws IOException { - LinkedHashMap table = new LinkedHashMap(); - prefixes.put(prefix, table); - load(input, table); + if (!prefixes.containsKey(prefix)) prefixes.put(prefix, new LinkedHashMap()); + load(input, (Map) prefixes.get(prefix)); } static protected void load(InputStream input, Map table) throws IOException { @@ -628,6 +608,11 @@ public class Preferences { //static public String get(String attribute) { //return get(attribute, null); //} + + static public String get(String prefix, String selector, String suffix) { + if (get(selector) == null) return null; + return get(prefix + "." + get(selector) + "." + suffix); + } static public String get(String attribute /*, String defaultValue */) { // if the attribute starts with a prefix used by one of our subsidiary diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 042680018..a27ba72ed 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -27,7 +27,6 @@ import processing.app.debug.AvrdudeUploader; import processing.app.debug.Compiler; import processing.app.debug.RunnerException; import processing.app.debug.Sizer; -import processing.app.debug.Target; import processing.app.debug.Uploader; import processing.app.preproc.*; import processing.core.*; @@ -1142,7 +1141,7 @@ public class Sketch { * X. afterwards, some of these steps need a cleanup function * */ - protected String compile(Target target, boolean verbose) + protected String compile(boolean verbose) throws RunnerException { String name; @@ -1177,7 +1176,7 @@ public class Sketch { cleanup(); // handle preprocessing the main file's code - name = build(tempBuildFolder.getAbsolutePath(), target, verbose); + name = build(tempBuildFolder.getAbsolutePath(), verbose); size(tempBuildFolder.getAbsolutePath(), name); return name; @@ -1199,11 +1198,11 @@ public class Sketch { * @param buildPath Location to copy all the .java files * @return null if compilation failed, main class name if not */ - public String preprocess(String buildPath, Target target) throws RunnerException { - return preprocess(buildPath, new PdePreprocessor(), target); + public String preprocess(String buildPath) throws RunnerException { + return preprocess(buildPath, new PdePreprocessor()); } - public String preprocess(String buildPath, PdePreprocessor preprocessor, Target target) throws RunnerException { + public String preprocess(String buildPath, PdePreprocessor preprocessor) throws RunnerException { // make sure the user didn't hide the sketch folder ensureExistence(); @@ -1279,8 +1278,7 @@ public class Sketch { headerOffset = preprocessor.writePrefix(bigCode.toString(), buildPath, name, - codeFolderPackages, - target); + codeFolderPackages); } catch (FileNotFoundException fnfe) { fnfe.printStackTrace(); String msg = "Build folder disappeared or could not be written"; @@ -1378,31 +1376,31 @@ public class Sketch { * * @return null if compilation failed, main class name if not */ - public String build(String buildPath, Target target, boolean verbose) + public String build(String buildPath, boolean verbose) throws RunnerException { // run the preprocessor - String primaryClassName = preprocess(buildPath, target); + String primaryClassName = preprocess(buildPath); // compile the program. errors will happen as a RunnerException // that will bubble up to whomever called build(). Compiler compiler = new Compiler(); - if (compiler.compile(this, buildPath, primaryClassName, target, verbose)) { + if (compiler.compile(this, buildPath, primaryClassName, verbose)) { return primaryClassName; } return null; } - protected boolean exportApplet(Target target, boolean verbose) throws Exception { - return exportApplet(new File(folder, "applet").getAbsolutePath(), target, verbose); + protected boolean exportApplet(boolean verbose) throws Exception { + return exportApplet(new File(folder, "applet").getAbsolutePath(), verbose); } /** * Handle export to applet. */ - public boolean exportApplet(String appletPath, Target target, boolean verbose) + public boolean exportApplet(String appletPath, boolean verbose) throws RunnerException, IOException { // Make sure the user didn't hide the sketch folder @@ -1426,7 +1424,7 @@ public class Sketch { appletFolder.mkdirs(); // build the sketch - String foundName = build(appletFolder.getPath(), target, false); + String foundName = build(appletFolder.getPath(), false); // (already reported) error during export, exit this function if (foundName == null) return false; diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 198fd9847..bd69c9575 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -55,14 +55,12 @@ public class Compiler implements MessageConsumer { * @param sketch Sketch object to be compiled. * @param buildPath Where the temporary files live and will be built from. * @param primaryClassName the name of the combined sketch file w/ extension - * @param target the target (core) to build against * @return true if successful. * @throws RunnerException Only if there's a problem. Only then. */ public boolean compile(Sketch sketch, String buildPath, String primaryClassName, - Target target, boolean verbose) throws RunnerException { this.sketch = sketch; this.buildPath = buildPath; @@ -73,6 +71,7 @@ public class Compiler implements MessageConsumer { MessageStream pms = new MessageStream(this); String avrBasePath = Base.getAvrBasePath(); + String corePath = Preferences.get("boards", "board", "build.core"); List objectFiles = new ArrayList(); diff --git a/hardware/arduino/libraries/EEPROM/EEPROM.cpp b/libraries/EEPROM/EEPROM.cpp similarity index 100% rename from hardware/arduino/libraries/EEPROM/EEPROM.cpp rename to libraries/EEPROM/EEPROM.cpp diff --git a/hardware/arduino/libraries/EEPROM/EEPROM.h b/libraries/EEPROM/EEPROM.h similarity index 100% rename from hardware/arduino/libraries/EEPROM/EEPROM.h rename to libraries/EEPROM/EEPROM.h diff --git a/hardware/arduino/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde similarity index 100% rename from hardware/arduino/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde rename to libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde diff --git a/hardware/arduino/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde b/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde similarity index 100% rename from hardware/arduino/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde rename to libraries/EEPROM/examples/eeprom_read/eeprom_read.pde diff --git a/hardware/arduino/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde b/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde similarity index 100% rename from hardware/arduino/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde rename to libraries/EEPROM/examples/eeprom_write/eeprom_write.pde diff --git a/hardware/arduino/libraries/EEPROM/keywords.txt b/libraries/EEPROM/keywords.txt similarity index 100% rename from hardware/arduino/libraries/EEPROM/keywords.txt rename to libraries/EEPROM/keywords.txt diff --git a/hardware/arduino/libraries/Ethernet/Client.cpp b/libraries/Ethernet/Client.cpp similarity index 100% rename from hardware/arduino/libraries/Ethernet/Client.cpp rename to libraries/Ethernet/Client.cpp diff --git a/hardware/arduino/libraries/Ethernet/Client.h b/libraries/Ethernet/Client.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/Client.h rename to libraries/Ethernet/Client.h diff --git a/hardware/arduino/libraries/Ethernet/Ethernet.cpp b/libraries/Ethernet/Ethernet.cpp similarity index 100% rename from hardware/arduino/libraries/Ethernet/Ethernet.cpp rename to libraries/Ethernet/Ethernet.cpp diff --git a/hardware/arduino/libraries/Ethernet/Ethernet.h b/libraries/Ethernet/Ethernet.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/Ethernet.h rename to libraries/Ethernet/Ethernet.h diff --git a/hardware/arduino/libraries/Ethernet/Server.cpp b/libraries/Ethernet/Server.cpp similarity index 100% rename from hardware/arduino/libraries/Ethernet/Server.cpp rename to libraries/Ethernet/Server.cpp diff --git a/hardware/arduino/libraries/Ethernet/Server.h b/libraries/Ethernet/Server.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/Server.h rename to libraries/Ethernet/Server.h diff --git a/hardware/arduino/libraries/Ethernet/examples/ChatServer/ChatServer.pde b/libraries/Ethernet/examples/ChatServer/ChatServer.pde similarity index 100% rename from hardware/arduino/libraries/Ethernet/examples/ChatServer/ChatServer.pde rename to libraries/Ethernet/examples/ChatServer/ChatServer.pde diff --git a/hardware/arduino/libraries/Ethernet/examples/WebClient/WebClient.pde b/libraries/Ethernet/examples/WebClient/WebClient.pde similarity index 100% rename from hardware/arduino/libraries/Ethernet/examples/WebClient/WebClient.pde rename to libraries/Ethernet/examples/WebClient/WebClient.pde diff --git a/hardware/arduino/libraries/Ethernet/examples/WebServer/WebServer.pde b/libraries/Ethernet/examples/WebServer/WebServer.pde similarity index 100% rename from hardware/arduino/libraries/Ethernet/examples/WebServer/WebServer.pde rename to libraries/Ethernet/examples/WebServer/WebServer.pde diff --git a/hardware/arduino/libraries/Ethernet/keywords.txt b/libraries/Ethernet/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Ethernet/keywords.txt rename to libraries/Ethernet/keywords.txt diff --git a/hardware/arduino/libraries/Ethernet/utility/socket.c b/libraries/Ethernet/utility/socket.c similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/socket.c rename to libraries/Ethernet/utility/socket.c diff --git a/hardware/arduino/libraries/Ethernet/utility/socket.h b/libraries/Ethernet/utility/socket.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/socket.h rename to libraries/Ethernet/utility/socket.h diff --git a/hardware/arduino/libraries/Ethernet/utility/spi.h b/libraries/Ethernet/utility/spi.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/spi.h rename to libraries/Ethernet/utility/spi.h diff --git a/hardware/arduino/libraries/Ethernet/utility/types.h b/libraries/Ethernet/utility/types.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/types.h rename to libraries/Ethernet/utility/types.h diff --git a/hardware/arduino/libraries/Ethernet/utility/w5100.c b/libraries/Ethernet/utility/w5100.c similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/w5100.c rename to libraries/Ethernet/utility/w5100.c diff --git a/hardware/arduino/libraries/Ethernet/utility/w5100.h b/libraries/Ethernet/utility/w5100.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/w5100.h rename to libraries/Ethernet/utility/w5100.h diff --git a/hardware/arduino/libraries/Firmata/Firmata.cpp b/libraries/Firmata/Firmata.cpp similarity index 100% rename from hardware/arduino/libraries/Firmata/Firmata.cpp rename to libraries/Firmata/Firmata.cpp diff --git a/hardware/arduino/libraries/Firmata/Firmata.h b/libraries/Firmata/Firmata.h similarity index 100% rename from hardware/arduino/libraries/Firmata/Firmata.h rename to libraries/Firmata/Firmata.h diff --git a/hardware/arduino/libraries/Firmata/LICENSE.txt b/libraries/Firmata/LICENSE.txt similarity index 100% rename from hardware/arduino/libraries/Firmata/LICENSE.txt rename to libraries/Firmata/LICENSE.txt diff --git a/hardware/arduino/libraries/Firmata/TODO.txt b/libraries/Firmata/TODO.txt similarity index 100% rename from hardware/arduino/libraries/Firmata/TODO.txt rename to libraries/Firmata/TODO.txt diff --git a/hardware/arduino/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde b/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde rename to libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/AnalogFirmata/Makefile b/libraries/Firmata/examples/AnalogFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/AnalogFirmata/Makefile rename to libraries/Firmata/examples/AnalogFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/EchoString/EchoString.pde b/libraries/Firmata/examples/EchoString/EchoString.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/EchoString/EchoString.pde rename to libraries/Firmata/examples/EchoString/EchoString.pde diff --git a/hardware/arduino/libraries/Firmata/examples/EchoString/Makefile b/libraries/Firmata/examples/EchoString/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/EchoString/Makefile rename to libraries/Firmata/examples/EchoString/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde b/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde rename to libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/ServoFirmata/Makefile b/libraries/Firmata/examples/ServoFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/ServoFirmata/Makefile rename to libraries/Firmata/examples/ServoFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde b/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde rename to libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile b/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile rename to libraries/Firmata/examples/SimpleAnalogFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde b/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde rename to libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile b/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile rename to libraries/Firmata/examples/SimpleDigitalFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde b/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde rename to libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/StandardFirmata/LICENSE.txt b/libraries/Firmata/examples/StandardFirmata/LICENSE.txt similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/StandardFirmata/LICENSE.txt rename to libraries/Firmata/examples/StandardFirmata/LICENSE.txt diff --git a/hardware/arduino/libraries/Firmata/examples/StandardFirmata/Makefile b/libraries/Firmata/examples/StandardFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/StandardFirmata/Makefile rename to libraries/Firmata/examples/StandardFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde b/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde rename to libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/keywords.txt b/libraries/Firmata/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Firmata/keywords.txt rename to libraries/Firmata/keywords.txt diff --git a/hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.cpp b/libraries/LiquidCrystal/LiquidCrystal.cpp similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.cpp rename to libraries/LiquidCrystal/LiquidCrystal.cpp diff --git a/hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.h b/libraries/LiquidCrystal/LiquidCrystal.h similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.h rename to libraries/LiquidCrystal/LiquidCrystal.h diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde b/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde rename to libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Blink/Blink.pde b/libraries/LiquidCrystal/examples/Blink/Blink.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Blink/Blink.pde rename to libraries/LiquidCrystal/examples/Blink/Blink.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Cursor/Cursor.pde b/libraries/LiquidCrystal/examples/Cursor/Cursor.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Cursor/Cursor.pde rename to libraries/LiquidCrystal/examples/Cursor/Cursor.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Display/Display.pde b/libraries/LiquidCrystal/examples/Display/Display.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Display/Display.pde rename to libraries/LiquidCrystal/examples/Display/Display.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde b/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde rename to libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Scroll/Scroll.pde b/libraries/LiquidCrystal/examples/Scroll/Scroll.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Scroll/Scroll.pde rename to libraries/LiquidCrystal/examples/Scroll/Scroll.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde b/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde rename to libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde b/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde rename to libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/setCursor/setCursor.pde b/libraries/LiquidCrystal/examples/setCursor/setCursor.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/setCursor/setCursor.pde rename to libraries/LiquidCrystal/examples/setCursor/setCursor.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/keywords.txt b/libraries/LiquidCrystal/keywords.txt similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/keywords.txt rename to libraries/LiquidCrystal/keywords.txt diff --git a/hardware/arduino/libraries/Matrix/Matrix.cpp b/libraries/Matrix/Matrix.cpp similarity index 100% rename from hardware/arduino/libraries/Matrix/Matrix.cpp rename to libraries/Matrix/Matrix.cpp diff --git a/hardware/arduino/libraries/Matrix/Matrix.h b/libraries/Matrix/Matrix.h similarity index 100% rename from hardware/arduino/libraries/Matrix/Matrix.h rename to libraries/Matrix/Matrix.h diff --git a/hardware/arduino/libraries/Matrix/examples/hello_matrix/hello_matrix.pde b/libraries/Matrix/examples/hello_matrix/hello_matrix.pde similarity index 100% rename from hardware/arduino/libraries/Matrix/examples/hello_matrix/hello_matrix.pde rename to libraries/Matrix/examples/hello_matrix/hello_matrix.pde diff --git a/hardware/arduino/libraries/Matrix/examples/sprite_animation/sprite_animation.pde b/libraries/Matrix/examples/sprite_animation/sprite_animation.pde similarity index 100% rename from hardware/arduino/libraries/Matrix/examples/sprite_animation/sprite_animation.pde rename to libraries/Matrix/examples/sprite_animation/sprite_animation.pde diff --git a/hardware/arduino/libraries/Matrix/keywords.txt b/libraries/Matrix/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Matrix/keywords.txt rename to libraries/Matrix/keywords.txt diff --git a/hardware/arduino/libraries/Servo/Servo.cpp b/libraries/Servo/Servo.cpp similarity index 100% rename from hardware/arduino/libraries/Servo/Servo.cpp rename to libraries/Servo/Servo.cpp diff --git a/hardware/arduino/libraries/Servo/Servo.h b/libraries/Servo/Servo.h similarity index 100% rename from hardware/arduino/libraries/Servo/Servo.h rename to libraries/Servo/Servo.h diff --git a/hardware/arduino/libraries/Servo/examples/Knob/Knob.pde b/libraries/Servo/examples/Knob/Knob.pde similarity index 100% rename from hardware/arduino/libraries/Servo/examples/Knob/Knob.pde rename to libraries/Servo/examples/Knob/Knob.pde diff --git a/hardware/arduino/libraries/Servo/examples/Sweep/Sweep.pde b/libraries/Servo/examples/Sweep/Sweep.pde similarity index 100% rename from hardware/arduino/libraries/Servo/examples/Sweep/Sweep.pde rename to libraries/Servo/examples/Sweep/Sweep.pde diff --git a/hardware/arduino/libraries/Servo/keywords.txt b/libraries/Servo/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Servo/keywords.txt rename to libraries/Servo/keywords.txt diff --git a/hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp b/libraries/SoftwareSerial/SoftwareSerial.cpp similarity index 100% rename from hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp rename to libraries/SoftwareSerial/SoftwareSerial.cpp diff --git a/hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.h b/libraries/SoftwareSerial/SoftwareSerial.h similarity index 100% rename from hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.h rename to libraries/SoftwareSerial/SoftwareSerial.h diff --git a/hardware/arduino/libraries/SoftwareSerial/keywords.txt b/libraries/SoftwareSerial/keywords.txt similarity index 100% rename from hardware/arduino/libraries/SoftwareSerial/keywords.txt rename to libraries/SoftwareSerial/keywords.txt diff --git a/hardware/arduino/libraries/Sprite/Sprite.cpp b/libraries/Sprite/Sprite.cpp similarity index 100% rename from hardware/arduino/libraries/Sprite/Sprite.cpp rename to libraries/Sprite/Sprite.cpp diff --git a/hardware/arduino/libraries/Sprite/Sprite.h b/libraries/Sprite/Sprite.h similarity index 100% rename from hardware/arduino/libraries/Sprite/Sprite.h rename to libraries/Sprite/Sprite.h diff --git a/hardware/arduino/libraries/Sprite/binary.h b/libraries/Sprite/binary.h similarity index 100% rename from hardware/arduino/libraries/Sprite/binary.h rename to libraries/Sprite/binary.h diff --git a/hardware/arduino/libraries/Sprite/keywords.txt b/libraries/Sprite/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Sprite/keywords.txt rename to libraries/Sprite/keywords.txt diff --git a/hardware/arduino/libraries/Stepper/Stepper.cpp b/libraries/Stepper/Stepper.cpp similarity index 100% rename from hardware/arduino/libraries/Stepper/Stepper.cpp rename to libraries/Stepper/Stepper.cpp diff --git a/hardware/arduino/libraries/Stepper/Stepper.h b/libraries/Stepper/Stepper.h similarity index 100% rename from hardware/arduino/libraries/Stepper/Stepper.h rename to libraries/Stepper/Stepper.h diff --git a/hardware/arduino/libraries/Stepper/examples/MotorKnob/MotorKnob.pde b/libraries/Stepper/examples/MotorKnob/MotorKnob.pde similarity index 100% rename from hardware/arduino/libraries/Stepper/examples/MotorKnob/MotorKnob.pde rename to libraries/Stepper/examples/MotorKnob/MotorKnob.pde diff --git a/hardware/arduino/libraries/Stepper/keywords.txt b/libraries/Stepper/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Stepper/keywords.txt rename to libraries/Stepper/keywords.txt diff --git a/hardware/arduino/libraries/Wire/Wire.cpp b/libraries/Wire/Wire.cpp similarity index 100% rename from hardware/arduino/libraries/Wire/Wire.cpp rename to libraries/Wire/Wire.cpp diff --git a/hardware/arduino/libraries/Wire/Wire.h b/libraries/Wire/Wire.h similarity index 100% rename from hardware/arduino/libraries/Wire/Wire.h rename to libraries/Wire/Wire.h diff --git a/hardware/arduino/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde b/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde rename to libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde diff --git a/hardware/arduino/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde b/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde rename to libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde diff --git a/hardware/arduino/libraries/Wire/examples/master_reader/master_reader.pde b/libraries/Wire/examples/master_reader/master_reader.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/master_reader/master_reader.pde rename to libraries/Wire/examples/master_reader/master_reader.pde diff --git a/hardware/arduino/libraries/Wire/examples/master_writer/master_writer.pde b/libraries/Wire/examples/master_writer/master_writer.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/master_writer/master_writer.pde rename to libraries/Wire/examples/master_writer/master_writer.pde diff --git a/hardware/arduino/libraries/Wire/examples/slave_receiver/slave_receiver.pde b/libraries/Wire/examples/slave_receiver/slave_receiver.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/slave_receiver/slave_receiver.pde rename to libraries/Wire/examples/slave_receiver/slave_receiver.pde diff --git a/hardware/arduino/libraries/Wire/examples/slave_sender/slave_sender.pde b/libraries/Wire/examples/slave_sender/slave_sender.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/slave_sender/slave_sender.pde rename to libraries/Wire/examples/slave_sender/slave_sender.pde diff --git a/hardware/arduino/libraries/Wire/keywords.txt b/libraries/Wire/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Wire/keywords.txt rename to libraries/Wire/keywords.txt diff --git a/hardware/arduino/libraries/Wire/utility/twi.c b/libraries/Wire/utility/twi.c similarity index 100% rename from hardware/arduino/libraries/Wire/utility/twi.c rename to libraries/Wire/utility/twi.c diff --git a/hardware/arduino/libraries/Wire/utility/twi.h b/libraries/Wire/utility/twi.h similarity index 100% rename from hardware/arduino/libraries/Wire/utility/twi.h rename to libraries/Wire/utility/twi.h