-
-
Notifications
You must be signed in to change notification settings - Fork 705
feat: write scripts for building a Pi 4 (64-bit) WebView #2216
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can maybe create a script that generates custom Dockerfiles based on the given platform (e.g., pi1, pi2, pi3, pi4, pi4-64, pi5, etc.). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # vim:ft=dockerfile | ||
|
|
||
| FROM balenalib/raspberrypi4-64-debian:bookworm | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Build dependencies for the Qt 6 app | ||
| RUN apt-get -y update && apt-get install -y \ | ||
| build-essential \ | ||
| cmake \ | ||
| qt6-base-dev \ | ||
| qt6-webengine-dev | ||
|
|
||
| RUN mkdir -p /scripts /src | ||
|
|
||
| WORKDIR /build | ||
|
|
||
| CMD ["bash"] |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,70 @@ | ||||||
| # Building WebView via Prebuilt Qt | ||||||
|
|
||||||
| ## Overview | ||||||
|
|
||||||
| This method only works on the following devices: | ||||||
|
|
||||||
| - Raspberry Pi 4 (64-bit) | ||||||
| - Raspberry Pi 5 (64-bit) | ||||||
|
|
||||||
| ## Prerequisites | ||||||
|
|
||||||
| > [!NOTE] | ||||||
| > Cross-compilation is not yet supported. | ||||||
| > You need to have the following installed and set up on your Raspberry Pi 4 or Raspberry Pi 5 device: | ||||||
| > - Docker (arm64) | ||||||
| > - Code editor of your choice (e.g., Visual Studio Code, Neovim, etc.) | ||||||
|
|
||||||
| ## Building the WebView | ||||||
|
|
||||||
| Clone the repository: | ||||||
|
|
||||||
| ```bash | ||||||
| $ git clone https://github.com/Screenly/Anthias.git | ||||||
| ``` | ||||||
|
|
||||||
| Navigate to the `webview` directory: | ||||||
|
|
||||||
| ```bash | ||||||
| $ cd /path/to/Anthias/webview | ||||||
| ``` | ||||||
|
|
||||||
| Initialize environment variables: | ||||||
|
|
||||||
| ```bash | ||||||
| $ export GIT_HASH=$(git rev-parse --short HEAD) | ||||||
|
|
||||||
| $ export COMPOSE_PROFILES=pi5 # For Raspberry Pi 5 | ||||||
| $ export COMPOSE_PROFILES=pi4-64 # For Raspberry Pi 4 | ||||||
| ``` | ||||||
|
|
||||||
| Start the builder container with the following command: | ||||||
|
|
||||||
| ```bash | ||||||
| $ docker compose up -d --build | ||||||
| ``` | ||||||
|
|
||||||
| You should now be able to invoke a run executing either of the following commands: | ||||||
|
|
||||||
| ```bash | ||||||
| $ docker compose exec builder-pi5 /webview/build_webview.sh | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| # or | ||||||
| $ docker compose exec builder-pi4-64 /webview/build_webview.sh | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| ``` | ||||||
|
|
||||||
| ```bash | ||||||
| $ docker compose exec builder-pi5 bash | ||||||
| # or | ||||||
| $ docker compose exec builder-pi4-64 bash | ||||||
|
|
||||||
| # Once you're in the container, run the following command: | ||||||
| $ /scripts/build_webview.sh | ||||||
| ``` | ||||||
|
|
||||||
| The resulting files will be placed in `~/tmp/<platform>/build/release`, where `<platform>` is either `pi5` or `pi4-64`. | ||||||
|
|
||||||
| When you're done, you can stop and remove the container with the following commands: | ||||||
|
|
||||||
| ```bash | ||||||
| $ docker compose down | ||||||
| ``` | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor common attributes.