diff --git a/src/main.cpp b/src/main.cpp index ea22089..b31faa8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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;