Implement OS detection for binary selection

Add OS detection for setting the binary path in run_desktop.sh
This commit is contained in:
Kili
2025-10-20 23:23:51 +02:00
committed by GitHub
parent 91debcfcb7
commit bbde0ed856
+11 -1
View File
@@ -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"