Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions app/src/processing/app/tools/InstallCommander.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@

package processing.app.tools;

import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintWriter;

import javax.swing.JOptionPane;

import processing.app.Base;
import processing.app.Language;
import processing.app.Messages;
Expand All @@ -36,6 +29,12 @@
import processing.core.PApplet;
import processing.data.StringList;

import javax.swing.*;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintWriter;


public class InstallCommander implements Tool {
Base base;
Expand Down Expand Up @@ -92,7 +91,7 @@ public void run() {
var appBinary = (resourcesDir
.split("\\.app")[0] + ".app/Contents/MacOS/Processing")
.replaceAll(" ", "\\\\ ");
writer.print(appBinary + " cli $@");
writer.print(appBinary + " $@");

} else {
// Ant based distributable
Expand Down Expand Up @@ -130,7 +129,7 @@ public void run() {
// Moving to /usr/local/bin instead of /usr/bin for compatibility
// with OS X 10.11 and its "System Integrity Protection"
// https://github.com/processing/processing/issues/3497
String targetPath = "/usr/local/bin/processing-java";
String targetPath = "/usr/local/bin/processing";
// Remove the old version in case it exists
// https://github.com/processing/processing/issues/3786
String oldPath = "/usr/bin/processing-java";
Expand All @@ -142,11 +141,11 @@ public void run() {
PApplet.exec(new String[] { "osascript", "-e", appleScript });

} else if (result == JOptionPane.NO_OPTION) {
File targetFile = new File(System.getProperty("user.home"), "processing-java");
File targetFile = new File(System.getProperty("user.home"), "processing");
String targetPath = targetFile.getAbsolutePath();
if (targetFile.exists()) {
Messages.showWarning("File Already Exists",
"The processing-java program already exists at:\n" +
"The processing program already exists at:\n" +
targetPath + "\n" +
"Please remove it and try again.");
} else {
Expand Down
Loading