@@ -122,10 +122,11 @@ elif [ "$target" == "unix" -o "$target" == "macOS" ]; then
122122 stream_wav_file=" $codebasedir " /internal_filesystem/lib/mpos/audio/stream_wav.py
123123 sed -i.backup ' s/^@micropython\.viper$/#@micropython.viper/' " $stream_wav_file "
124124
125- if [ " $target " == " macOS" ]; then
126- echo " homebrew install rlottie fails so it runs into: fatal error: 'rlottie_capi.h' file not found on macos"
127- sed -i.backup ' s/#define[[:space:]]\+MICROPY_RLOTTIE[[:space:]]\+1/#define MICROPY_RLOTTIE 0/' " $codebasedir " /lvgl_micropython/lib/lv_conf.h
128- echo " After disabling MICROPY_RLOTTIE:"
125+ if [ " $target " == " unix" ]; then
126+ # only on unix, because on macos, homebrew install rlottie fails so the compilation runs into: fatal error: 'rlottie_capi.h' file not found on macos"
127+ # and on esp32, rlottie_create_from_raw() crashes the system
128+ sed -i.backup ' s/#define MICROPY_RLOTTIE 0/#define MICROPY_RLOTTIE 1/' " $codebasedir " /lvgl_micropython/lib/lv_conf.h
129+ echo " After enabling MICROPY_RLOTTIE:"
129130 cat " $codebasedir " /lvgl_micropython/lib/lv_conf.h
130131 fi
131132
@@ -136,9 +137,10 @@ elif [ "$target" == "unix" -o "$target" == "macOS" ]; then
136137 python3 make.py " $target " LV_CFLAGS=" -g -O0 -ggdb" STRIP= DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard " $frozenmanifest "
137138 popd
138139
139- if [ " $target " == " macOS" ]; then
140- sed -i.backup ' s/#define[[:space:]]\+MICROPY_RLOTTIE[[:space:]]\+0/#define MICROPY_RLOTTIE 1/' " $codebasedir " /lvgl_micropython/lib/lv_conf.h
141- echo " After enabling MICROPY_RLOTTIE:"
140+ # Restore RLOTTIE:
141+ if [ " $target " == " unix" ]; then
142+ sed -i.backup ' s/#define MICROPY_RLOTTIE 1/#define MICROPY_RLOTTIE 0/' " $codebasedir " /lvgl_micropython/lib/lv_conf.h
143+ echo " After disabling MICROPY_RLOTTIE:"
142144 cat " $codebasedir " /lvgl_micropython/lib/lv_conf.h
143145 fi
144146
0 commit comments