forked from lvgl/lv_platformio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update PlatformIO demo to LVGL9.1 * Update ci.yml Trying to fix a ``` Run actions/setup-python@v1 Error: Version 3.x with arch x64 not found ``` failure on MacOS * Add a build script that automatically tries to adjust SDL2 include and library paths. Fixes compilation failure on MacOS 14
- Loading branch information
1 parent
b68b2d8
commit 172aa55
Showing
6 changed files
with
116 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,15 @@ build_flags = | |
; Add more defines below to overide lvgl:/src/lv_conf_simple.h | ||
lib_deps = | ||
; Use direct URL, because package registry is unstable | ||
;lvgl@~7.11.0 | ||
lvgl=https://github.com/lvgl/lvgl/archive/refs/tags/v8.2.0.zip | ||
[email protected] | ||
lib_archive = false | ||
|
||
|
||
[env:emulator_64bits] | ||
platform = native@^1.1.3 | ||
extra_scripts = support/sdl2_build_extra.py | ||
extra_scripts = | ||
pre:support/sdl2_paths.py ; Tries to find SDL2 include and lib paths on your system - specifically for MacOS w/ Homebrew | ||
post:support/sdl2_build_extra.py | ||
build_flags = | ||
${env.build_flags} | ||
; -D LV_LOG_LEVEL=LV_LOG_LEVEL_INFO | ||
|
@@ -40,25 +41,18 @@ build_flags = | |
; SDL drivers options | ||
-D LV_LVGL_H_INCLUDE_SIMPLE | ||
-D LV_DRV_NO_CONF | ||
-D USE_SDL | ||
-D LV_USE_SDL | ||
-D SDL_HOR_RES=480 | ||
-D SDL_VER_RES=320 | ||
-D SDL_ZOOM=1 | ||
-D SDL_INCLUDE_PATH="\"SDL2/SDL.h\"" | ||
-D LV_SDL_INCLUDE_PATH="\"SDL2/SDL.h\"" | ||
|
||
; LVGL memory options, setup for the demo to run properly | ||
-D LV_MEM_CUSTOM=1 | ||
-D LV_MEM_SIZE="(128U * 1024U)" | ||
|
||
; SDL2 includes, uncomment the next two lines on MAC OS if you intalled sdl via homebrew | ||
; !find /opt/homebrew/Cellar/sdl2 -name "include" | sed "s/^/-I /" | ||
; !find /opt/homebrew/Cellar/sdl2 -name "libSDL2.a" | xargs dirname | sed "s/^/-L /" | ||
|
||
lib_deps = | ||
${env.lib_deps} | ||
; Use direct URL, because package registry is unstable | ||
;lv_drivers@~7.9.0 | ||
lv_drivers=https://github.com/lvgl/lv_drivers/archive/refs/tags/v8.2.0.zip | ||
build_src_filter = | ||
+<*> | ||
+<../hal/sdl2> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Import("env") | ||
import sys | ||
import os | ||
import glob | ||
|
||
if sys.platform.startswith("darwin"): | ||
#sdl_include_path = !find /opt/homebrew/Cellar/sdl2 -name "include" | sed "s/^/-I /" | ||
sdl_include = glob.glob("/opt/homebrew/Cellar/sdl2/*/include", recursive=True) | ||
if sdl_include: | ||
print(f"Found Homebrew SDL include path: {sdl_include[0]}") | ||
env.Append( | ||
CPPPATH=sdl_include[0] | ||
) | ||
sdl_lib = glob.glob("/opt/homebrew/Cellar/sdl2/**/libSDL2.a", recursive=True) | ||
if sdl_lib: | ||
print(f"Found Homebrew SDL lib path: {sdl_lib[0]}") | ||
env.Append( | ||
LIBPATH=os.path.dirname(sdl_lib[0]) | ||
) | ||
|
||
|
||
#breakpoint() | ||
|
||
#print('NewENV=====================================') | ||
#print(env.Dump()) | ||
#print('DefaultENV=====================================') | ||
#print(DefaultEnvironment().Dump()) |