@@ -323,22 +323,21 @@ func runCompileCommand(cmd *cobra.Command, args []string, srv rpc.ArduinoCoreSer
323
323
// Output profile
324
324
325
325
libs := ""
326
- hasVendoredLibs := false
327
326
for _ , lib := range builderRes .GetUsedLibraries () {
328
327
if lib .GetLocation () != rpc .LibraryLocation_LIBRARY_LOCATION_USER && lib .GetLocation () != rpc .LibraryLocation_LIBRARY_LOCATION_UNMANAGED {
329
328
continue
330
329
}
331
- if lib .GetVersion () == "" {
332
- hasVendoredLibs = true
333
- continue
330
+ if lib .GetVersion () == "" || lib .Location == rpc .LibraryLocation_LIBRARY_LOCATION_UNMANAGED {
331
+ libDir := paths .New (lib .GetInstallDir ())
332
+ if ok , err := libDir .IsInsideDir (sketchPath ); err == nil && ok {
333
+ if ref , err := libDir .RelFrom (sketchPath ); err == nil {
334
+ libDir = ref
335
+ }
336
+ }
337
+ libs += fmt .Sprintln (" - dir: " + libDir .String ())
338
+ } else {
339
+ libs += fmt .Sprintln (" - " + lib .GetName () + " (" + lib .GetVersion () + ")" )
334
340
}
335
- libs += fmt .Sprintln (" - " + lib .GetName () + " (" + lib .GetVersion () + ")" )
336
- }
337
- if hasVendoredLibs {
338
- msg := "\n "
339
- msg += i18n .Tr ("WARNING: The sketch is compiled using one or more custom libraries." ) + "\n "
340
- msg += i18n .Tr ("Currently, Build Profiles only support libraries available through Arduino Library Manager." )
341
- feedback .Warning (msg )
342
341
}
343
342
344
343
newProfileName := "my_profile_name"
0 commit comments