@@ -162,6 +162,7 @@ public static void setPackageURLs(HashSet<String> packageUrls, boolean forceDown
162162 * the platforms after this platform are skipped
163163 */
164164 public static void installsubsetOfLatestPlatforms (int fromIndex , int toIndex ) {
165+ String DEPRECATED = "DEPRECATED" ; //$NON-NLS-1$
165166 if (!isReady ()) {
166167 Common .log (new Status (IStatus .ERROR , Const .CORE_PLUGIN_ID , BoardsManagerIsBussy , new Exception ()));
167168 return ;
@@ -173,11 +174,21 @@ public static void installsubsetOfLatestPlatforms(int fromIndex, int toIndex) {
173174 for (ArduinoPackage curPackage : allPackages ) {
174175 Collection <ArduinoPlatform > latestPlatforms = curPackage .getPlatforms ();
175176 for (ArduinoPlatform curPlatform : latestPlatforms ) {
176- if (currPlatformIndex > fromIndex ) {
177- install (curPlatform .getNewestVersion (), monitor );
177+ if (!curPlatform .getName ().toUpperCase ().contains (DEPRECATED )) {
178+ if (currPlatformIndex > fromIndex ) {
179+ ArduinoPlatformVersion latestPlatformVersion = curPlatform .getNewestVersion ();
180+ if (!latestPlatformVersion .getName ().toUpperCase ().contains (DEPRECATED )) {
181+ install (latestPlatformVersion , monitor );
182+ } else {
183+ System .out .println ("skipping platform " + latestPlatformVersion .toString ()); //$NON-NLS-1$
184+ }
185+ }
186+ if (currPlatformIndex ++ > toIndex ) {
187+ return ;
188+ }
189+ } else {
190+ System .out .println ("skipping platform " + curPlatform .toString ()); //$NON-NLS-1$
178191 }
179- if (currPlatformIndex ++ > toIndex )
180- return ;
181192 }
182193 }
183194 }
@@ -219,12 +230,12 @@ private static IStatus install(ArduinoPlatformVersion platformVersion, IProgress
219230 String version = platformVersion .getVersion ().toString ();
220231 // Check if we're installed already
221232 if (platformVersion .isInstalled ()) {
222- System .out .println ("reusing platform " + name + " " + architecture + "(" + version + ")" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4 $
233+ System .out .println ("reusing platform " + platformVersion . toString () ); //$NON-NLS-1$
223234 return Status .OK_STATUS ;
224235 }
225236
226237 // Download platform archive
227- System .out .println ("start installing platform " + name + " " + architecture + "(" + version + ")" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4 $
238+ System .out .println ("start installing platform " + platformVersion . toString () ); //$NON-NLS-1$
228239
229240 MyMultiStatus mstatus = new MyMultiStatus ("Failed to install " + platformVersion .getName ()); //$NON-NLS-1$
230241 mstatus .addErrors (PackageManager .downloadAndInstall (platformVersion , forceDownload , monitor ));
@@ -269,7 +280,7 @@ private static IStatus install(ArduinoPlatformVersion platformVersion, IProgress
269280
270281 WorkAround .applyKnownWorkArounds (platformVersion );
271282
272- System .out .println ("done installing platform " + name + " " + architecture + "(" + version + ")" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
283+ System .out .println ("done installing platform " + platformVersion . toString () ); //$NON-NLS-1$
273284 return mstatus ;
274285 }
275286
0 commit comments