41 Commits

Author SHA1 Message Date
TheAssassin 43c69b060a Update README.md 2020-12-29 02:42:51 +01:00
TheAssassin 5ade129a31 Merge pull request #85 from mnesarco/master
Added Qt6 support
2020-12-29 02:36:08 +01:00
Frank D. Martinez M 271d4ccfc9 Fix CamelCase 2020-12-28 18:17:36 -05:00
Frank D. Martinez M c260677976 Remove default qt version value 2020-12-27 17:59:24 -05:00
Frank D. Martinez M 63271d9a74 Throw exception if Qt version is unsupported 2020-12-27 17:56:02 -05:00
Frank D. Martinez M a0eaec1cf8 Fix c++ style 2020-12-27 17:34:29 -05:00
Frank D. Martinez M 87bc4b91ce Update README 2020-12-27 16:25:51 -05:00
Frank D. Martinez M 4a6e8becc0 Autodetect Qt version 2020-12-27 16:20:05 -05:00
Frank D. Martinez M 2898217d2c Added Qt6 support 2020-12-25 20:00:42 -05:00
TheAssassin 222c61461d Update CMake binaries URLs 2020-12-11 13:01:46 +01:00
TheAssassin 49dc10da1e Switch to GitHub actions 2020-12-11 13:01:46 +01:00
TheAssassin 869b4dc7c4 Update ignore patterns 2020-12-11 13:01:46 +01:00
TheAssassin 5f8bb819cc Merge pull request #80 from igor-sirotin/bugfix/qml-import-paths
Fixed QML imports paths order.
2020-12-04 16:09:37 +01:00
Igor Sirotin 44c1801c72 Merge remote-tracking branch 'remotes/origin/master' into bugfix/qml-import-paths 2020-12-04 10:37:33 +03:00
TheAssassin 7bc917177d Switch to CentOS 7 2020-12-04 02:36:19 +01:00
Igor Sirotin f4450743ae Fixed QML imports paths order.
* InstallQmlPath is now prepended to QML imports instead of appending
* Mentioned this fact in README
2020-12-03 20:36:34 +03:00
TheAssassin f292cc79ab Merge pull request #77 from Guiguiprim/add-3drender
Add 3DRender in modules list (issue #76)
2020-09-09 11:10:32 +02:00
gvallat 56f4194d23 Add 3DRender in modules list 2020-09-08 10:34:32 +02:00
TheAssassin 8c9040e5de Merge pull request #71 from samshawelmtek/master
Relative Path for QML files
2020-07-07 03:02:51 +02:00
Shaw, Samuel 7bc81ef559 Relative Path for QML files
Calculate the relative path to the imported QML file without resolving
symlinks. The path should be resolved lexically.
2020-07-06 07:56:43 +08:00
TheAssassin 4b43bc5d13 Fix deployment of texttospeech plugins
Thanks @julonexus for the hint!

Fixes #70.
2020-06-15 17:58:07 +02:00
TheAssassin 230cdb37c3 Add support for texttospeech plugins deployment
Closes #70.
2020-06-15 17:11:50 +02:00
TheAssassin c370ffac77 Merge pull request #67 from realnc/remove-xdg-qpa
Don't export QT_QPA_PLATFORMTHEME=xdgdesktopportal in the hook script
2020-03-30 01:58:42 +02:00
Nikos Chantziaras 808c206559 Don't export QT_QPA_PLATFORMTHEME=xdgdesktopportal in the hook script
It seems there's distros out there where this plugin doesn't work at all
and prevents the application from opening any file dialogs.
2020-03-22 18:01:48 +02:00
TheAssassin bae08f8592 Merge pull request #63 from realnc/improve-hook-script
Add gtk3 and xdgdesktopportal in apprun hook
2020-02-15 16:10:29 +01:00
Nikos Chantziaras d245b4dc0f Add gtk3 and xdgdesktopportal in apprun hook
Gtk-based desktops use either the gtk2 or gtk3 plugin. All others use the
XDG DP one (provides native dialog windows.)
2020-02-15 16:04:38 +02:00
TheAssassin 7bc321ec8e Merge pull request #62 from realnc/deploy-gtk3-xdgdp
Deploy gtk3 and xdgdesktopportal themes if found
2020-02-15 14:52:18 +01:00
Nikos Chantziaras 84797c0e05 Deploy gtk3 and xdgdesktopportal themes if found 2020-02-15 13:07:34 +02:00
TheAssassin 84fc3d792f Fix string overflow bug
We used ';' as a second parameter to the string constructor, which is clearly wrong and made the constructor read 59 bytes instead of using the null byte as termination.

https://en.cppreference.com/w/cpp/string/basic_string/basic_string

Not that it'd be a big deal security wise (the value has never been printed, so this couldn't be used to e.g., read secrets from RAM in CI environments etc.), but it breaks the functionality.

Found while looking into https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/61.
2020-02-15 03:19:27 +01:00
TheAssassin 04d96e1c4f Merge pull request #60 from linuxdeploy/printsupport-module
Add deployer for printsupport module
2020-02-05 22:37:55 +01:00
TheAssassin 95529160f7 Add missing explicit return
Why the heck do C++ compilers permit the lack of an explicit return statement outside void()...? Just calling it "undefined behavior" is *not* developer friendly.
2020-02-05 22:29:04 +01:00
TheAssassin d0e65fbef9 Add deployer for printsupport module 2020-02-05 01:58:09 +01:00
TheAssassin 8f37917e42 Replace annoying which call with linuxdeploy's implementation
Fixes #56.
2019-11-19 11:31:05 +01:00
TheAssassin fcf096aca8 Update linuxdeploy 2019-11-19 11:29:51 +01:00
TheAssassin fd3287b325 Fix CMake version problem (fixes #55) 2019-11-18 20:32:51 +01:00
TheAssassin dd2e714b32 Merge pull request #52 from haampie/fix-gui-xcbgl-clash
Return multiple deployers per module
2019-10-10 19:06:11 +02:00
Harmen Stoppels 752c5f199e Return multiple deployers per module 2019-10-10 15:59:28 +02:00
TheAssassin 70ca710c11 Merge pull request #50 from haampie/fix-copy-pasta-error
Fix copy-paste bug
2019-10-04 15:34:38 +02:00
Harmen Stoppels 3907c42080 Fix copy-paste bug 2019-10-04 15:31:18 +02:00
TheAssassin 4d26eb6d1d Make AppImageUpdate work 2019-09-28 18:28:15 +02:00
TheAssassin 6377a6f453 Build on CentOS 6 2019-09-28 18:28:11 +02:00
29 changed files with 635 additions and 178 deletions
+99
View File
@@ -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*
+2
View File
@@ -1,3 +1,5 @@
*build*/
.idea/
*.AppImage
*.zsync
*.swp
-68
View File
@@ -1,68 +0,0 @@
language: cpp
sudo: required
dist: xenial
matrix:
include:
- env: ARCH=x86_64
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
- env: ARCH=i386
addons:
apt:
update: true
packages:
- libmagic-dev:i386
- libjpeg-dev:i386
- libpng-dev:i386
- automake # required for patchelf
- libfuse2:i386
- libcairo2:i386
- gcc-multilib
- g++-multilib
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
# TODO: allow for cross-compiling the test projects and install i386 packages for build dependencies, then remove $ARCH check
- if [ "$ARCH" == "x86_64" ]; then bash -xe travis/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage; fi
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*
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/
+3 -3
View File
@@ -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).
+23
View File
@@ -0,0 +1,23 @@
FROM centos:7
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 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 && \
./bootstrap.sh && \
./configure --prefix=/usr/local && \
make -j $(nproc) && \
make install && \
popd && \
rm -r patchelf/
CMD ["bash"]
+35
View File
@@ -0,0 +1,35 @@
FROM i386/centos:7
SHELL ["/bin/bash", "-x", "-c"]
# during Docker build, yum doesn't detect it's an i386 environment on x86_64 machines, and tries to install x86_64 packages, which can't work
# this little command fixes this
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/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
COPY entrypoint.sh /
ENV ARCH=i386
ENTRYPOINT ["/entrypoint.sh"]
SHELL ["/entrypoint.sh", "bash", "-x", "-c"]
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 && \
# cannot use -b since it's not supported in really old versions of git
git checkout 0.8 && \
./bootstrap.sh && \
./configure --prefix=/usr/local && \
make -j $(nproc) && \
make install && \
popd && \
rm -r patchelf/
CMD ["bash"]
+18
View File
@@ -0,0 +1,18 @@
#! /bin/bash
set -xe
old_cwd=$(readlink -f .)
here=$(readlink -f $(dirname "$0"))
DOCKERFILE="$here"/Dockerfile.centos7
IMAGE=linuxdeploy-build-centos7
if [ "$ARCH" == "i386" ]; then
DOCKERFILE="$DOCKERFILE"-i386
IMAGE="$IMAGE"-i386
fi
(cd "$here" && docker build -f "$DOCKERFILE" -t "$IMAGE" .)
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"
+59
View File
@@ -0,0 +1,59 @@
#! /bin/bash
set -e
set -x
if [ "$ARCH" == "" ]; then
echo 'Error: $ARCH is not set'
exit 1
fi
# use RAM disk if possible
if [ "$CI" == "" ] && [ -d /dev/shm ]; then
TEMP_BASE=/dev/shm
else
TEMP_BASE=/tmp
fi
BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" linuxdeploy-plugin-qt-build-XXXXXX)
cleanup () {
if [ -d "$BUILD_DIR" ]; then
rm -rf "$BUILD_DIR"
fi
}
trap cleanup EXIT
# store repo root as variable
REPO_ROOT=$(readlink -f $(dirname $(dirname "$0")))
OLD_CWD=$(readlink -f .)
pushd "$BUILD_DIR"
cmake "$REPO_ROOT" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo "${EXTRA_CMAKE_ARGS[@]}" -DUSE_SYSTEM_CIMG=Off
make -j$(nproc)
ctest -V
make install DESTDIR=AppDir
strip_path=$(which strip)
export UPD_INFO="gh-releases-zsync|linuxdeploy|linuxdeploy-plugin-qt|continuous|linuxdeploy-plugin-qt-$ARCH.AppImage"
# we're in Docker...
export APPIMAGE_EXTRACT_AND_RUN=1
wget https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-"$ARCH".AppImage
chmod +x linuxdeploy*.AppImage
sed -i 's|AI\x02|\x00\x00\x00|' *.AppImage
./linuxdeploy-"$ARCH".AppImage --appdir AppDir \
-d "$REPO_ROOT"/resources/linuxdeploy-plugin-qt.desktop \
-i "$REPO_ROOT"/resources/linuxdeploy-plugin-qt.svg \
-e $(which patchelf) \
-e "$strip_path" \
--output appimage
mv linuxdeploy-plugin-qt-"$ARCH".AppImage* "$OLD_CWD"/
+1 -1
View File
@@ -70,4 +70,4 @@ chmod +x linuxdeploy*.AppImage
-e "$strip_path" \
--output appimage
mv linuxdeploy-plugin-qt-"$ARCH".AppImage "$OLD_CWD"/
mv linuxdeploy-plugin-qt-"$ARCH".AppImage* "$OLD_CWD"/
+9
View File
@@ -0,0 +1,9 @@
#! /bin/bash
# get a compiler that allows for using modern-ish C++ (>= 11) on a distro that doesn't normally support it
# before you ask: yes, the binaries will work on CentOS 6 even without devtoolset (they somehow partially link C++
# things statically while using others from the system...)
# so, basically, it's magic!
source /opt/rh/devtoolset-*/enable
exec "$@"
+27
View File
@@ -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[@]}"
+36
View File
@@ -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
View File
+2 -1
View File
@@ -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)
+4 -1
View File
@@ -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)
+14 -13
View File
@@ -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;
}
}
+31 -18
View File
@@ -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)};
}
+4 -2
View File
@@ -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