diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index f0dfe17b2..a117489c9 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1009,9 +1009,6 @@ public abstract class Editor extends JFrame implements RunnerListener { addToolMenuItem(menu, "processing.app.tools.Archiver"); if (Base.isMacOS()) { - if (SerialFixer.isNeeded()) { - addToolMenuItem(menu, "processing.app.tools.SerialFixer"); - } addToolMenuItem(menu, "processing.app.tools.InstallCommander"); } diff --git a/app/src/processing/app/tools/SerialFixer.java b/app/src/processing/app/tools/SerialFixer.java deleted file mode 100644 index 7065b53bc..000000000 --- a/app/src/processing/app/tools/SerialFixer.java +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ - -/* - Part of the Processing project - http://processing.org - - Copyright (c) 2012 The Processing Foundation - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, version 2. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -package processing.app.tools; - -import java.io.File; - -import javax.swing.JOptionPane; - -import processing.app.Base; -import processing.app.Editor; -import processing.core.PApplet; - - -public class SerialFixer implements Tool { - Editor editor; - - - public String getMenuTitle() { - return "Fix the Serial Library"; - } - - - public void init(Editor editor) { - this.editor = editor; - } - - - public void run() { - final String primary = - "Attempt to fix common serial port problems?"; - final String secondary = - "Click “OK” to perform additional installation steps to enable " + - "the Serial library. An administrator password will be required."; - - int result = - JOptionPane.showConfirmDialog(editor, - " " + - "
" + - "" + primary + "" + - "" + secondary + "
", - "Commander", - JOptionPane.OK_CANCEL_OPTION, - JOptionPane.QUESTION_MESSAGE); - - if (result == JOptionPane.OK_OPTION) { - String shellScript = "mkdir -p /var/lock && chmod 777 /var/lock"; - String appleScript = - "do shell script \"" + shellScript + "\" with administrator privileges"; - PApplet.exec(new String[] { "osascript", "-e", appleScript }); - } - editor.statusNotice("Finished."); - } - - - static public boolean isNeeded() { - if (Base.isMacOS()) { - File lockFolder = new File("/var/lock"); - if (!lockFolder.exists() || - !lockFolder.canRead() || - !lockFolder.canWrite() || - !lockFolder.canExecute()) { - return true; - } - } - return false; - } -} \ No newline at end of file diff --git a/build/build.xml b/build/build.xml index 572fdc06a..54a738a77 100755 --- a/build/build.xml +++ b/build/build.xml @@ -1066,7 +1066,7 @@