Support "all" platforms in app manifest

This commit is contained in:
Ken Van Hoeylandt 2026-10-15 21:21:03 +02:00
parent 6515cd6b09
commit bb68fba13d
2 changed files with 14 additions and 5 deletions

View File

@ -36,7 +36,7 @@ def print_help():
print("")
print(" build Build the app. Optionally specify a platform.")
print(" Supported platforms are lower case. Example: esp32s3")
print(" Supported platforms are read from manifest.properties")
print(" Supported platforms are read from manifest.properties (target.platforms=all for every installed SDK platform)")
print(" Parameters:")
print(" (optional) --architecture [input], -a [input]")
print("")
@ -348,9 +348,19 @@ def get_binary_dirs(manifest):
else:
return [(manifest["app.id"], ".")]
# "target.platforms=all" means every platform that an SDK is installed for
def get_manifest_platforms(manifest):
platforms = [platform.strip() for platform in manifest["target.platforms"].split(",")]
if platforms != ["all"]:
return platforms
version_directory = os.path.join(sdk_root_path, "sdk", manifest["target.sdk"])
prefix = "platform-"
if not os.path.isdir(version_directory):
exit_with_error(f"No SDK {manifest['target.sdk']} installed, so 'all' platforms can't be determined")
return sorted(name[len(prefix):] for name in os.listdir(version_directory) if name.startswith(prefix))
def is_valid_manifest_platform(manifest, platform):
manifest_platforms = manifest["target.platforms"].split(",")
return platform in manifest_platforms
return platform in get_manifest_platforms(manifest)
def validate_manifest_platform(manifest, platform):
if not is_valid_manifest_platform(manifest, platform):
@ -358,7 +368,7 @@ def validate_manifest_platform(manifest, platform):
def get_manifest_target_platforms(manifest, requested_platform):
if requested_platform == "" or requested_platform is None:
return manifest["target.platforms"].split(",")
return get_manifest_platforms(manifest)
else:
validate_manifest_platform(manifest, requested_platform)
return [requested_platform]

View File

@ -13,7 +13,6 @@
- Fix BT: an esp32 device connecting to a peripheral isn't working
- "update all" functionality for app hub module, including commandline app. add button to app hub toolbar if there are 1 or more apps to update (does "update all").
- Improve Wi-Fi mock so it actually works with connect/disconnect/scan list. It connects to literally anything from the scan list.
- Fix posix Wi-Fi so it actually connects to something
- Support http/https on posix
- Use GPS time to set/update the current time: when enabled, at boot, when wifi is not enabled, start the gps device and wait until a lock is acquired, then get the time and sync it. Then stop the GPS device.
- lvgl-module's spinner relies on hard-coded spinner asset from Tactility main project, should be sized based on DPI