Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding building of v2 UI #487

Merged
merged 21 commits into from
Jan 25, 2023
Merged

Adding building of v2 UI #487

merged 21 commits into from
Jan 25, 2023

Conversation

jeremypoulter
Copy link
Collaborator

Can now set the GUI_NAME env var to the directory containing the GUI. The script is a lot more flexable now and handles nested resources, as well as a mix of compressed and uncompresssed resources

Can now set the `GUI_NAME` env var to the directory containing the GUI. The script is a lot more flexable now and handles nested resources, as well as a mix of compressed and uncompresssed resources
@KipK
Copy link
Collaborator

KipK commented Dec 12, 2022

Thanks for this. I'll try soon .

I think webserver_static.cpp needs a bit of modification to handle the index.html and the /assets subfolder
We also have some .webmanifest file used for the webapp.
We can't use it as true Progressive Web App yet, as it require the files to be hosted over HTTPS.

Can now set the `GUI_NAME` env var to the directory containing the GUI. The script is a lot more flexable now and handles nested resources, as well as a mix of compressed and uncompresssed resources
@KipK
Copy link
Collaborator

KipK commented Dec 20, 2022

@jeremypoulter , how I should use this now to build the fw with new UI ?

@jeremypoulter
Copy link
Collaborator Author

There are some additional envvars you need to set to build the UI: https://github.com/OpenEVSE/ESP32_WiFi_V4.x/pull/487/files#diff-d0777657fa3fd81d23aaf7273e58aee453b04e67882517900c56daeef9b3e4c1R102-R104

so assuming you have teh v2 GUI source checked out in the ESP32_WiFi_V4.x/openevse-gui-v2 directory (and built from an NPM/JS POV) you would set the vars for the specific command

GUI_NAME=openevse-gui-v2 PLATFORMIO_BUILD_FLAGS='-D DISABLE_WIFI_PORTAL -D WEB_SERVER_ROOT_PAGE_INDEX' pio run ...

eg if you want to switch from one GUI to another, or

export GUI_NAME=openevse-gui-v2
export PLATFORMIO_BUILD_FLAGS='-D DISABLE_WIFI_PORTAL -D WEB_SERVER_ROOT_PAGE_INDEX'
pio run ...

@KipK
Copy link
Collaborator

KipK commented Dec 20, 2022

Can I setup those vars in platoformio.ini directly ?

jeremypoulter and others added 3 commits December 21, 2022 10:32
changed js to text/javascript ( nowdays recommended )
added missing files in script
@jeremypoulter jeremypoulter marked this pull request as ready for review December 27, 2022 21:44
@glynhudson glynhudson merged commit 589e247 into master Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants