Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
plfiorini committed Apr 5, 2018
2 parents b1b7cfd + 1dfc41f commit 8b4c22c
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 27 deletions.
24 changes: 5 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,13 @@ env:
# DEPLOY_HOST
- secure: "0L8BKnozSiwI5VMRAL6QAQ6gwVIrnBhoYq6NkACbIOchkQShZlQH9p/4/2A9/6Wu4pTrB7eTeR1JQahmjwAqUFoMfpZm+LCBZGnQpHnZd6ZgT1rcgd1MAWR4PBhoeHGbTBly00Ez9BlE5nwUxwV7XszVxbEab5tzP52JThetf+tOoL1FjUyYb3/YpPOZzlQ2gh1BeBGi8PE29i06Sa5vlGdTtJXBZmHqn2IZ2bDCNFaetI9yr6HwkxvmuhQew/vv4bsSuUidfgdZrwPodJMo0aO78INWcIl8qleHaaKvVw5sRpdk3qNPqSW517/FHMG4jDHimDnX4s2aWaq+iaVuRc4VmeQ4Ebp5Zjlf9qVuhkOCUbCy0ojrEROsqYy/oVfAH99O9lvUDBl8Q6taFJeBwhZAdDMUttqQdRSaDEspFjOk7zDoeCLN4DFzOElW1DT1XYUXUvE+WIZci5zTyhNRp6WSIKHJKHjltTqa6KscKlmWUYvroKh80SdUrjNxibM/PVl5PlFRSeXAxq3s9bC/8oNUj0CbhZBqzIP9JMbCTrjX5KnO4BPULKo94pi4LBzGtzQNs6qQ/K1srH4FsB1M9RxrD3Uqr3VcU4XbLCRLGB5rZR6Jph0IOYiRUKgQkxHnsS6mXqIizCCxDuVR6MdSvnyDcy5PuEcAEG3tC//JFnw="

arch:
packages:
- qbs
- qt5-declarative
- qt5-quickcontrols2
- qt5-graphicaleffects
- qt5-wayland
- qt5-svg
- qt5-doc
- qt5-tools
- extra-cmake-modules
- xorg-server-xvfb
#- clazy-git
script:
- qbs-setup-toolchains --detect
- qbs-setup-qt /usr/bin/qmake-qt5 qt5
- qbs config profiles.qt5.baseProfile ${CC}
- eval `dbus-launch --sh-syntax` && xvfb-run -a -s "-screen 0 800x600x24" qbs build -d build -j $(nproc) --all-products profile:qt5 modules.qbs.installRoot:/ modules.lirideployment.prefix:/usr modules.lirideployment.qmlDir:/usr/lib/qt/qml projects.Fluid.useSystemQbsShared:false projects.Fluid.autotestEnabled:true projects.Fluid.deploymentEnabled:true
branches:
except:
- /^(?i:continuous)$/

script:
- "curl -s https://raw.githubusercontent.com/lirios/repotools/develop/travis/docker-travis.sh | bash"
- wget -c https://raw.githubusercontent.com/lirios/infra-travis/master/run
- bash run ./.travis/build.sh

deploy:
- provider: script
Expand Down
28 changes: 28 additions & 0 deletions .travis/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e

source /usr/local/share/liri-travis/functions

# Configure qbs
travis_start "qbs_setup"
msg "Setup qbs..."
qbs setup-toolchains --detect
qbs setup-qt $(which qmake) travis-qt5
qbs config profiles.travis-qt5.baseProfile $CC
travis_end "qbs_setup"

# Build
travis_start "build"
msg "Build..."
dbus-run-session -- \
xvfb-run -a -s "-screen 0 800x600x24" \
qbs -d build -j $(nproc) --all-products profile:travis-qt5 \
modules.lirideployment.prefix:/usr \
modules.lirideployment.libDir:/usr/lib/x86_64-linux-gnu \
modules.lirideployment.qmlDir:/usr/lib/x86_64-linux-gnu/qt5/qml \
modules.lirideployment.pluginsDir:/usr/lib/x86_64-linux-gnu/qt5/plugins \
projects.Fluid.autotestEnabled:true \
projects.Fluid.useSystemQbsShared:false \
projects.Fluid.deploymentEnabled:true
travis_end "build"
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Qt >= 5.10.0 with at least the following modules is required:

The following modules and their dependencies are required:

* [qbs >= 1.9.0](http://code.qt.io/cgit/qbs/qbs.git)
* [qbs-shared >= 1.2.0](https://github.com/lirios/qbs-shared.git)
* [qbs](http://code.qt.io/cgit/qbs/qbs.git) >= 1.9.0
* [qbs-shared](https://github.com/lirios/qbs-shared.git) >= 1.2.0

## Build

Expand Down Expand Up @@ -85,6 +85,7 @@ See also [System-wide installation](#system-wide-installation).
You can also append the following options to the last line:

* `projects.Fluid.withDemo:false`: Do not build the demo app.
* `projects.Fluid.withQmlModules:false`: Do not build QML modules.
* `projects.Fluid.withDocumentation:false`: Do not build the documentation.
* `projects.Fluid.useStaticAnalyzer:true` to enable the Clang static analyzer.
* `projects.Fluid.useSystemQbsShared:true` to use a system-wide installation of qbs-shared
Expand Down
1 change: 1 addition & 0 deletions fluid.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Project {

property bool withDocumentation: true
property bool withDemo: true
property bool withQmlModules: true

property bool installIcons: true

Expand Down
16 changes: 16 additions & 0 deletions src/demo/demo.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ Project {
qbs.installSourceBase: destinationDirectory
fileTagsFilter: isBundle ? ["bundle.content"] : product.type
}

Group {
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("darwin")
name: "Desktop File"
files: ["io.liri.Fluid.Demo.desktop"]
qbs.install: true
qbs.installDir: lirideployment.applicationsDir
}

Group {
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("darwin")
name: "AppStream Metadata"
files: ["io.liri.Fluid.Demo.appdata.xml"]
qbs.install: true
qbs.installDir: lirideployment.appDataDir
}
}

/*
Expand Down
20 changes: 20 additions & 0 deletions src/demo/io.liri.Fluid.Demo.appdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>io.liri.Fluid.Demo.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>Fluid Demo</name>
<summary>Demonstrate Fluid QML modules</summary>
<description>
<p>
Fluid is an implementation of the Material Design language for
Qt developers.
</p>
<p>
This app shows what Fluid has to offer.
</p>
</description>
<!-- TODO: Add screenshots -->
<url type="homepage">https://liri.io</url>
<update_contact>info@liri.io</update_contact>
</component>
7 changes: 7 additions & 0 deletions src/demo/io.liri.Fluid.Demo.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=Fluid Demo
Comment=Demonstrate Fluid modules
Exec=fluid-demo
Terminal=false
Type=Application
Categories=X-Liri;Qt;Development;
1 change: 1 addition & 0 deletions src/demo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ int main(int argc, char *argv[])
QQuickStyle::setStyle(QLatin1String("Material"));

QGuiApplication app(argc, argv);
app.setDesktopFileName(QLatin1String("io.liri.Fluid.Demo.desktop"));
app.setQuitOnLastWindowClosed(true);

// @uri Fluid.Demo
Expand Down
12 changes: 6 additions & 6 deletions src/deployment/tarball.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ InstallPackage {
archiver.type: "tar"
archiver.outputDirectory: project.buildDirectory

Depends { name: "fluid-demo" }
Depends { name: "fluidcontrolsplugin" }
Depends { name: "fluidcoreplugin" }
Depends { name: "fluideffectsplugin" }
Depends { name: "fluidlayoutsplugin" }
Depends { name: "fluidtemplatesplugin" }
Depends { name: "fluid-demo"; required: project.withDemo }
Depends { name: "fluidcontrolsplugin"; required: project.withQmlModules }
Depends { name: "fluidcoreplugin"; required: project.withQmlModules }
Depends { name: "fluideffectsplugin"; required: project.withQmlModules }
Depends { name: "fluidlayoutsplugin"; required: project.withQmlModules }
Depends { name: "fluidtemplatesplugin"; required: project.withQmlModules }
}
1 change: 1 addition & 0 deletions src/imports/imports.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import qbs 1.0

Project {
name: "QML Plugins"
condition: project.withQmlModules

references: [
"core/core.qbs",
Expand Down
1 change: 1 addition & 0 deletions tests/auto/auto.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import qbs.FileInfo

Project {
name: "Autotests"
condition: project.autotestEnabled && project.withQmlImports

references: [
"controls/controls.qbs",
Expand Down

0 comments on commit 8b4c22c

Please sign in to comment.