Files
tactility/Buildscripts/release-sdk-current.py
T
Ken Van Hoeylandt 643cbc3806 Implement posix app loading (#643)
- Added POSIX desktop support for SDK builds, application packaging, and integration testing.
- Added POSIX filesystem partitions and improved application path handling.
- Added simulator support for loading and running applications dynamically.
- Improved simulator task stack handling and display startup reliability.
- Improved simulator display scaling, resizing, high-DPI support, and pointer accuracy.
- Fixed LVGL timers and input polling on POSIX. (fixes simulator with Linux on some Intel graphics platforms)
- Standardized data paths across platforms.
- Logging now works via separate task: this allows apps to write to log without it affecting their stdout (for apps that output text as relevant date for other apps, like the File Selection app)
- Fixes for app stdio
2026-08-31 22:09:04 +02:00

71 lines
2.3 KiB
Python
Executable File

#!/usr/bin/env python3
import os
import platform
import shutil
import subprocess
import sys
def get_idf_target():
try:
with open("sdkconfig", "r") as f:
for line in f:
if line.startswith("CONFIG_IDF_TARGET="):
# CONFIG_IDF_TARGET="esp32s3" -> esp32s3
return line.split('=')[1].strip().strip('"')
except FileNotFoundError:
print("sdkconfig not found")
return None
return None
def get_version():
try:
with open("version.txt", "r") as f:
return f.read().strip()
except FileNotFoundError:
print("version.txt not found")
sys.exit(1)
def run_release_script(script_name, sdk_path):
# Cleanup sdk_path
if os.path.exists(sdk_path):
print(f"Cleaning up {sdk_path}")
shutil.rmtree(sdk_path)
os.makedirs(sdk_path, exist_ok=True)
# Note: Using sys.executable to ensure we use the same python interpreter
script_path = os.path.join("Buildscripts", script_name)
print(f"Running {script_path} {sdk_path}")
result = subprocess.run([sys.executable, script_path, sdk_path])
if result.returncode != 0:
print(f"Error: {script_path} failed with return code {result.returncode}")
sys.exit(result.returncode)
def main():
version = get_version()
# ESP_IDF_VERSION is only set once an ESP-IDF environment has been activated (export.sh /
# the Windows PowerShell profile - see building.md); same check release-sdk-esp32.py and
# release-sdk-posix.py themselves use to tell the two builds apart.
esp_idf_version = os.environ.get("ESP_IDF_VERSION", "")
if esp_idf_version:
idf_target = get_idf_target()
if not idf_target:
print("Could not determine IDF target from sdkconfig")
sys.exit(1)
# release/TactilitySDK/${version}-${idf_target}/TactilitySDK
sdk_path = os.path.join("release", "TactilitySDK", f"{version}-{idf_target}", "TactilitySDK")
run_release_script("release-sdk-esp32.py", sdk_path)
else:
# release/TactilitySDK/${version}-posix-${arch}/TactilitySDK
arch = platform.machine()
sdk_path = os.path.join("release", "TactilitySDK", f"{version}-posix-{arch}", "TactilitySDK")
run_release_script("release-sdk-posix.py", sdk_path)
if __name__ == "__main__":
main()