Browse Source

update README.md

master
Martin Vladic 2 years ago
parent
commit
ec61d3402e
  1. 29
      README.md

29
README.md

@ -1,8 +1,4 @@
# Emscripten port # LVGL web simulator project with EEZ Studio
**LVGL ported to Emscripten to be converted to JavaScript**
The result looks like this https://lvgl.io/demos
# How to get started # How to get started
@ -14,7 +10,6 @@ Downlad [SDL](https://www.libsdl.org/) (a graphics library to ope na window and
3. Install SDL2 development package: `sudo apt-get install libsdl2-dev` 3. Install SDL2 development package: `sudo apt-get install libsdl2-dev`
4. If build essentials are not installed yet: `sudo apt-get install build-essential` 4. If build essentials are not installed yet: `sudo apt-get install build-essential`
## Install Emscripten SDK ## Install Emscripten SDK
Download the [Emscripten SDK](https://kripken.github.io/emscripten-site/) and make sure it is in your PATH. Download the [Emscripten SDK](https://kripken.github.io/emscripten-site/) and make sure it is in your PATH.
@ -27,21 +22,13 @@ Download the [Emscripten SDK](https://kripken.github.io/emscripten-site/) and ma
More info here: https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html More info here: https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html
## Get the Emscripten-LVGL project ## Build the project
1. Be sure you ran `. <path-to-emsdk>/emsdk_env.sh` to add EMSDK to `PATH` 1. `cd {{projectDirPath}}`
2. In any directoy: `git clone --recurse-submodules https://github.com/mvladic/lv_web_emscripten.git` 2. `mkdir build`
3. `cd <path-to-emscripten>` 3. `cd build`
4. `mkdir build` 4. `emcmake cmake ..`
5. `cd build` 5. `emmake make -j4`
6. `emcmake cmake ..` 6. A file called `index.html` will be generated. Run this in your browser.
7. `emmake make -j4`
5. A file called `index.html` will be generated. Run this in your browser.
### Build options (environment variables)
* `LVGL_CHOSEN_DEMO` can be set to the desired demo name so that you don't need to change any C files. This is useful to compile many demos in bulk using a script.
Example `emcmake cmake .. -DLVGL_CHOSEN_DEMO=lv_demo_widgets`
### Known issue with Google Chrome browser ### Known issue with Google Chrome browser
Chrome can't open the generated html file offline. It works if you copy the files to a server. Use Firefox or other browser for offline testing. Chrome can't open the generated html file offline. It works if you copy the files to a server. Use Firefox or other browser for offline testing.

Loading…
Cancel
Save