Git Product home page Git Product logo

qtrpi's Introduction

QtRpi

Purpose

Offer an easy-to-use environment to cross-compile Qt application on a Raspberry Pi. This repo contains all the scripts needed to prepare a sysroot, cross-compile Qt and deploy Qt libraries to your Raspberry.

For more information, go to the wiki

Difference between init-qtrpi-minimal and init-qtrpi-full

  • init-qtrpi-minimal, the typical way: downloads ready-to-use Qt binaries for the Raspberry Pi and a minimal sysroot that we released on the download page
  • init-qtrpi-full, the custom way: compiles on your computer the Qt binaries for the Raspberry Pi to let you tweak the configuration, enhance the compilation by adding some missing Qt modules to QtRpi or add some specific third-party dependencies

Summary

init-qtrpi-minimal init-qtrpi-full
Raspbian image from raspberrypi.org
Toochain from the github project from the github project
Sysroot from qtrpi team generated from raspbian image
Qt binaries from qtrpi team compiled

Tutorial of init-qtrpi-minimal.sh

This tutorial will help you to:

  • Configure your host computer to be able to cross-compile Qt 5.7.0 applications for your Raspberry Pi 3
  • Deploy the pre-compiled Qt binaries on your Raspberry Pi
  • Cross-compile your application for a Raspberry Pi with the CLI or Qt Creator

Requirements

  • A 64-bit Linux host computer
  • A Raspberry Pi 3 with Raspbian Jessie (Raspbian Stretch is currently not supported!)

In this example, you already have an SSH access to your Raspberry Pi 3 at 192.168.1.12 with the user pi. The script will use sudo several times to install the packages on the board. You should add your SSH key in your Raspberry Pi. For example with ssh-copy-id:

ssh-copy-id [email protected]

Installation

https://www.youtube.com/watch?v=YYOjdwT5UuQ

First, install the dependencies:

sudo apt-get install curl g++ gdb-multiarch git realpath unzip zip

Open a terminal and follow the steps below:

git clone https://github.com/neuronalmotion/qtrpi.git
cd qtrpi
export QTRPI_QT_VERSION='5.7.0'
export QTRPI_TARGET_DEVICE='linux-rpi3-g++'
export QTRPI_TARGET_HOST='[email protected]'
./init-qtrpi-minimal.sh
./deploy-qtrpi.sh --prepare-rpi

Note: You can also export the environment variables in your .bashrc.

Usage in CLI

cd myproject
/opt/qtrpi/bin/qmake-qtrpi
make

You can now copy and execute the generated binary file on your Raspberry Pi

Note: You can also add /opt/qtrpi/bin/ to your PATH in your .bashrc and call qmake-qtrpi without the full path.

Usage in Qt Creator

How to build a Raspberry Pi 3 application from your desktop Qt Creator (step by step video): Cross-compile Qt applications for your Raspberry Pi 3 - 2. Configure Qt Creator

Tutorial of init-qtrpi-full.sh

How to add a new Qt module in QtRpi?

qtrpi's People

Contributors

guillaumelazar avatar synapticvoid avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.