mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
cleaning up the Export to Application dialog
This commit is contained in:
@@ -36,6 +36,11 @@ As with all releases, we'll do everything possible to avoid breaking API. Howeve
|
||||
* Processing 4 will be 64-bit only. This is the overwhelming majority of users, and we don't have the necessary help to maintain and support 32-bit systems.
|
||||
|
||||
|
||||
## Translation Updates
|
||||
|
||||
* `export.embed_java.for` changed to `export.include_java` which also embeds a string for the platform for better localization support.
|
||||
|
||||
|
||||
## Building the Code
|
||||
|
||||
We'll eventually create a new wiki page with the build instructions, but for the time being, the instructions are:
|
||||
|
||||
@@ -242,7 +242,7 @@ export.notice.exporting.cancel = Export to Application canceled.
|
||||
export.tooltip.macosx = macOS export is only available on macOS
|
||||
export.full_screen = Full Screen
|
||||
export.embed_java = Embed Java
|
||||
export.embed_java.for = Embed Java for
|
||||
export.include_java = Include Java in the %s application
|
||||
export.code_signing = Code Signing
|
||||
export.messages.is_read_only = Sketch is Read-Only
|
||||
export.messages.is_read_only.description = Some files are marked "read-only", so you will\nneed to re-save the sketch in another location,\nand try again.
|
||||
|
||||
@@ -646,13 +646,13 @@ public class JavaEditor extends Editor {
|
||||
final JButton cancelButton = new JButton(Language.text("prompt.cancel"));
|
||||
|
||||
final JCheckBox windowsButton = new JCheckBox("Windows");
|
||||
final JCheckBox macosxButton = new JCheckBox("Mac OS X");
|
||||
final JCheckBox macosButton = new JCheckBox("Mac OS X");
|
||||
final JCheckBox linuxButton = new JCheckBox("Linux");
|
||||
|
||||
|
||||
protected void updateExportButton() {
|
||||
exportButton.setEnabled(windowsButton.isSelected() ||
|
||||
macosxButton.isSelected() ||
|
||||
macosButton.isSelected() ||
|
||||
linuxButton.isSelected());
|
||||
}
|
||||
|
||||
@@ -699,16 +699,16 @@ public class JavaEditor extends Editor {
|
||||
// Make sure they don't have a previous 'true' setting for this
|
||||
Preferences.setBoolean(EXPORT_MACOSX, false);
|
||||
}
|
||||
macosxButton.setSelected(Preferences.getBoolean(EXPORT_MACOSX));
|
||||
macosxButton.addItemListener(new ItemListener() {
|
||||
macosButton.setSelected(Preferences.getBoolean(EXPORT_MACOSX));
|
||||
macosButton.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
Preferences.setBoolean(EXPORT_MACOSX, macosxButton.isSelected());
|
||||
Preferences.setBoolean(EXPORT_MACOSX, macosButton.isSelected());
|
||||
updateExportButton();
|
||||
}
|
||||
});
|
||||
if (!Platform.isMacOS()) {
|
||||
macosxButton.setEnabled(false);
|
||||
macosxButton.setToolTipText(Language.text("export.tooltip.macosx"));
|
||||
macosButton.setEnabled(false);
|
||||
macosButton.setToolTipText(Language.text("export.tooltip.macosx"));
|
||||
}
|
||||
|
||||
linuxButton.setSelected(Preferences.getBoolean(EXPORT_LINUX));
|
||||
@@ -725,7 +725,7 @@ public class JavaEditor extends Editor {
|
||||
//platformPanel.setLayout(new BoxLayout(platformPanel, BoxLayout.X_AXIS));
|
||||
platformPanel.add(windowsButton);
|
||||
platformPanel.add(Box.createHorizontalStrut(6));
|
||||
platformPanel.add(macosxButton);
|
||||
platformPanel.add(macosButton);
|
||||
platformPanel.add(Box.createHorizontalStrut(6));
|
||||
platformPanel.add(linuxButton);
|
||||
platformPanel.setBorder(new TitledBorder(Language.text("export.platforms")));
|
||||
@@ -824,39 +824,42 @@ public class JavaEditor extends Editor {
|
||||
|
||||
String platformName = null;
|
||||
if (Platform.isMacOS()) {
|
||||
platformName = "Mac OS X";
|
||||
platformName = "macOS";
|
||||
} else if (Platform.isWindows()) {
|
||||
platformName = "Windows (" + Platform.getNativeBits() + "-bit)";
|
||||
} else if (Platform.isLinux()) {
|
||||
platformName = "Linux (" + Platform.getNativeBits() + "-bit)";
|
||||
}
|
||||
|
||||
boolean embed = Preferences.getBoolean("export.application.embed_java");
|
||||
final String embedWarning =
|
||||
"<html><div width=\"" + divWidth + "\"><font size=\"2\">" +
|
||||
// "<html><body><font size=2>" +
|
||||
final boolean embed =
|
||||
Preferences.getBoolean("export.application.embed_java");
|
||||
final String JDK_DOWNLOAD = "https://adoptopenjdk.net/";
|
||||
final String warning1 =
|
||||
"<html><div width=\"" + divWidth + "\"><font size=\"2\">";
|
||||
final String warning2a =
|
||||
"Embedding Java will make the " + platformName + " application " +
|
||||
"larger, but it will be far more likely to work. " +
|
||||
"Users on other platforms will need to " +
|
||||
"<a href=\"\">install Java " + PApplet.javaPlatform + "</a>.";
|
||||
final String nopeWarning =
|
||||
"<html><div width=\"" + divWidth + "\"><font size=\"2\">" +
|
||||
// "<html><body><font size=2>" +
|
||||
"Users on all platforms will have to install the latest " +
|
||||
"version of Java " + PApplet.javaPlatform +
|
||||
" from <a href=\"\">http://java.com/download</a>. " +
|
||||
"<br/> ";
|
||||
//"from <a href=\"http://java.com/download\">java.com/download</a>.";
|
||||
"Users on other platforms will need to ";
|
||||
final String warning2b =
|
||||
"Users will need to ";
|
||||
final String warning3 =
|
||||
"<a href=\"" + JDK_DOWNLOAD + "\">install OpenJDK " +
|
||||
PApplet.javaPlatform + "</a>.";
|
||||
// "<br/> ";
|
||||
final String embedWarning = warning1 + warning2a + warning3;
|
||||
final String nopeWarning = warning1 + warning2b + warning3;
|
||||
|
||||
final JLabel warningLabel = new JLabel(embed ? embedWarning : nopeWarning);
|
||||
warningLabel.addMouseListener(new MouseAdapter() {
|
||||
public void mousePressed(MouseEvent event) {
|
||||
Platform.openURL("http://java.com/download");
|
||||
Platform.openURL(JDK_DOWNLOAD);
|
||||
}
|
||||
});
|
||||
warningLabel.setBorder(new EmptyBorder(3, 13 + indent, 3, 13));
|
||||
|
||||
final JCheckBox embedJavaButton =
|
||||
new JCheckBox(Language.text("export.embed_java.for") + " " + platformName);
|
||||
//new JCheckBox(Language.text("export.embed_java.for") + " " + platformName);
|
||||
new JCheckBox(Language.interpolate("export.include_java", platformName));
|
||||
embedJavaButton.setSelected(embed);
|
||||
embedJavaButton.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
@@ -885,9 +888,10 @@ public class JavaEditor extends Editor {
|
||||
|
||||
// gatekeeper: http://support.apple.com/kb/ht5290
|
||||
// for developers: https://developer.apple.com/developer-id/
|
||||
final String APPLE_URL = "https://developer.apple.com/developer-id/";
|
||||
String thePain =
|
||||
//"<html><body><font size=2>" +
|
||||
"In recent versions of OS X, Apple has introduced the \u201CGatekeeper\u201D system, " +
|
||||
"In recent versions of macOS, Apple has introduced the \u201CGatekeeper\u201D system, " +
|
||||
"which makes it more difficult to run applications like those exported from Processing. ";
|
||||
|
||||
if (new File("/usr/bin/codesign_allocate").exists()) {
|
||||
@@ -899,12 +903,11 @@ public class JavaEditor extends Editor {
|
||||
} else {
|
||||
thePain +=
|
||||
"Gatekeeper requires applications to be \u201Csigned\u201D, or they will be reported as damaged. " +
|
||||
"To prevent this message, install Xcode (and the Command Line Tools) from the App Store, or visit " +
|
||||
"System Preferences \u2192 Security & Privacy and select Allow apps downloaded from: anywhere. ";
|
||||
"To prevent this message, install Xcode (and the Command Line Tools) from the App Store. ";
|
||||
}
|
||||
thePain +=
|
||||
"To avoid the messages entirely, manually code sign your app. " +
|
||||
"For more information: <a href=\"\">https://developer.apple.com/developer-id/</a>";
|
||||
"For more information: <a href=\"\">" + APPLE_URL + "</a>";
|
||||
|
||||
// xattr -d com.apple.quarantine thesketch.app
|
||||
|
||||
|
||||
15
todo.txt
15
todo.txt
@@ -21,14 +21,23 @@ X drop '64' from the folder name
|
||||
X export.txt error "big fat lie" spew on export
|
||||
X was including all dll and so files as if they'd been extracted
|
||||
X also several .jar files from other platforms included
|
||||
_ the "embed Java" shouldn't be available unless the current platform is selected
|
||||
_ update text to macOS instead of Mac OS X
|
||||
_ install Java 11 should link to OpenJDK site
|
||||
o the "embed Java" shouldn't be available unless the current platform is selected
|
||||
X changed text to be a little clearer
|
||||
X export.embed_java.for changed to export.include_java
|
||||
X update text to macOS instead of Mac OS X
|
||||
X install Java 11 should link to OpenJDK site
|
||||
_ get rid of extra chatter with windows version:
|
||||
Compiling resources
|
||||
Linking
|
||||
Successfully created /Users/fry/Desktop/sketch_200925b/application.windows64/sketch_200925b.exe
|
||||
|
||||
_ launch4j warnings
|
||||
WARNING: An illegal reflective access operation has occurred
|
||||
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/Users/fry/coconut/processing4/build/macosx/work/Processing.app/Contents/Java/modes/java/application/launch4j/lib/xstream.jar) to field java.util.Properties.defaults
|
||||
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
|
||||
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
|
||||
WARNING: All illegal access operations will be denied in a future release
|
||||
|
||||
|
||||
contribs
|
||||
X Updates and fixes for PDE_pt.properties (Portugese translation)
|
||||
|
||||
Reference in New Issue
Block a user