Skip to content

Commit 5ea3897

Browse files
committed
Moved some runtime build path properties to proper function
1 parent 7e270d6 commit 5ea3897

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

arduino/cores/cores.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ func (release *PlatformRelease) RequiresToolRelease(toolRelease *ToolRelease) bo
336336
func (release *PlatformRelease) RuntimeProperties() *properties.Map {
337337
res := properties.NewMap()
338338
if release.InstallDir != nil {
339-
res.Set("runtime.platform.path", release.InstallDir.String())
340-
res.Set("runtime.hardware.path", release.InstallDir.Join("..").String())
339+
res.SetPath("runtime.platform.path", release.InstallDir)
340+
res.SetPath("runtime.hardware.path", release.InstallDir.Join(".."))
341341
}
342342

343343
return res

arduino/cores/packagemanager/package_manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ func (pme *Explorer) ResolveFQBN(fqbn *cores.FQBN) (
317317
}
318318
}
319319

320+
// Runtime build properties
321+
buildProperties.Merge(platformRelease.RuntimeProperties())
322+
buildProperties.SetPath("build.core.path", buildPlatformRelease.InstallDir.Join("cores", coreParts[0]))
323+
buildProperties.SetPath("build.system.path", buildPlatformRelease.InstallDir.Join("system"))
324+
320325
// No errors... phew!
321326
return targetPackage, platformRelease, board, buildProperties, buildPlatformRelease, nil
322327
}

legacy/builder/setup_build_properties.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ func (s *SetupBuildProperties) Run(ctx *types.Context) error {
5757
}
5858

5959
buildProperties.Set("build.core", ctx.BuildCore)
60-
buildProperties.SetPath("build.core.path", actualPlatform.InstallDir.Join("cores", buildProperties.Get("build.core")))
61-
buildProperties.Set("build.system.path", actualPlatform.InstallDir.Join("system").String())
62-
buildProperties.Set("runtime.platform.path", targetPlatform.InstallDir.String())
63-
buildProperties.Set("runtime.hardware.path", targetPlatform.InstallDir.Join("..").String())
6460
buildProperties.Set("runtime.ide.version", ctx.ArduinoAPIVersion)
6561
buildProperties.Set("runtime.ide.path", exPath)
6662
buildProperties.Set("ide_version", ctx.ArduinoAPIVersion)

0 commit comments

Comments
 (0)