@@ -166,18 +166,15 @@ func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir
166
166
return fmt .Errorf ("looking for boards.txt in %s: %s" , possibleBoardTxtPath , err )
167
167
168
168
} else if exist {
169
-
170
- // case: ARCHITECTURE/boards.txt
171
- // this is the general case for unversioned Platform
172
- version := semver .MustParse ("" )
173
-
174
- // FIXME: this check is duplicated, find a better way to handle this
175
- if exist , err := platformPath .Join ("boards.txt" ).ExistCheck (); err != nil {
176
- return fmt .Errorf ("opening boards.txt: %s" , err )
177
- } else if ! exist {
178
- continue
169
+ platformTxtPath := platformPath .Join ("platform.txt" )
170
+ platformProperties , err := properties .SafeLoad (platformTxtPath .String ())
171
+ if err != nil {
172
+ return fmt .Errorf ("loading platform.txt: %w" , err )
179
173
}
180
174
175
+ platformName := platformProperties .Get ("name" )
176
+ version := semver .MustParse (platformProperties .Get ("version" ))
177
+
181
178
// check if package_bundled_index.json exists
182
179
isIDEBundled := false
183
180
packageBundledIndexPath := packageDir .Parent ().Join ("package_index_bundled.json" )
@@ -210,6 +207,12 @@ func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir
210
207
}
211
208
212
209
platform := targetPackage .GetOrCreatePlatform (architecture )
210
+ if platform .Name == "" {
211
+ platform .Name = platformName
212
+ }
213
+ if ! isIDEBundled {
214
+ platform .ManuallyInstalled = true
215
+ }
213
216
release := platform .GetOrCreateRelease (version )
214
217
release .IsIDEBundled = isIDEBundled
215
218
if isIDEBundled {
0 commit comments