3535import java .util .Arrays ;
3636import java .util .Enumeration ;
3737import java .util .HashMap ;
38+ import java .util .HashSet ;
3839import java .util .List ;
3940import java .util .Map ;
41+ import java .util .Optional ;
4042import java .util .Set ;
4143import java .util .stream .Collectors ;
4244import java .util .stream .Stream ;
5557import com .google .gson .Gson ;
5658import com .google .gson .GsonBuilder ;
5759import com .google .gson .reflect .TypeToken ;
60+ import com .neuronrobotics .bowlerstudio .BowlerKernel ;
61+ import com .neuronrobotics .bowlerstudio .assets .FontSizeManager ;
5862import com .neuronrobotics .video .OSUtil ;
5963
6064import eu .mihosoft .vrl .v3d .CSG ;
6165import eu .mihosoft .vrl .v3d .FileUtil ;
66+ import javafx .scene .Node ;
67+ import javafx .scene .control .Alert ;
6268//import javafx.scene.control.Alert;
6369import javafx .scene .control .Button ;
70+ import javafx .scene .control .ButtonType ;
6471//import javafx.scene.control.ButtonType;
6572//import javafx.scene.control.Alert.AlertType;
6673import javafx .scene .image .Image ;
67-
74+ import javafx . stage . Stage ;
6875import net .sf .sevenzipjbinding .*;
6976import net .sf .sevenzipjbinding .impl .RandomAccessFileInStream ;
7077
@@ -74,6 +81,7 @@ public class DownloadManager {
7481 private static String bindir = System .getProperty ("user.home" ) + delim ()+"bin" +delim ()+getSTUDIO_INSTALL ()+delim ();
7582 private static int ev = 0 ;
7683 private static String cmd = "" ;
84+ private static HashSet <String > failedURLs = new HashSet <String >();
7785 private static IDownloadManagerEvents downloadEvents = new IDownloadManagerEvents () {
7886
7987 @ Override
@@ -117,6 +125,9 @@ public boolean get(String name, String url) {
117125 public void onInstallFail (String url ) {
118126 com .neuronrobotics .sdk .common .Log .error ("Plugin needs to be installed from " +url );
119127 }
128+ public void notifyOfFailure (String name ) {
129+ com .neuronrobotics .sdk .common .Log .error ("Plugin failed " +name );
130+ }
120131 };
121132 private static GitLogProgressMonitor psudoSplash = new GitLogProgressMonitor () {
122133
@@ -325,7 +336,11 @@ private static void retryLoop(String exeType, IExternalEditor editor, String exe
325336 }
326337 new RuntimeException ("Download or extraction failed, retrying" ).printStackTrace ();
327338 }
328- approval .onInstallFail (jvmURL );
339+ if (!failedURLs .contains (jvmURL )) {
340+ failedURLs .add (jvmURL );
341+ approval .notifyOfFailure (exeType );
342+ approval .onInstallFail (jvmURL );
343+ }
329344 }
330345
331346 private static File getExecutable (String exeType , IExternalEditor editor , String executable ) {
0 commit comments