From bbde0ed8569b1e286cec1cd73bc67ba5f006aa2b Mon Sep 17 00:00:00 2001 From: Kili <60932529+QuasiKili@users.noreply.github.com> Date: Mon, 20 Oct 2025 23:23:51 +0200 Subject: [PATCH] Implement OS detection for binary selection Add OS detection for setting the binary path in run_desktop.sh --- scripts/run_desktop.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/run_desktop.sh b/scripts/run_desktop.sh index 1ff87462..ae21d53d 100755 --- a/scripts/run_desktop.sh +++ b/scripts/run_desktop.sh @@ -38,7 +38,17 @@ echo "$0 appname # starts the app by appname, for example: com.example.helloworl export HEAPSIZE=32M # for 1280x720 images in the image viewer export HEAPSIZE=128M # for 1280x720 images in the image viewer -binary=../lvgl_micropython/build/lvgl_micropy_unix +# print os and set binary +os_name=$(uname -s) +if [ "$os_name" == "Darwin" ]; then + echo "Running on macOS" + binary=../lvgl_micropython/build/lvgl_micropy_macOS +else + # other cases can be added here + echo "Running on $os_name" + binary=../lvgl_micropython/build/lvgl_micropy_unix +fi + binary=$(readlink -f "$binary") chmod +x "$binary"