Add support for building on desktop

This commit is contained in:
Thomas Farstrike
2025-05-10 17:44:31 +02:00
parent 4d0258e9b3
commit a309cc30e3
2 changed files with 37 additions and 7 deletions
+28
View File
@@ -102,3 +102,31 @@ Release checklist
- copy ~/sources/lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin to webinstaller
- update manifest of webinstaller
- push webinstaller
Building for desktop
====================
Building to run as an app on the Linux desktop or MacOS (untested) is supported.
To do so, make sure you have the necessary dependencies (see https://github.com/lvgl-micropython/) and then run:
```
~/sources/PiggyOS/scripts/build_lvgl_micropython.sh unix
```
or
```
~/sources/PiggyOS/scripts/build_lvgl_micropython.sh macOS
```
To run it, it's recommended to symlink your ~/.micropython/lib folder into this project's lib:
```
ln -sf $(readlink -f internal_filesystem/lib) ~/.micropython/lib
```
Then to run it, do:
```
./scripts/run_desktop.sh
```
+9 -7
View File
@@ -4,9 +4,9 @@
# --flash-size: total flash size is 16MB
#
devbuild="$1"
buildtype="$1"
echo "Usage: $0 [devbuild]"
echo "Usage: $0 [devbuild/unix]"
echo "Example: $0"
echo "Example: $0 devbuild"
echo
@@ -16,13 +16,15 @@ sleep 2
pushd ~/sources/lvgl_micropython
manifest="FROZEN_MANIFEST=/home/user/sources/PiggyOS/manifest.py"
if [ "$devbuild" == "devbuild" ]; then
if [ "$buildtype" == "devbuild" ]; then
manifest=""
fi
python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="/home/user/sources/micropython-camera-API/src/micropython.cmake" "$manifest"
# build for unix:
#python3 make.py unix DISPLAY=sdl_display INDEV=sdl_pointer
if [ "$buildtype" != "unix" -o "$buildtype" != "macOS" ]; then
python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="/home/user/sources/micropython-camera-API/src/micropython.cmake" "$manifest"
else
# build for desktop
python3 make.py "$buildtype" DISPLAY=sdl_display INDEV=sdl_pointer
fi
popd