From fd4fda0e4ada37571a1a22dc5358d9c9f3466673 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 22 Nov 2025 11:19:35 +0100 Subject: [PATCH] Fix desktop build --- internal_filesystem/boot.py | 8 ++++---- scripts/build_mpos.sh | 4 +--- scripts/install.sh | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/internal_filesystem/boot.py b/internal_filesystem/boot.py index 9778ac9e..6c10989b 100644 --- a/internal_filesystem/boot.py +++ b/internal_filesystem/boot.py @@ -1,9 +1,9 @@ -# This file is the only one that can't be overridden (without rebuilding) for development, so keep it minimal. +# This file is the only one that can't be overridden (without rebuilding) for development because it's not in lib/, so keep it minimal. -# Make sure the storage partition's /lib is first in the path, so whatever is placed there overrides frozen libraries -# This allows a "prod[uction]" build to be used for development as well, just by overriding the libraries in /lib +# Make sure the storage partition's lib/ is first in the path, so whatever is placed there overrides frozen libraries. +# This allows any build to be used for development as well, just by overriding the libraries in lib/ import sys -sys.path.insert(0, '/lib') +sys.path.insert(0, 'lib') print("Passing execution over to MicroPythonOS's main.py") import mpos.main diff --git a/scripts/build_mpos.sh b/scripts/build_mpos.sh index 26ed58ae..d1095d97 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -98,13 +98,11 @@ if [ "$target" == "esp32" ]; then elif [ "$target" == "unix" -o "$target" == "macOS" ]; then manifest=$(readlink -f "$codebasedir"/manifests/manifest.py) frozenmanifest="FROZEN_MANIFEST=$manifest" - # build for desktop - #python3 make.py "$target" DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest" # LV_CFLAGS are passed to USER_C_MODULES # STRIP= makes it so that debug symbols are kept pushd "$codebasedir"/lvgl_micropython/ # USER_C_MODULE doesn't seem to work properly so there are symlinks in lvgl_micropython/extmod/ - python3 make.py "$target" LV_CFLAGS="-g -O0 -ggdb -ljpeg" STRIP= DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest" + python3 make.py "$target" LV_CFLAGS="-g -O0 -ggdb -ljpeg" STRIP= DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$frozenmanifest" popd else echo "invalid target $target" diff --git a/scripts/install.sh b/scripts/install.sh index 8e120f8a..26007255 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -52,8 +52,8 @@ find apps/ -maxdepth 1 -type l | while read symlink; do done -echo "Unmounting builtin/ so that it can be customized..." # not sure this is necessary -$mpremote exec "import os ; os.umount('/builtin')" +#echo "Unmounting builtin/ so that it can be customized..." # not sure this is necessary +#$mpremote exec "import os ; os.umount('/builtin')" $mpremote fs cp -r builtin :/ $mpremote fs cp -r lib :/