Merge pull request #35 from linuxdeploy/failing-master

Make QGtk 2 Theme and Style deployment optional
This commit is contained in:
TheAssassin
2019-07-10 22:54:30 +02:00
committed by GitHub
+15 -2
View File
@@ -85,8 +85,21 @@ bool deployPlatformPlugins(appdir::AppDir &appDir, const bf::path &qtPluginsPath
} else {
ldLog() << "Trying to deploy Gtk 2 platform theme and/or style" << std::endl;
appDir.deployLibrary(platformThemesPath / "libqgtk2.so", platformThemesDestination);
appDir.deployLibrary(stylesPath / "libqgtk2style.so", stylesDestination);
// according to probono, only the files shall be deployed, not their dependencies
// 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
bf::path qgtkPlatformThemePath = platformThemesPath / "libqgtk2.so";
if (bf::exists(qgtkPlatformThemePath))
appDir.deployFile(qgtkPlatformThemePath, platformThemesDestination);
else
ldLog() << LD_ERROR << "Missing Gtk 2 platform theme file: " << qgtkPlatformThemePath << std::endl;
bf::path qgtkStylePath = stylesPath / "libqgtk2style.so";
if (bf::exists(qgtkStylePath))
appDir.deployFile(qgtkStylePath, stylesDestination);
else
ldLog() << LD_ERROR << "Missing Gtk 2 platform style file: " << qgtkStylePath << std::endl;
}
return true;