mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Showing post install script errors AFTER the installation is completed
This commit is contained in:
@ -344,9 +344,9 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
||||
String desc = "<html><body>";
|
||||
|
||||
// Library name...
|
||||
desc += format("<b>{0}</b> ", name);
|
||||
desc += format("<b>{0}</b>", name);
|
||||
if (installed != null && installed.isReadOnly()) {
|
||||
desc += "Built-In ";
|
||||
desc += " Built-In ";
|
||||
}
|
||||
|
||||
// ...author...
|
||||
|
@ -348,8 +348,11 @@ public class ContributedPlatformTableCell extends InstallerTableCell {
|
||||
|
||||
String desc = "<html><body>";
|
||||
desc += "<b>" + selected.getName() + "</b>";
|
||||
if (installed != null && installed.isReadOnly()) {
|
||||
desc += " Built-In ";
|
||||
}
|
||||
|
||||
String author = selected.getParentPackage().getMaintainer();
|
||||
String url = selected.getParentPackage().getWebsiteURL();
|
||||
if (author != null && !author.isEmpty()) {
|
||||
desc += " " + format("by <b>{0}</b>", author);
|
||||
}
|
||||
@ -364,6 +367,7 @@ public class ContributedPlatformTableCell extends InstallerTableCell {
|
||||
}
|
||||
desc = desc.substring(0, desc.lastIndexOf(',')) + ".<br />";
|
||||
|
||||
String url = selected.getParentPackage().getWebsiteURL();
|
||||
if (url != null && !url.isEmpty()) {
|
||||
desc += " " + format("<a href=\"{0}\">More info</a>", url);
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ import processing.app.I18n;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import static processing.app.I18n._;
|
||||
|
||||
@ -158,17 +160,21 @@ public class ContributionManagerUI extends InstallerJDialog {
|
||||
installerThread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<String> errors = new LinkedList<String>();
|
||||
try {
|
||||
setProgressVisible(true, _("Installing..."));
|
||||
installer.install(platformToInstall);
|
||||
errors.addAll(installer.install(platformToInstall));
|
||||
if (platformToRemove != null && !platformToRemove.isReadOnly()) {
|
||||
installer.remove(platformToRemove);
|
||||
errors.addAll(installer.remove(platformToRemove));
|
||||
}
|
||||
onIndexesUpdated();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
setProgressVisible(false, "");
|
||||
if (!errors.isEmpty()) {
|
||||
setErrorMessage(errors.get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user