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
This commit is contained in:
committed by
GitHub
parent
d3656bcd3d
commit
643cbc3806
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -17,42 +18,53 @@ def get_idf_target():
|
||||
return None
|
||||
return None
|
||||
|
||||
def main():
|
||||
# 1. Get idf_target
|
||||
idf_target = get_idf_target()
|
||||
if not idf_target:
|
||||
print("Could not determine IDF target from sdkconfig")
|
||||
sys.exit(1)
|
||||
|
||||
# 2. Get version
|
||||
def get_version():
|
||||
try:
|
||||
with open("version.txt", "r") as f:
|
||||
version = f.read().strip()
|
||||
return f.read().strip()
|
||||
except FileNotFoundError:
|
||||
print("version.txt not found")
|
||||
sys.exit(1)
|
||||
|
||||
# 3. Construct sdk_path
|
||||
# release/TactilitySDK/${version}-${idf_target}/TactilitySDK
|
||||
sdk_path = os.path.join("release", "TactilitySDK", f"{version}-{idf_target}", "TactilitySDK")
|
||||
|
||||
# 4. Cleanup sdk_path
|
||||
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)
|
||||
|
||||
# 5. Call release-sdk.py
|
||||
# Note: Using sys.executable to ensure we use the same python interpreter
|
||||
script_path = os.path.join("Buildscripts", "release-sdk.py")
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user