lvgl / lv_web_emscripten

LVGL ported to Emscripten to be converted to JavaScript
MIT License
80 stars 28 forks source link

Build "normal" website #8

Closed kisvegabor closed 3 years ago

kisvegabor commented 3 years ago

I've tried to build a normal website with the project in the master branch but seemingly it's adjuted to create websites for the examples.

@embeddedt Is there a config option for the old behavior?

embeddedt commented 3 years ago

Sorry; I'm not sure exactly what you mean by old behavior. Could you explain, please?

You can pass CHOSEN_DEMO=<any example/demo> to choose which example you want. I believe the previous version was hardcoded to lv_demo_widgets (which is still the default).

kisvegabor commented 3 years ago

For the music demo I got this html: image

After taking a second look I noticed that the extra git related lines can be removed by using another template HTML.

By "normal" behavior I meant to just get a clean index.html from any custom code (not necessarily built-in demos).

embeddedt commented 3 years ago

Now I understand.

You can pass NO_GIT_HASH=1 to the Makefile to remove the Git commit information.

For the custom code, you can just edit main.c and remove the CHOSEN_DEMO() call; that just replaced the hardcoded one that was there previously.

kisvegabor commented 3 years ago

I see, thank you.

You can pass NO_GIT_HASH=1 to the Makefile to remove the Git commit information.

I think ADD_GIT_HASH = 1 would make more sense but probably it's not worth to effort to change it. Anyway, could you add a few lines about these options in the README?

embeddedt commented 3 years ago

Added. https://github.com/lvgl/lv_sim_emscripten/blob/master/README.md#build-options-environment-variables

kisvegabor commented 3 years ago

Thanks, I've just added a short example too.