Skip to content

Commit

Permalink
Minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
chschnell committed Apr 2, 2018
1 parent ed3e282 commit 8259ddb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 28 deletions.
46 changes: 21 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ cd ~/qt5.9.4
../build-qt5-rpi/build-qt5-rpi.sh install
```

If all goes well then you can now use this host to cross-build Qt applications for your Pi. Before deploying your application you need to copy `qt-everywhere-opensource-rpi_5.9.4_armhf.deb` to your Pi and install it there, see [Raspberry Pi installation](#raspberry-pi-installation).
If all goes well then you can now use this host to cross-build Qt applications for your Pi. Before deploying your application you need to copy `qt-everywhere-opensource-rpi_5.9.4_armhf.deb` to your Pi and install it there, as described in the next section.

## Raspberry Pi installation

Expand Down Expand Up @@ -198,35 +198,28 @@ pi@raspberrypi:~ $ sudo reboot

These are the steps to install Qt on a single Pi from the host. The `.deb` package for the Pi can of course easily be copied to and installed on any number of your devices.

* First, copy the Qt `.deb` installer from your build host to your Pi:

```bash
scp qt-everywhere-opensource-rpi_5.9.4_armhf.deb pi@raspberrypi:
```

* Log in to your Pi:
```bash
# copy the Qt installer from your build host to your Pi
scp qt-everywhere-opensource-rpi_5.9.4_armhf.deb pi@raspberrypi:

```bash
ssh pi@raspberrypi
```
# log in to your Pi
ssh pi@raspberrypi

* Install Qt and all its missing dependencies (note the use of `apt` instead of `apt-get`):
# install Qt sdk and runtime and all missing dependencies
pi@raspberrypi:~ $ sudo apt install ./qt-everywhere-opensource-rpi_5.9.4_armhf.deb
```

```bash
pi@raspberrypi:~ $ sudo apt install ./qt-everywhere-opensource-rpi_5.9.4_armhf.deb
```
Note the use of `apt` instead of `apt-get`. In case you want to uninstall Qt at a later point, run:

* In case you need to, this is how you would remove your Qt package and its dependencies again from your Pi:
```bash
# remove Qt sdk and runtime
pi@raspberrypi:~ $ sudo apt remove qt-everywhere-opensource-rpi

```bash
# remove Qt runtime
pi@raspberrypi:~ $ sudo apt remove qt-everywhere-opensource-rpi

# remove dependencies
pi@raspberrypi:~ $ sudo apt autoremove
```
# remove dangling dependencies
pi@raspberrypi:~ $ sudo apt autoremove
```

While you're logged in to your Pi, consider these additional steps for your setup (specifically if you don't plan to use X11):
While you're logged in to your Pi, it is a good time to consider these additional steps for your setup (specifically if you don't plan to use X11):

* To counter the `Unable to query physical screen size` warnings, find your display's dimensions in millimeters and set these environment variables:

Expand Down Expand Up @@ -254,9 +247,12 @@ While you're logged in to your Pi, consider these additional steps for your setu

This allows you to wake the console screen saver using your mouse or touchscreen.

When you're done you can close your Pi login session by entering the `exit` command.

## Example

In this example we will build Qt's `minibrowser` for the Pi and run it without X11.
In this example we will cross-build Qt's `minibrowser` for the Pi and run it without X11.
The `minibrowser` example uses Qt's [WebEngine](https://doc.qt.io/qt-5.9/qtwebengine-overview.html) component which embeds the Chromium browser.

On the host, add Qt's host tools (for `qmake` etc.) to your PATH:

Expand Down
7 changes: 4 additions & 3 deletions build-qt5-rpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,11 @@ function build_rpi_deb {
{ log_info "Building list of package dependencies"; } 2> /dev/null
mount_sysroot_chroot
echo_off
local QT_RPI_DEPS="$(get_rpi_apt_nondev_dependencies)"
local DEPENDENCIES="$(get_rpi_apt_nondev_dependencies)"
echo_on
unmount_all
local DEPENDENCIES="${QT_RPI_DEPS} ${APT_PKGS_RPI_TOOLS}"

DEPENDENCIES+=" ${APT_PKGS_RPI_TOOLS}"

{ log_info "Creating \"/DEBIAN/control\""; } 2> /dev/null
cat <<EOF > "${DEB_PACKAGE_DIR}/DEBIAN/control"
Expand Down Expand Up @@ -355,7 +356,7 @@ Maintainer: ${CFG_DEB_MAINTAINER}
Priority: optional
Version: ${QT_VERSION}
Description: Host cross-tools of qt-everywhere-opensource for Raspberry Pi
Depends: build-essential,crossbuild-essential-armhf
Depends: build-essential, crossbuild-essential-armhf
EOF

{ log_info "Copying files into \"${DEB_PACKAGE_DIR}\""; } 2> /dev/null
Expand Down

0 comments on commit 8259ddb

Please sign in to comment.