Merge pull request #119 from InfiniTimeOrg/libpng_system_lib
Remove libpng submodule and require system lib
This commit is contained in:
commit
ae2cd08965
4
.github/workflows/lv_sim.yml
vendored
4
.github/workflows/lv_sim.yml
vendored
|
@ -29,10 +29,10 @@ jobs:
|
||||||
- name: Install cmake
|
- name: Install cmake
|
||||||
uses: lukka/get-cmake@v3.18.3
|
uses: lukka/get-cmake@v3.18.3
|
||||||
|
|
||||||
- name: Install SDL2 development package
|
- name: Install SDL2 and libpng development package
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install libsdl2-dev
|
sudo apt-get -y install libsdl2-dev libpng-dev
|
||||||
|
|
||||||
- name: Install lv_font_conv
|
- name: Install lv_font_conv
|
||||||
run:
|
run:
|
||||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -4,6 +4,3 @@
|
||||||
[submodule "lv_drivers"]
|
[submodule "lv_drivers"]
|
||||||
path = lv_drivers
|
path = lv_drivers
|
||||||
url = ../../lvgl/lv_drivers.git
|
url = ../../lvgl/lv_drivers.git
|
||||||
[submodule "libpng"]
|
|
||||||
path = libpng
|
|
||||||
url = ../../glennrp/libpng.git
|
|
||||||
|
|
|
@ -317,11 +317,9 @@ configure_file("${InfiniTime_DIR}/src/Version.h.in" "${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
|
||||||
option(WITH_PNG "Compile with libpng support to dump current screen as png" ON)
|
option(WITH_PNG "Compile with libpng support to dump current screen as png" ON)
|
||||||
if(WITH_PNG)
|
if(WITH_PNG)
|
||||||
|
find_package(PNG REQUIRED)
|
||||||
target_compile_definitions(infinisim PRIVATE WITH_PNG)
|
target_compile_definitions(infinisim PRIVATE WITH_PNG)
|
||||||
add_subdirectory(libpng EXCLUDE_FROM_ALL)
|
target_link_libraries(infinisim PRIVATE PNG::PNG)
|
||||||
target_include_directories(infinisim PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
||||||
target_include_directories(infinisim PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/libpng")
|
|
||||||
target_link_libraries(infinisim PRIVATE png_static)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(infinisim PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/gif-h")
|
target_include_directories(infinisim PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/gif-h")
|
||||||
|
|
11
README.md
11
README.md
|
@ -31,23 +31,24 @@ git submodule update --init --recursive
|
||||||
- [lv_font_conv](https://github.com/lvgl/lv_font_conv#install-the-script) (for `font.c` generation since [InfiniTime#1097](https://github.com/InfiniTimeOrg/InfiniTime/pull/1097))
|
- [lv_font_conv](https://github.com/lvgl/lv_font_conv#install-the-script) (for `font.c` generation since [InfiniTime#1097](https://github.com/InfiniTimeOrg/InfiniTime/pull/1097))
|
||||||
- Note: requires Node.js v12.0.0 or later
|
- Note: requires Node.js v12.0.0 or later
|
||||||
- [lv_img_conv](https://github.com/lvgl/lv_img_conv) (for `resource.zip` generation when `BUILD_RESOURCES=ON`, which is the default)
|
- [lv_img_conv](https://github.com/lvgl/lv_img_conv) (for `resource.zip` generation when `BUILD_RESOURCES=ON`, which is the default)
|
||||||
|
- optional: `libpng`, see `-DWITH_PNG=ON` cmake setting below for more info
|
||||||
|
|
||||||
On Ubuntu/Debian install the following packages:
|
On Ubuntu/Debian install the following packages:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt install -y cmake libsdl2-dev g++ npm
|
sudo apt install -y cmake libsdl2-dev g++ npm libpng-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
On Arch Linux the following packages are needed:
|
On Arch Linux the following packages are needed:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo pacman -S cmake sdl2 gcc npm
|
sudo pacman -S cmake sdl2 gcc npm libpng
|
||||||
```
|
```
|
||||||
|
|
||||||
On Fedora the following packages are needed:
|
On Fedora the following packages are needed:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo dnf install cmake SDL2-devel gcc zlib-devel npm
|
sudo dnf install cmake SDL2-devel g++ npm patch perl libpng-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
Then install the `lv_font_conv` executable to the InfiniSim source directory (will be installed at `node_modules/.bin/lv_font_conv`)
|
Then install the `lv_font_conv` executable to the InfiniSim source directory (will be installed at `node_modules/.bin/lv_font_conv`)
|
||||||
|
@ -78,6 +79,10 @@ The following configuration settings can be added to the first `cmake -S . -B bu
|
||||||
The default value points to the InfiniTime submodule in this repository.
|
The default value points to the InfiniTime submodule in this repository.
|
||||||
- `-DMONITOR_ZOOM=1`: scale simulator window by this factor
|
- `-DMONITOR_ZOOM=1`: scale simulator window by this factor
|
||||||
- `-DBUILD_RESOURCES=ON`: enable/disable `resource.zip` creation, will be created in the `<build-dir>/resources` folder
|
- `-DBUILD_RESOURCES=ON`: enable/disable `resource.zip` creation, will be created in the `<build-dir>/resources` folder
|
||||||
|
- `-DWITH_PNG=ON`: enable/disable the screenshot to `PNG` support.
|
||||||
|
Per default InfiniSim tries to use `libpng` to create screenshots in PNG format.
|
||||||
|
This requires `libpng` development libraries as build and runtime dependency.
|
||||||
|
Can be disabled with cmake config setting `-DWITH_PNG=OFF`.
|
||||||
|
|
||||||
## Run Simulator
|
## Run Simulator
|
||||||
|
|
||||||
|
|
1
libpng
1
libpng
|
@ -1 +0,0 @@
|
||||||
Subproject commit 0a158f3506502dfa23edfc42790dfaed82efba17
|
|
Loading…
Reference in New Issue
Block a user