Skip to content

Commit 268f4d6

Browse files
authored
Merge branch 'master' into dantti/fix_linuxdeploy_log_include
2 parents f5f6ca5 + 594db2c commit 268f4d6

File tree

9 files changed

+46
-60
lines changed

9 files changed

+46
-60
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,56 @@ jobs:
66
build-and-test:
77
strategy:
88
matrix:
9-
ARCH: [x86_64, i386, aarch64, armhf]
10-
USE_STATIC_RUNTIME: [""]
11-
UPDATE: ["1"]
12-
139
include:
14-
# test build
10+
# regular builds:
1511
- ARCH: x86_64
16-
DOCKER_ARCH: amd64
17-
BUILD_TYPE: coverage
12+
BUILD_TYPE: appimage
13+
RUNS_ON: ubuntu-24.04
14+
- ARCH: i386
15+
BUILD_TYPE: appimage
16+
RUNS_ON: ubuntu-24.04
17+
- ARCH: aarch64
18+
BUILD_TYPE: appimage
19+
RUNS_ON: ubuntu-24.04-arm
20+
- ARCH: armhf
21+
BUILD_TYPE: appimage
22+
RUNS_ON: ubuntu-24.04-arm
1823

19-
# experimental build
24+
# test build
2025
- ARCH: x86_64
21-
BUILD_TYPE: appimage
22-
USE_STATIC_RUNTIME: -static
26+
BUILD_TYPE: coverage
27+
RUNS_ON: ubuntu-24.04
2328

2429
fail-fast: false
2530

26-
name: ${{ matrix.ARCH }}${{ matrix.USE_STATIC_RUNTIME }}
27-
runs-on: ubuntu-latest
31+
name: ${{ matrix.ARCH }} ${{ matrix.BUILD_TYPE }}
32+
runs-on: ${{ matrix.RUNS_ON }}
2833

2934
env:
3035
ARCH: ${{ matrix.ARCH }}
3136
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
3237
DEBIAN_FRONTEND: interactive
33-
USE_STATIC_RUNTIME: ${{ matrix.USE_STATIC_RUNTIME }}
3438

3539
steps:
3640
# check out once git command is available
3741
- uses: actions/checkout@v4
3842
with:
3943
submodules: recursive
4044

41-
- name: Set up QEMU integration for Docker
42-
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
43-
4445
- name: Build and test AppImage
4546
run: bash ci/build-in-docker.sh
4647

4748
- name: Archive artifacts
4849
uses: actions/upload-artifact@v4
4950
with:
50-
name: AppImage ${{ matrix.ARCH }}${{ matrix.USE_STATIC_RUNTIME}}
51-
path: linuxdeploy-plugin-qt${{ matrix.USE_STATIC_RUNTIME}}-${{ matrix.ARCH }}.AppImage*
51+
name: AppImage ${{ matrix.ARCH }}${{ matrix.BUILD_TYPE }}
52+
path: linuxdeploy-plugin-qt-${{ matrix.ARCH }}.AppImage*
5253

5354
upload:
5455
name: Create release and upload artifacts
5556
needs:
5657
- build-and-test
57-
runs-on: ubuntu-20.04
58+
runs-on: ubuntu-24.04
5859
steps:
5960
- name: Download artifacts
6061
uses: actions/download-artifact@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ Just like all linuxdeploy plugins, the Qt plugin's behavior can be configured so
6161
- `$EXTRA_PLATFORM_PLUGINS=platformA;platformB`: Platforms to deploy in addition to `libqxcb.so`. Platform must be available from `QT_INSTALL_PLUGINS/platforms`.
6262

6363
QML related:
64-
- `$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.
64+
- `$QML_SOURCES_PATHS`: directory containing the application's QML files — useful/needed if QML files are "baked" into the binaries. linuxdeploy-plugin-qt will look for all imported QML modules and include them. `$QT_INSTALL_QML` is prepended to this list internally.
6565
- `$QML_MODULES_PATHS`: extra directories containing imported QML files (normally doesn't need to be specified).

ci/build-in-docker.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ error() {
1818
log_message 1 "[error] $*"
1919
}
2020

21-
if [[ "$ARCH" == "" ]]; then
21+
if [[ "${ARCH:-}" == "" ]]; then
2222
error "Usage: env ARCH=... bash $0"
2323
exit 2
2424
fi
@@ -29,16 +29,16 @@ this_dir="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
2929

3030
case "$ARCH" in
3131
x86_64)
32-
docker_arch=amd64
32+
docker_platform=linux/amd64
3333
;;
3434
i386)
35-
docker_arch=i386
35+
docker_platform=linux/386
3636
;;
3737
armhf)
38-
docker_arch=arm32v7
38+
docker_platform=linux/arm/v7
3939
;;
4040
aarch64)
41-
docker_arch=arm64v8
41+
docker_platform=linux/arm64/v8
4242
;;
4343
*)
4444
echo "Unsupported \$ARCH: $ARCH"
@@ -49,7 +49,7 @@ esac
4949
# first, we need to build the image
5050
# we always attempt to build it, it will only be rebuilt if Docker detects changes
5151
# optionally, we'll pull the base image beforehand
52-
info "Building Docker image for $ARCH (Docker arch: $docker_arch)"
52+
info "Building Docker image for $ARCH (Docker platform: $docker_platform)"
5353

5454
build_args=()
5555
if [[ "${UPDATE:-}" == "" ]]; then
@@ -58,11 +58,11 @@ else
5858
build_args+=("--pull")
5959
fi
6060

61-
docker_image=linuxdeploy-plugin-qt-build:"$ARCH"
61+
docker_image=linuxdeploy-plugin-qt-build
6262

6363
docker build \
64+
--platform "$docker_platform" \
6465
--build-arg ARCH="$ARCH" \
65-
--build-arg docker_arch="$docker_arch" \
6666
"${build_args[@]}" \
6767
-t "$docker_image" \
6868
"$this_dir"/docker
@@ -104,11 +104,12 @@ run_in_docker() {
104104
# b) allow the build scripts to "mv" the binaries into the /out directory
105105
docker run \
106106
--rm \
107+
--platform "$docker_platform" \
107108
-i \
108109
--init \
110+
-e ARCH \
109111
-e GITHUB_RUN_NUMBER \
110112
-e USE_STATIC_RUNTIME \
111-
-e ARCH \
112113
-e CI \
113114
--user "$uid" \
114115
"${docker_args[@]}" \
@@ -119,7 +120,7 @@ run_in_docker() {
119120
}
120121

121122
filename_suffix=
122-
if [[ "$USE_STATIC_RUNTIME" != "" ]]; then
123+
if [[ "${USE_STATIC_RUNTIME:-}" != "" ]]; then
123124
filename_suffix="-static"
124125
fi
125126

ci/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export OUTPUT="linuxdeploy-plugin-qt-$ARCH.AppImage"
4747

4848
# special set of builds using a different experimental runtime, used for testing purposes
4949
if [[ "${USE_STATIC_RUNTIME:-}" != "" ]]; then
50-
custom_runtime_url="https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-fuse3-$ARCH"
50+
custom_runtime_url="https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-$ARCH"
5151
wget "$custom_runtime_url"
5252
runtime_filename="$(echo "$custom_runtime_url" | rev | cut -d/ -f1 | rev)"
5353
LDAI_RUNTIME_FILE="$(readlink -f "$runtime_filename")"

ci/docker/Dockerfile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,12 @@
33
# needs to be re-run in CI every time as we cannot store auto-built Docker images due to GitHub's strict quota
44
# it will save a lot of time in local development environments, though
55

6-
ARG docker_arch
7-
86
# we'll just use Debian as a base image for now, mainly because it produces less headache than Ubuntu with arm
97
# a big pro is that they ship an up to date CMake in their stable distribution
108
# also, they still provide IA-32 builds for some reason...
119
# some people in the AppImage community do not (want to) realize i386 is dead for good
1210
# we are going to drop i686 in the future!
13-
FROM ${docker_arch}/debian:stable
14-
15-
# variables that need to be availabe during build and runtime must(!) be repeated after FROM
16-
ARG ARCH
17-
11+
FROM debian:stable
1812

1913
SHELL ["bash", "-x", "-c"]
2014

src/deployers/BasicPluginsDeployer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ bool BasicPluginsDeployer::deployStandardQtPlugins(const std::vector<std::string
3939
for (const auto &pluginName : plugins) {
4040
ldLog() << "Deploying Qt" << pluginName << "plugins" << std::endl;
4141
for (fs::directory_iterator i(qtPluginsPath / pluginName); i != fs::directory_iterator(); ++i) {
42+
if (i->path().extension() == ".debug") {
43+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
44+
continue;
45+
}
4246
// add a trailing slash, so pluginName is used as a destination directory, not a file.
4347
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins" / pluginName / ""))
4448
return false;

src/deployers/TextToSpeechPluginsDeployer.cpp

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,5 @@ using namespace linuxdeploy::log;
1313
namespace fs = std::filesystem;
1414

1515
bool TextToSpeechPluginsDeployer::doDeploy() {
16-
// calling the default code is optional, but it won't hurt for now
17-
if (!BasicPluginsDeployer::deploy())
18-
return false;
19-
20-
const std::string pluginsName = "texttospeech";
21-
22-
ldLog() << "Deploying" << pluginsName << "plugins" << std::endl;
23-
24-
for (fs::directory_iterator i(qtPluginsPath / pluginsName); i != fs::directory_iterator(); ++i) {
25-
if (i->path().extension() == ".debug") {
26-
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
27-
continue;
28-
}
29-
30-
// terminate with a "/" to make sure the deployer will deploy the file into the target directory properly
31-
// has to be cast to string, unfortunately, as std::filesystem doesn't allow for adding a terminating /
32-
const auto targetPath = (appDir.path() / "usr/plugins/" / pluginsName).string() + "/";
33-
if (!appDir.deployLibrary(*i, targetPath))
34-
return false;
35-
}
36-
37-
return true;
16+
return deployStandardQtPlugins({"texttospeech"});
3817
}

src/deployment.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ inline bool deployIntegrationPlugins(appdir::AppDir& appDir, const fs::path& qtP
3737
// otherwise, when the directory doesn't exist, it might just copy all files to files called like
3838
// destinationDir
3939
auto destinationDir = appDir.path() / "usr/plugins" / subDir / "";
40+
if (i->path().extension() == ".debug") {
41+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
42+
continue;
43+
}
4044

4145
if (!appDir.deployLibrary(*i, destinationDir))
4246
return false;

src/util.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ std::filesystem::path findQmake() {
6969

7070
if (qmakePath.empty())
7171
qmakePath = linuxdeploy::util::which("qmake");
72+
73+
if (qmakePath.empty())
74+
qmakePath = linuxdeploy::util::which("qmake6");
7275
}
7376

7477
return qmakePath;

0 commit comments

Comments
 (0)