• Stars
    star
    160
  • Rank 234,703 (Top 5 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Collection of scripts to build Qt application in command line environment

QT-CI

This project collects a set of script for building Qt application for Android/iOS in command line environment.

Build Status

Check .travis.yml to see how it works. It will demonstrate how to build an apk file using QT-CI scripts.

Installation

Since this project is a collection of scripts, and the script in the bin folder does not have any dependence on each other. It is not necessary to clone/download the whole repository into your build environment. You may simply copy the script you need from this repository.

recipes/install-qt

To automatically install Qt, you can just download 2 scripts and grant them permission for execution.

"recipes/install-qt" "bin/extract-qt-installer"

Then just run script "recipes/install-qt" with the desired version of Qt Example:

bash install-qt 5.9.4

Environment variables

QT_CI_PACKAGES - packages to install. You can check available packages if set VERBOSE to 1.

Example:

export VERBOSE=1
export QT_CI_PACKAGES=qt,qt.594,qt.594.gcc_64,qt.594.doc.qtvirtualkeyboard

Setup

git clone https://github.com/benlau/qtci.git

source qtci/path.env #Add qtci/bin and qtci/recipes to $PATH

Script

(1) bin/extract-qt-installer

Usage

    extract-qt-installer [--disable-progress-report] qt-installer output_path
    extract-qt-installer --list-packages qt-installer

Extract Qt from the installer to the target path (for Qt 5.5 or above). If --list-packages is given, it will show the available packages from the installer and terminate immediately.

Example:

extract-qt-installer qt-opensource-linux-x64-android-5.5.1.run ~/Qt

Remarks: The installation path must be absolute path

Environment Variables

VERBOSE [Optional] Set to "true" will enable VERBOSE output
QT_CI_PACKAGES [Optional] Select the components to be installed instead of using default (eg. QT_CI_PACKAGES="qt.59.gcc_64")
QT_CI_LOGIN [Optional] The login name 
QT_CI_PASSWORD [Optional] The password of login

The arguments and environment required could be different due to the installer changes. Check the recipes folder or the wiki of known issues to find out the correct setting.

(2) bin/extract-ifw

Extract installer of "Qt installer framework" to the target path

Example:

extract-ifw qt-installer-framework-opensource-1.5.0-x64.run ~/QtIfw

(3) bin/install-android-sdk

Download and install Android SDK

Example:

install-android-sdk platform-tool,build-tools-20.0.0,android-19

(4) bin/build-android-gradle-project

Build a Qt Android project and sign the APK

Usage:

build-android-gradle-project project.pro

Required Environment Variables

QT_HOME [Required] The home directory of installed Qt. (e.g., ~/Qt/5.7)
KEYSTORE [Optional] The location of keystore. If it is set, it will be used to sign the created apk
KEYALIAS [Optional] The alias of the keystore
KEYPASS  [Optional] The password of keystore.
    ANDROID_TARGET_SDK_VERSION [Optional] Target Android SDK version. The default value is "19"

(5) bin/increase-android-version-code

Usage

increase-android-version-code AndroidManifest.xml

Given an AndroidManifest.xml file, it will increase the value of the versionCode field by one.

(6) bin/run-unittests

Usage

run-unittests project.pro

Build and run a unit test project in the current folder. If qpm.json were found, it would call qpm install first.

Recipes

In the folder "recipes", it contains a set of script that could download and install specific Qt toolchains for a different environment. (Include Android)

Please feel free to modify and submit a new recipe.

Example

apt-get install openjdk-8-jdk p7zip

source path.env #Add $PWD/bin and $PWD/recipes to $PATH

#Change to the installation path

qt-5.5.1-android-19 # Install Qt 5.5.1 and Android SDK

source qt-5.5.1-android-19.env # Add installed Qt path to $PATH

Reference

  1. Continuous distribution for Qt applications on desktop and mobile
  2. Andrew's Articles - Continuous deployment for Qt applications

Related Projects

  1. benlau/quickpromise - Promise library for QML
  2. benlau/quickcross - QML Cross Platform Utility Library
  3. benlau/qsyncable - Synchronize data between models
  4. benlau/testable - QML Unit Test Utilities
  5. benlau/quickflux - Message Dispatcher / Queue for Qt/QML
  6. benlau/biginteger - QML BigInteger library

More Repositories

1

quickflux

A Flux implementation for QML
C++
315
star
2

asyncfuture

Use QFuture like a Promise object
C++
241
star
3

quickandroid

QML Theme and Component Library for Android
QML
234
star
4

ihatecontentfarms

Content Farm Blocker Chrome Extension / 封鎖內容農場Chrome插件
JavaScript
187
star
5

quickpromise

Quick Promise - QML Promise Library
QML
174
star
6

quickios

QML Theme and Component Library for iOS
QML
164
star
7

qsyncable

A solution of nested Json List Model
C++
112
star
8

androidnative.pri

Calling Android functions from Qt without using JNI
Java
101
star
9

sparkqml

SparkQML - A QML Document Viewer for State and Transition Preview
JavaScript
100
star
10

nactor

Node.js actor model framework for game
JavaScript
73
star
11

testable

QT/QML Test Runner and Utilities
C++
55
star
12

quickfuture

Using QFuture in QML
C++
51
star
13

fontawesome.pri

Using FontAwesome in QML
QML
51
star
14

quickcross

QML Cross Platform Utility Library
C++
49
star
15

dquest

DQuest - The C++ ORM (Object-relational mapping) for Qt framework.
C++
41
star
16

qtshell

Manipulate files by a shell command style API
C++
31
star
17

qredux

Redux for QML
JavaScript
25
star
18

qtandroidexamplecode

Example code of Qt for Android
QMake
19
star
19

sketchqml

Export to a QML in SketchApp
JavaScript
19
star
20

biginteger

QML BigInteger library
C++
18
star
21

underline

A C++ utility library provides useful functional programming helpers like lodash.js
C++
18
star
22

joplin-plugin-dddot

A Joplin plugin to provide a set of tools like recent notes, shortcuts, scratchpad, and .... in a single sidebar.
TypeScript
17
star
23

ipylivebash

Run shell script in Jupyter with live output
TypeScript
11
star
24

memoinjo

Stick memo on any website
JavaScript
10
star
25

viewstack.pri

ViewStack.pri - A stateless StackView
QML
9
star
26

tinyboy

Tinyboy - A 3D printer designed for education
CSS
8
star
27

quickjsm

A QML Port of Javascript State Machine Library
JavaScript
8
star
28

dualless

Dualless is a poor man's dual monitor solution , a extension for Chrome.
JavaScript
8
star
29

quickflux-project-template

Project template using QuickFlux with unit tests
C++
7
star
30

material2

Light Weight Material Design Components based on QQC2
QML
7
star
31

junkcode

Junkcode for demonstration
QML
7
star
32

qpm-qt-creator-project-template

Qt Creator Project Templates with qpm
C++
6
star
33

hotloader.pri

Hot Reload QML Files
C++
6
star
34

testrunner

Qt Test Runner - A tiny tool to execute multiple QTestLib application and combine the testing result into a summary report.
C++
4
star
35

jupyter-for-devops-demo

A demo project to show how to use Jupyter for DevOps
Jupyter Notebook
4
star
36

joplin-garden-worker

Export notes from Joplin to build a digital garden website
JavaScript
4
star
37

gaescripts

A collection of scripts for GAE application maintenance
Python
3
star
38

qtsdkdocimg

Collection of QtSDK Docker Image Build Scripts
Shell
3
star
39

linne-analyzer

Python
3
star
40

kifier

The missing tool to turn your Web 2.0 application into Wiki
JavaScript
3
star
41

openstandkit

Open Design Portable Standing Desk
3
star
42

qml-rebase-source

A script to update the source attributes within a QML file
JavaScript
2
star
43

snapcat

AngelHack Project
Python
2
star
44

bnloadingpromise

Angular Loading Promise
JavaScript
2
star
45

qtbugstatus

Qt Bug Status Tracker
JavaScript
2
star
46

joplin-plugin-tag-links

Insert tag links to Joplin note
TypeScript
2
star
47

moblin-image-creator.jaunty

Moblin Image Creator for Jaunty
Python
2
star
48

asyncapi-live-reload-demo

Edit asyncapi.yml then generate and reload the HTML doc automatically
2
star
49

sparkqml-website

CSS
1
star
50

sparkqml-builder

Shell
1
star
51

blockwork

A Project in EOS Hackathon
JavaScript
1
star
52

react-redux-webpack-mocha-starter-kit

A starter project for React Redux
JavaScript
1
star
53

l

App Link to Universal Web Link
1
star