Skip to content

Commit

Permalink
multiple deployers: Ignore .debug files
Browse files Browse the repository at this point in the history
This commit replicates a pattern from the TextToSpeechPluginsDeployer
into the BasicPluginsDeployer - to affect all standard deployers.

Essentially - it's extremely unlikely that composing an AppImage
with debug symbols is what a user actually wants to do. I'm also
not aware of a good story for connecting debug symbols to an AppImage
at all.

As a result, let's make a sensible choice - and not package them.
Trust that developers will use their underlying build system for Debug,
and that release tracking will allow developers to tie an AppImage
back to a source control revision.

Finally, note that this works around an interesting aarch64 bug -
where the .debug files that are created are marked as x86_64 ELF
binaries - even when you are _building on an aarch64 host_.
  • Loading branch information
tdewey-rpi committed Aug 12, 2024
1 parent 24f169a commit 1e1f146
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/deployers/BasicPluginsDeployer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ bool BasicPluginsDeployer::deployStandardQtPlugins(const std::vector<std::string
for (const auto &pluginName : plugins) {
ldLog() << "Deploying Qt" << pluginName << "plugins" << std::endl;
for (fs::directory_iterator i(qtPluginsPath / pluginName); i != fs::directory_iterator(); ++i) {
if (i->path().extension() == ".debug") {
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
continue;
}
// add a trailing slash, so pluginName is used as a destination directory, not a file.
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins" / pluginName / ""))
return false;
Expand Down
4 changes: 4 additions & 0 deletions src/deployment.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ inline bool deployIntegrationPlugins(appdir::AppDir& appDir, const fs::path& qtP
// otherwise, when the directory doesn't exist, it might just copy all files to files called like
// destinationDir
auto destinationDir = appDir.path() / "usr/plugins" / subDir / "";
if (i->path().extension() == ".debug") {
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
continue;
}

if (!appDir.deployLibrary(*i, destinationDir))
return false;
Expand Down

0 comments on commit 1e1f146

Please sign in to comment.