Skip to content

Commit 34ddce4

Browse files
Merge pull request #8 from QuasiKili/patch-2
Implement OS detection for binary selection
2 parents cb46e0a + bbde0ed commit 34ddce4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

scripts/run_desktop.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,17 @@ echo "$0 appname # starts the app by appname, for example: com.example.helloworl
3838
export HEAPSIZE=32M # for 1280x720 images in the image viewer
3939
export HEAPSIZE=128M # for 1280x720 images in the image viewer
4040

41-
binary=../lvgl_micropython/build/lvgl_micropy_unix
41+
# print os and set binary
42+
os_name=$(uname -s)
43+
if [ "$os_name" == "Darwin" ]; then
44+
echo "Running on macOS"
45+
binary=../lvgl_micropython/build/lvgl_micropy_macOS
46+
else
47+
# other cases can be added here
48+
echo "Running on $os_name"
49+
binary=../lvgl_micropython/build/lvgl_micropy_unix
50+
fi
51+
4252
binary=$(readlink -f "$binary")
4353
chmod +x "$binary"
4454

0 commit comments

Comments
 (0)