You've already forked linuxdeploy-plugin-qt
mirror of
https://github.com/encounter/linuxdeploy-plugin-qt.git
synced 2026-03-30 11:19:03 -07:00
Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 43c69b060a | |||
| 5ade129a31 | |||
| 271d4ccfc9 | |||
| c260677976 | |||
| 63271d9a74 | |||
| a0eaec1cf8 | |||
| 87bc4b91ce | |||
| 4a6e8becc0 | |||
| 2898217d2c | |||
| 222c61461d | |||
| 49dc10da1e | |||
| 869b4dc7c4 | |||
| 5f8bb819cc | |||
| 44c1801c72 | |||
| 7bc917177d | |||
| f4450743ae | |||
| f292cc79ab | |||
| 56f4194d23 | |||
| 8c9040e5de | |||
| 7bc81ef559 | |||
| 4b43bc5d13 | |||
| 230cdb37c3 | |||
| c370ffac77 | |||
| 808c206559 | |||
| bae08f8592 | |||
| d245b4dc0f | |||
| 7bc321ec8e | |||
| 84797c0e05 | |||
| 84fc3d792f | |||
| 04d96e1c4f | |||
| 95529160f7 | |||
| d0e65fbef9 | |||
| 8f37917e42 | |||
| fcf096aca8 | |||
| fd3287b325 | |||
| dd2e714b32 | |||
| 752c5f199e | |||
| 70ca710c11 | |||
| 3907c42080 | |||
| 4d26eb6d1d | |||
| 6377a6f453 |
@@ -0,0 +1,99 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
appimage-x86_64:
|
||||
name: Build x86_64 AppImage on CentOS 7
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ARCH: x86_64
|
||||
BUILD_TYPE: centos7
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build AppImage in CentOS 7
|
||||
run: ci/build-centos7-docker.sh
|
||||
- name: Archive artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: AppImage x86_64
|
||||
path: linuxdeploy-plugin-qt*.AppImage*
|
||||
|
||||
appimage-i386:
|
||||
name: Build i386 AppImage on CentOS 7
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ARCH: i386
|
||||
BUILD_TYPE: centos7
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build AppImage in CentOS 7
|
||||
run: ci/build-centos7-docker.sh
|
||||
- name: Archive artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: AppImage i386
|
||||
path: linuxdeploy-plugin-qt*.AppImage*
|
||||
|
||||
# TODO: build and test on i386 as well!
|
||||
build-text-xenial-x86_64:
|
||||
name: Build and test on Ubuntu xenial x86_64 (no binaries uploaded)
|
||||
runs-on: ubuntu-16.04
|
||||
env:
|
||||
ARCH: x86_64
|
||||
BUILD_TYPE: test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: bash ci/install-dependencies.sh
|
||||
- name: Build and install patchelf
|
||||
run: bash -ex ci/install-patchelf.sh
|
||||
- name: Build and test AppImage
|
||||
run: |
|
||||
bash -ex ci/build.sh
|
||||
bash -xe ci/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
|
||||
|
||||
# TODO: build and test on i386 as well!
|
||||
build-text-bionic-x86_64:
|
||||
name: Build and test on Ubuntu bionic x86_64 (no binaries uploaded)
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
ARCH: x86_64
|
||||
BUILD_TYPE: test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: bash ci/install-dependencies.sh
|
||||
- name: Build and install patchelf
|
||||
run: bash -ex ci/install-patchelf.sh
|
||||
- name: Build and test AppImage
|
||||
run: |
|
||||
bash -ex ci/build.sh
|
||||
bash -xe ci/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
|
||||
|
||||
upload:
|
||||
name: Create release and upload artifacts
|
||||
needs:
|
||||
- appimage-x86_64
|
||||
- appimage-i386
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
- name: Inspect directory after downloading artifacts
|
||||
run: ls -alFR
|
||||
- name: Create release and upload artifacts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
|
||||
chmod +x pyuploadtool-x86_64.AppImage
|
||||
./pyuploadtool-x86_64.AppImage **/linuxdeploy-plugin-qt*.AppImage*
|
||||
@@ -1,3 +1,5 @@
|
||||
*build*/
|
||||
.idea/
|
||||
*.AppImage
|
||||
*.zsync
|
||||
*.swp
|
||||
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
language: cpp
|
||||
dist: xenial
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- name: Build x86_64 AppImage on CentOS 6
|
||||
services:
|
||||
- docker
|
||||
env: ARCH=x86_64 BUILD_TYPE=centos6
|
||||
script: travis/build-centos6-docker.sh
|
||||
after_success:
|
||||
- ls -lh
|
||||
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
|
||||
- if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
||||
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
- bash upload.sh linuxdeploy*.AppImage*
|
||||
|
||||
- name: Build i386 AppImage on CentOS 6
|
||||
services:
|
||||
- docker
|
||||
env: ARCH=i386 BUILD_TYPE=centos6
|
||||
script: travis/build-centos6-docker.sh
|
||||
after_success:
|
||||
- ls -lh
|
||||
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
|
||||
- if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
||||
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
- bash upload.sh linuxdeploy*.AppImage*
|
||||
|
||||
# TODO: build and test on i386 as well!
|
||||
- name: Build and test on Ubuntu xenial (no binaries uploaded)
|
||||
dist: xenial
|
||||
sudo: required
|
||||
env: ARCH=x86_64 BUILD_TYPE=test
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
sources:
|
||||
- sourceline: 'ppa:beineri/opt-qt-5.12.3-xenial'
|
||||
packages:
|
||||
- libmagic-dev
|
||||
- libjpeg-dev
|
||||
- libpng-dev
|
||||
- cimg-dev
|
||||
- automake # required for patchelf
|
||||
- gcc
|
||||
- g++
|
||||
# Packages below are only required by the test srcipt
|
||||
- qt512-meta-minimal
|
||||
- qt512declarative
|
||||
- qt512webengine
|
||||
- mesa-common-dev
|
||||
- libgl1-mesa-dev # <-- that's for xenial to provide the x86_64-linux-gnu/libGL.so symlink
|
||||
- # libglvnd-dev # <-- that's for bionic to provide aforementioned symlink
|
||||
install:
|
||||
- git clone https://github.com/NixOS/patchelf.git -b 0.8
|
||||
- cd patchelf
|
||||
- ./bootstrap.sh
|
||||
- if [ "$ARCH" == "i386" ]; then export EXTRA_CONFIGURE_ARGS=("--build=i686-pc-linux-gnu" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"); fi
|
||||
- ./configure --prefix=/usr "${EXTRA_CONFIGURE_ARGS[@]}"
|
||||
- make -j$(nproc)
|
||||
- sudo make install
|
||||
- cd ..
|
||||
- rm -rf patchelf
|
||||
script:
|
||||
- bash -xe travis/build.sh
|
||||
- bash -xe travis/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
|
||||
|
||||
branches:
|
||||
except:
|
||||
- # Do not build tags that we create when we upload to GitHub Releases
|
||||
- /^(?i:continuous)$/
|
||||
@@ -1,6 +1,6 @@
|
||||
# linuxdeploy-plugin-qt
|
||||
|
||||
Plugin for linuxdeploy to bundle Qt dependencies of applications and libraries.
|
||||
Plugin for linuxdeploy to bundle Qt dependencies of applications and libraries. It supports the Qt versions 5 and 6.
|
||||
|
||||
|
||||
## About
|
||||
@@ -59,5 +59,5 @@ Just like all linuxdeploy plugins, the Qt plugin's behavior can be configured so
|
||||
- `$EXTRA_QT_PLUGINS=pluginA;pluginB`: Plugins to deploy even if not found automatically by linuxdeploy-plugin-qt
|
||||
|
||||
QML related:
|
||||
- `$QML_SOURCES_PATHS`: directory containing the application's QML files -- useful/needed if QML files are "baked" into the binaries
|
||||
- `$QML_MODULES_PATHS`: extra directories containing imported QML files (normally doesn't need to be specified)
|
||||
- `$QML_SOURCES_PATHS`: directory containing the application's QML files — useful/needed if QML files are "baked" into the binaries. `$QT_INSTALL_QML` is prepended to this list internally.
|
||||
- `$QML_MODULES_PATHS`: extra directories containing imported QML files (normally doesn't need to be specified).
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
FROM centos:6
|
||||
FROM centos:7
|
||||
|
||||
RUN yum install -y centos-release-scl-rh && \
|
||||
yum install -y devtoolset-7 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-devel libjpeg-devel libpng-devel nano git && \
|
||||
wget https://artifacts.assassinate-you.net/artifactory/cmake-centos6/cmake-v3.15.3-x86_64.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
RUN yum install -y centos-release-scl && \
|
||||
yum install -y devtoolset-8 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-devel libjpeg-devel libpng-devel nano git file gcc-c++ && \
|
||||
wget https://artifacts.assassinate-you.net/prebuilt-cmake/cmake-v3.19.1-centos7-x86_64.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
|
||||
ENV ARCH=x86_64
|
||||
COPY entrypoint.sh /
|
||||
SHELL ["/entrypoint.sh", "bash", "-x", "-c"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
RUN yum install -y gcc-c++ && \
|
||||
git clone https://github.com/NixOS/patchelf.git && \
|
||||
RUN git clone https://github.com/NixOS/patchelf.git && \
|
||||
pushd patchelf && \
|
||||
# cannot use -b since it's not supported in really old versions of git
|
||||
git checkout 0.8 && \
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM i386/centos:6
|
||||
FROM i386/centos:7
|
||||
|
||||
SHELL ["/bin/bash", "-x", "-c"]
|
||||
|
||||
@@ -9,8 +9,8 @@ RUN sed -i 's/$basearch/i386/g' /etc/yum.repos.d/CentOS-Base.repo
|
||||
# thanks CloudLinux, you're really helping us poor AppImage creators seeking for maximum compatibility by providing devtoolset i386 builds
|
||||
RUN yum install -y yum-utils && \
|
||||
rpm --import https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux && \
|
||||
yum-config-manager --add-repo https://www.repo.cloudlinux.com/cloudlinux/6/sclo/devtoolset-7/i386/ && \
|
||||
yum install -y devtoolset-7 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-devel libjpeg-devel libpng-devel nano git
|
||||
yum-config-manager --add-repo https://www.repo.cloudlinux.com/cloudlinux/7/sclo/devtoolset-8/i386/ && \
|
||||
yum install -y devtoolset-8 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-evel libjpeg-devel libpng-devel nano git make file gcc-c++
|
||||
|
||||
# the shell wrapper takes care of enabling devtoolset and running a shell properly
|
||||
# unfortunately this is the easiest and most solid workaround to the limitations of the scl command
|
||||
@@ -19,7 +19,7 @@ ENV ARCH=i386
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
SHELL ["/entrypoint.sh", "bash", "-x", "-c"]
|
||||
|
||||
RUN wget https://artifacts.assassinate-you.net/artifactory/cmake-centos6/cmake-v3.15.3-i386.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
RUN wget https://artifacts.assassinate-you.net/prebuilt-cmake/cmake-v3.19.1-centos7-i386.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
|
||||
RUN git clone https://github.com/NixOS/patchelf.git && \
|
||||
pushd patchelf && \
|
||||
@@ -5,8 +5,8 @@ set -xe
|
||||
old_cwd=$(readlink -f .)
|
||||
here=$(readlink -f $(dirname "$0"))
|
||||
|
||||
DOCKERFILE="$here"/Dockerfile.centos6
|
||||
IMAGE=linuxdeploy-build-centos6
|
||||
DOCKERFILE="$here"/Dockerfile.centos7
|
||||
IMAGE=linuxdeploy-build-centos7
|
||||
|
||||
if [ "$ARCH" == "i386" ]; then
|
||||
DOCKERFILE="$DOCKERFILE"-i386
|
||||
@@ -15,4 +15,4 @@ fi
|
||||
|
||||
(cd "$here" && docker build -f "$DOCKERFILE" -t "$IMAGE" .)
|
||||
|
||||
docker run --rm -it -v "$here"/..:/ws:ro -v "$old_cwd":/out -e CI=1 -e OUTDIR_OWNER=$(id -u) "$IMAGE" /bin/bash -xe -c "cd /out && /ws/travis/build-centos6.sh"
|
||||
docker run --rm -i -v "$here"/..:/ws:ro -v "$old_cwd":/out -e CI=1 -e OUTDIR_OWNER=$(id -u) "$IMAGE" /bin/bash -xe -c "cd /out && /ws/ci/build-centos7.sh"
|
||||
@@ -0,0 +1,27 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
ubuntu_release="$(cat /etc/*release | grep -E '^DISTRIB_CODENAME=' | cut -d= -f2-)"
|
||||
|
||||
sudo add-apt-repository -y ppa:beineri/opt-qt-5.14.2-"$ubuntu_release"
|
||||
sudo apt-get update
|
||||
|
||||
packages=(
|
||||
libmagic-dev libjpeg-dev libpng-dev cimg-dev mesa-common-dev
|
||||
|
||||
# dependencies of patchelf
|
||||
automake gcc g++
|
||||
|
||||
# up to date Qt with required plugins
|
||||
qt514-meta-minimal qt514declarative qt514webengine
|
||||
)
|
||||
|
||||
if [[ "$ubuntu_release" == "xenial" ]]; then
|
||||
packages+=(libgl1-mesa-dev)
|
||||
else
|
||||
packages+=(libglvnd-dev)
|
||||
fi
|
||||
|
||||
sudo apt-get install -y "${packages[@]}"
|
||||
@@ -0,0 +1,36 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [[ "$CI" == "" ]]; then
|
||||
echo "Error: this script is supposed to be run in a (disposable) CI environment"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [[ "$ARCH" == "" ]]; then
|
||||
echo "Usage: env ARCH=... bash $0"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
build_dir="$(mktemp -d /tmp/patchelf-build-XXXXX)"
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$build_dir"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
pushd "$build_dir"
|
||||
|
||||
git clone https://github.com/NixOS/patchelf.git -b 0.8 .
|
||||
|
||||
./bootstrap.sh
|
||||
|
||||
EXTRA_CONFIGURE_ARGS=()
|
||||
|
||||
if [ "$ARCH" == "i386" ]; then
|
||||
export EXTRA_CONFIGURE_ARGS=("--build=i686-pc-linux-gnu" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32")
|
||||
fi
|
||||
|
||||
./configure --prefix=/usr "${EXTRA_CONFIGURE_ARGS[@]}"
|
||||
|
||||
make -j$(nproc)
|
||||
|
||||
sudo make install
|
||||
+1
-1
Submodule lib/linuxdeploy updated: 6bc354bacb...c45cd46319
+2
-1
@@ -1,4 +1,5 @@
|
||||
add_library(linuxdeploy-plugin-qt_util OBJECT util.cpp util.h)
|
||||
# TODO: CMake <= 3.7 (at least!) doesn't allow for using OBJECT libraries with target_link_libraries
|
||||
add_library(linuxdeploy-plugin-qt_util STATIC util.cpp util.h)
|
||||
target_include_directories(linuxdeploy-plugin-qt_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(linuxdeploy-plugin-qt_util linuxdeploy_core args)
|
||||
|
||||
|
||||
@@ -16,9 +16,12 @@ set(CLASSES
|
||||
QmlPluginsDeployer
|
||||
Qt3DPluginsDeployer
|
||||
GamepadPluginsDeployer
|
||||
PrintSupportPluginsDeployer
|
||||
TextToSpeechPluginsDeployer
|
||||
)
|
||||
|
||||
add_library(deployers OBJECT)
|
||||
# TODO: CMake <= 3.7 (at least!) doesn't allow for using OBJECT libraries with target_link_libraries
|
||||
add_library(deployers STATIC)
|
||||
|
||||
target_link_libraries(deployers PUBLIC linuxdeploy_core linuxdeploy-plugin-qt_util)
|
||||
|
||||
|
||||
@@ -57,25 +57,26 @@ bool PlatformPluginsDeployer::deploy() {
|
||||
// either loading succeeds, then the system Gtk shall be used anyway, otherwise loading fails and Qt will fall
|
||||
// back to the default UI theme
|
||||
// we don't care whether this works (it's an experimental feature), therefore we ignore the return values
|
||||
const auto libqgtk2Filename = "libqgtk2.so";
|
||||
const auto libqgtk2styleFilename = "libqgtk2style.so";
|
||||
const auto libqgtk2Path = platformThemesPath / "libqgtk2.so";
|
||||
const auto libqgtk3Path = platformThemesPath / "libqgtk3.so";
|
||||
const auto libqxdgPath = platformThemesPath / "libqxdgdesktopportal.so";
|
||||
|
||||
const auto libqgtk2Path = platformThemesPath / libqgtk2Filename;
|
||||
const auto libqgtk2stylePath = stylesPath / libqgtk2styleFilename;
|
||||
|
||||
// we need to check whether the files exist at least, otherwise the deferred deployment operation fails
|
||||
if (bf::is_regular_file(libqgtk2Path)) {
|
||||
ldLog() << "Attempting to deploy" << libqgtk2Filename << "found at path" << libqgtk2Path << std::endl;
|
||||
appDir.deployFile(libqgtk2Path, platformThemesDestination);
|
||||
} else {
|
||||
ldLog() << "Could not find" << libqgtk2Filename << "on system, skipping deployment" << std::endl;
|
||||
for (const auto &file : {libqgtk2Path, libqgtk3Path, libqxdgPath}) {
|
||||
// we need to check whether the files exist at least, otherwise the deferred deployment operation fails
|
||||
if (bf::is_regular_file(file)) {
|
||||
ldLog() << "Attempting to deploy" << file.filename() << "found at path" << file.parent_path() << std::endl;
|
||||
appDir.deployFile(file, platformThemesDestination);
|
||||
} else {
|
||||
ldLog() << "Could not find" << file.filename() << "on system, skipping deployment" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
const auto libqgtk2stylePath = stylesPath / "libqgtk2style.so";
|
||||
if (bf::is_regular_file(libqgtk2stylePath)) {
|
||||
ldLog() << "Attempting to deploy" << libqgtk2styleFilename << "found at path" << libqgtk2stylePath << std::endl;
|
||||
ldLog() << "Attempting to deploy" << libqgtk2stylePath.filename() << "found at path" << libqgtk2stylePath << std::endl;
|
||||
appDir.deployFile(libqgtk2stylePath, stylesDestination);
|
||||
} else {
|
||||
ldLog() << "Could not find" << libqgtk2styleFilename << "on system, skipping deployment" << std::endl;
|
||||
ldLog() << "Could not find" << libqgtk2stylePath.filename() << "on system, skipping deployment" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,12 +5,15 @@
|
||||
#include "BearerPluginsDeployer.h"
|
||||
#include "GamepadPluginsDeployer.h"
|
||||
#include "MultimediaPluginsDeployer.h"
|
||||
#include "PrintSupportPluginsDeployer.h"
|
||||
#include "PositioningPluginsDeployer.h"
|
||||
#include "QmlPluginsDeployer.h"
|
||||
#include "Qt3DPluginsDeployer.h"
|
||||
#include "SqlPluginsDeployer.h"
|
||||
#include "SvgPluginsDeployer.h"
|
||||
#include "TextToSpeechPluginsDeployer.h"
|
||||
#include "WebEnginePluginsDeployer.h"
|
||||
#include "XcbglIntegrationPluginsDeployer.h"
|
||||
|
||||
using namespace linuxdeploy::plugin::qt;
|
||||
using namespace linuxdeploy::core::appdir;
|
||||
@@ -21,58 +24,68 @@ PluginsDeployerFactory::PluginsDeployerFactory(AppDir& appDir,
|
||||
bf::path qtLibexecsPath,
|
||||
bf::path qtInstallQmlPath,
|
||||
bf::path qtTranslationsPath,
|
||||
bf::path qtDataPath) : appDir(appDir),
|
||||
bf::path qtDataPath,
|
||||
int qtMajorVersion) : appDir(appDir),
|
||||
qtPluginsPath(std::move(qtPluginsPath)),
|
||||
qtLibexecsPath(std::move(qtLibexecsPath)),
|
||||
qtInstallQmlPath(std::move(qtInstallQmlPath)),
|
||||
qtTranslationsPath(std::move(qtTranslationsPath)),
|
||||
qtDataPath(std::move(qtDataPath)) {}
|
||||
qtDataPath(std::move(qtDataPath)),
|
||||
qtMajorVersion(qtMajorVersion) {}
|
||||
|
||||
std::shared_ptr<PluginsDeployer> PluginsDeployerFactory::getInstance(const std::string& moduleName) {
|
||||
std::vector<std::shared_ptr<PluginsDeployer>> PluginsDeployerFactory::getDeployers(const std::string& moduleName) {
|
||||
if (moduleName == "gui") {
|
||||
return getInstance<PlatformPluginsDeployer>(moduleName);
|
||||
return {getInstance<PlatformPluginsDeployer>(moduleName), getInstance<XcbglIntegrationPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "opengl" || moduleName == "gui" || moduleName == "xcbqpa") {
|
||||
return getInstance<PlatformPluginsDeployer>(moduleName);
|
||||
if (moduleName == "opengl" || moduleName == "xcbqpa") {
|
||||
return {getInstance<XcbglIntegrationPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "network") {
|
||||
return getInstance<BearerPluginsDeployer>(moduleName);
|
||||
if (moduleName == "network" && qtMajorVersion < 6) {
|
||||
return {getInstance<BearerPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "svg") {
|
||||
return getInstance<SvgPluginsDeployer>(moduleName);
|
||||
return {getInstance<SvgPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "sql") {
|
||||
return getInstance<SqlPluginsDeployer>(moduleName);
|
||||
return {getInstance<SqlPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "positioning") {
|
||||
return getInstance<PositioningPluginsDeployer>(moduleName);
|
||||
return {getInstance<PositioningPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "multimedia") {
|
||||
return getInstance<MultimediaPluginsDeployer>(moduleName);
|
||||
return {getInstance<MultimediaPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "webenginecore") {
|
||||
return getInstance<WebEnginePluginsDeployer>(moduleName);
|
||||
return {getInstance<WebEnginePluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "qml") {
|
||||
return getInstance<QmlPluginsDeployer>(moduleName);
|
||||
return {getInstance<QmlPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "3dquickrender") {
|
||||
return getInstance<Qt3DPluginsDeployer>(moduleName);
|
||||
if (moduleName == "3dquickrender" || moduleName == "3drender") {
|
||||
return {getInstance<Qt3DPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "gamepad") {
|
||||
return getInstance<GamepadPluginsDeployer>(moduleName);
|
||||
return {getInstance<GamepadPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "printsupport") {
|
||||
return {getInstance<PrintSupportPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
if (moduleName == "texttospeech") {
|
||||
return {getInstance<TextToSpeechPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
// fallback
|
||||
return getInstance<BasicPluginsDeployer>(moduleName);
|
||||
return {getInstance<BasicPluginsDeployer>(moduleName)};
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace linuxdeploy {
|
||||
const boost::filesystem::path qtInstallQmlPath;
|
||||
const boost::filesystem::path qtTranslationsPath;
|
||||
const boost::filesystem::path qtDataPath;
|
||||
const int qtMajorVersion;
|
||||
|
||||
template<typename T>
|
||||
std::shared_ptr<PluginsDeployer> getInstance(const std::string& moduleName) {
|
||||
@@ -45,9 +46,10 @@ namespace linuxdeploy {
|
||||
boost::filesystem::path qtLibexecsPath,
|
||||
boost::filesystem::path qtInstallQmlPath,
|
||||
boost::filesystem::path qtTranslationsPath,
|
||||
boost::filesystem::path qtDataPath);
|
||||
boost::filesystem::path qtDataPath,
|
||||
int qtMajorVersion);
|
||||
|
||||
std::shared_ptr<PluginsDeployer> getInstance(const std::string& moduleName);
|
||||
std::vector<std::shared_ptr<PluginsDeployer>> getDeployers(const std::string& moduleName);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// library headers
|
||||
#include <linuxdeploy/core/log.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
// local headers
|
||||
#include "PrintSupportPluginsDeployer.h"
|
||||
|
||||
using namespace linuxdeploy::plugin::qt;
|
||||
using namespace linuxdeploy::core::log;
|
||||
|
||||
namespace bf = boost::filesystem;
|
||||
|
||||
bool PrintSupportPluginsDeployer::deploy() {
|
||||
// calling the default code is optional, but it won't hurt for now
|
||||
if (!BasicPluginsDeployer::deploy())
|
||||
return false;
|
||||
|
||||
ldLog() << "Deploying printsupport plugins" << std::endl;
|
||||
|
||||
for (bf::directory_iterator i(qtPluginsPath / "printsupport"); i != bf::directory_iterator(); ++i) {
|
||||
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/printsupport/"))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user