mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
Merge branch 'master' of https://github.com/processing/processing
This commit is contained in:
@@ -263,11 +263,14 @@ public class JavaBuild {
|
||||
if (sizeInfo != null && sizeInfo.hasSettings()) {
|
||||
// String sizeStatement = sizeInfo.getStatement();
|
||||
for (String stmt : sizeInfo.getStatements()) {
|
||||
// if (sizeStatement != null) {
|
||||
//System.out.format("size stmt is '%s'%n", sizeStatement);
|
||||
// Don't remove newlines (and while you're at it, just keep spaces)
|
||||
// https://github.com/processing/processing/issues/3654
|
||||
stmt = stmt.trim();
|
||||
int index = bigCode.indexOf(stmt);
|
||||
if (index != -1) {
|
||||
bigCode.delete(index, index + stmt.length());
|
||||
System.out.println("code now " + bigCode);
|
||||
} else {
|
||||
// TODO remove once we hit final; but prevent an exception like in
|
||||
// https://github.com/processing/processing/issues/3531
|
||||
@@ -1183,7 +1186,7 @@ public class JavaBuild {
|
||||
pw.close();
|
||||
|
||||
// attempt to code sign if the Xcode tools appear to be installed
|
||||
if (Platform.isMacOS() && new File("/usr/bin/codesign_allocate").exists()) {
|
||||
if (Platform.isMacOS() && isXcodeInstalled()) {
|
||||
if (embedJava) {
|
||||
ProcessHelper.ffs("codesign", "--force", "--sign", "-", jdkPath);
|
||||
}
|
||||
@@ -1331,6 +1334,23 @@ public class JavaBuild {
|
||||
}
|
||||
|
||||
|
||||
static Boolean xcodeInstalled;
|
||||
|
||||
static protected boolean isXcodeInstalled() {
|
||||
if (xcodeInstalled == null) {
|
||||
// http://stackoverflow.com/questions/15371925
|
||||
Process p = PApplet.launch("xcode-select", "-p");
|
||||
int result = -1;
|
||||
try {
|
||||
result = p.waitFor();
|
||||
} catch (InterruptedException e) { }
|
||||
// returns 0 if installed, 2 if not (-1 if exception)
|
||||
xcodeInstalled = (result == 0);
|
||||
}
|
||||
return xcodeInstalled;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run the launch4j build.xml file through ant to create the exe.
|
||||
* Most of this code was lifted from Android mode.
|
||||
|
||||
@@ -136,6 +136,7 @@ public class JavaTextArea extends JEditTextArea {
|
||||
gutterLineColor = mode.getColor("gutter.linecolor"); //, gutterLineColor);
|
||||
gutterPadding = mode.getInteger("gutter.padding");
|
||||
breakpointMarker = mode.getString("breakpoint.marker"); //, breakpointMarker);
|
||||
// breakpointMarker = "\u2666";
|
||||
currentLineMarker = mode.getString("currentline.marker"); //, currentLineMarker);
|
||||
|
||||
// TweakMode code
|
||||
|
||||
Reference in New Issue
Block a user