@@ -96,6 +96,7 @@ await ExtractArchive(token, new[] {
96
96
configurationProvider . UpgradeConfig . Tools . Folder + "/" ,
97
97
configurationProvider . AdvantageScopeConfig . Folder + "/" ,
98
98
configurationProvider . ChoreoConfig . Folder + "/" ,
99
+ configurationProvider . ElasticConfig . Folder + "/" ,
99
100
"installUtils/" } ) ;
100
101
}
101
102
@@ -363,6 +364,52 @@ private async Task ConfigureVsCodeSettings()
363
364
}
364
365
}
365
366
367
+ if ( settingsJson . ContainsKey ( "java.configuration.runtimes" ) )
368
+ {
369
+ JArray javaConfigEnv = ( JArray ) settingsJson [ "java.configuration.runtimes" ] ! ;
370
+ Boolean javaFound = false ;
371
+ foreach ( JToken result in javaConfigEnv )
372
+ {
373
+ JToken ? name = result [ "name" ] ;
374
+ if ( name != null )
375
+ {
376
+ if ( name . ToString ( ) . Equals ( "JavaSE-17" ) )
377
+ {
378
+ result [ "path" ] = Path . Combine ( homePath , "jdk" ) ;
379
+ result [ "default" ] = true ;
380
+ javaFound = true ;
381
+ }
382
+ else
383
+ {
384
+ result [ "default" ] = false ;
385
+ }
386
+ }
387
+ }
388
+ if ( ! javaFound )
389
+ {
390
+ JObject javaConfigProp = new JObject
391
+ {
392
+ [ "name" ] = "JavaSE-17" ,
393
+ [ "path" ] = Path . Combine ( homePath , "jdk" ) ,
394
+ [ "default" ] = true
395
+ } ;
396
+ javaConfigEnv . Add ( javaConfigProp ) ;
397
+ settingsJson [ "java.configuration.runtimes" ] = javaConfigEnv ;
398
+ }
399
+ }
400
+ else
401
+ {
402
+ JArray javaConfigProps = new JArray ( ) ;
403
+ JObject javaConfigProp = new JObject
404
+ {
405
+ [ "name" ] = "JavaSE-17" ,
406
+ [ "path" ] = Path . Combine ( homePath , "jdk" ) ,
407
+ [ "default" ] = "true"
408
+ } ;
409
+ javaConfigProps . Add ( javaConfigProp ) ;
410
+ settingsJson [ "java.configuration.runtimes" ] = javaConfigProps ;
411
+ }
412
+
366
413
var serialized = JsonConvert . SerializeObject ( settingsJson , Formatting . Indented ) ;
367
414
await File . WriteAllTextAsync ( settingsFile , serialized ) ;
368
415
}
@@ -801,6 +848,7 @@ private async Task RunShortcutCreator(CancellationToken token)
801
848
shortcutData . DesktopShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "tools" , "DataLogTool.exe" ) , $ "{ frcYear } WPILib Tools/Data Log Tool { frcYear } ", $ "Data Log Tool { frcYear } ", "" ) ) ;
802
849
shortcutData . DesktopShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "advantagescope" , "AdvantageScope (WPILib).exe" ) , $ "{ frcYear } WPILib Tools/AdvantageScope (WPILib) { frcYear } ", $ "AdvantageScope (WPILib) { frcYear } ", "" ) ) ;
803
850
shortcutData . DesktopShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "choreo" , "choreo.exe" ) , $ "{ frcYear } WPILib Tools/Choreo (WPILib) { frcYear } ", $ "Choreo (WPILib) { frcYear } ", "" ) ) ;
851
+ shortcutData . DesktopShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "elastic" , "elastic_dashboard.exe" ) , $ "{ frcYear } WPILib Tools/Elastic (WPILib) { frcYear } ", $ "Elastic (WPILib) { frcYear } ", "" ) ) ;
804
852
805
853
shortcutData . StartMenuShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "tools" , "Glass.exe" ) , $ "Programs/{ frcYear } WPILib Tools/Glass { frcYear } ", $ "Glass { frcYear } ", "" ) ) ;
806
854
shortcutData . StartMenuShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "tools" , "OutlineViewer.exe" ) , $ "Programs/{ frcYear } WPILib Tools/OutlineViewer { frcYear } ", $ "OutlineViewer { frcYear } ", "" ) ) ;
@@ -813,6 +861,7 @@ private async Task RunShortcutCreator(CancellationToken token)
813
861
shortcutData . StartMenuShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "tools" , "DataLogTool.exe" ) , $ "Programs/{ frcYear } WPILib Tools/Data Log Tool { frcYear } ", $ "Data Log Tool { frcYear } ", "" ) ) ;
814
862
shortcutData . StartMenuShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "advantagescope" , "AdvantageScope (WPILib).exe" ) , $ "Programs/{ frcYear } WPILib Tools/AdvantageScope (WPILib) { frcYear } ", $ "AdvantageScope (WPILib) { frcYear } ", "" ) ) ;
815
863
shortcutData . StartMenuShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "choreo" , "choreo.exe" ) , $ "Programs/{ frcYear } WPILib Tools/Choreo (WPILib) { frcYear } ", $ "Choreo (WPILib) { frcYear } ", "" ) ) ;
864
+ shortcutData . StartMenuShortcuts . Add ( new ShortcutInfo ( Path . Join ( frcHomePath , "elastic" , "elastic_dashboard.exe" ) , $ "Programs/{ frcYear } WPILib Tools/Elastic (WPILib) { frcYear } ", $ "Elastic (WPILib) { frcYear } ", "" ) ) ;
816
865
817
866
if ( toInstallProvider . Model . InstallEverything )
818
867
{
0 commit comments