diff --git a/.gitignore b/.gitignore index aa5b4f72d..28871201b 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ dist/clementine.spec dist/maketarball.sh dist/windows/clementine.nsi dist/windows/gstreamer-plugins +dist/windows/gio-modules dist/windows/imageformats dist/windows/nsisplugins dist/windows/PyQt4 diff --git a/dist/windows/clementine.nsi.in b/dist/windows/clementine.nsi.in index e35a7e2f3..6c1414605 100644 --- a/dist/windows/clementine.nsi.in +++ b/dist/windows/clementine.nsi.in @@ -243,6 +243,12 @@ Section "Qt image format plugins" imageformats File "/oname=qjpeg4.dll" "imageformats\qjpeg4.dll" SectionEnd +Section "GIO modules" gio-modules + SetOutPath "$INSTDIR\gio-modules" + + File "/oname=libgiognutls.dll" "gio-modules\libgiognutls.dll" +SectionEnd + Section "Gstreamer plugins" gstreamer-plugins SetOutPath "$INSTDIR\gstreamer-plugins" @@ -1637,12 +1643,15 @@ Section "Uninstall" Delete "$INSTDIR\projectm-presets\Zylot - Waves Of Blood.milk" Delete "$INSTDIR\projectm-presets\Zylot - Wisps.milk" + Delete "$INSTDIR\gio-modules\libgiognutls.dll" + Delete "$INSTDIR\Uninstall.exe" ; Remove the installation folders. RMDir "$INSTDIR\gstreamer-plugins" RMDir "$INSTDIR\projectm-presets" RMDir "$INSTDIR\imageformats" + RMDir "$INSTDIR\gio-modules" RMDir "$INSTDIR" ; Remove the Shortcuts diff --git a/src/main.cpp b/src/main.cpp index 2e0b8d92d..9c1179442 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -167,6 +167,25 @@ void IncreaseFDLimit() { #endif } +#ifdef HAVE_GIO +# undef signals // Clashes with GIO, and not needed in this file +# include + +void ScanGIOModulePath() { + QString gio_module_path; + +#if defined(Q_OS_WIN32) + gio_module_path = QCoreApplication::applicationDirPath() + "/gio-modules"; +#endif + + if (!gio_module_path.isEmpty()) { + qLog(Debug) << "Adding GIO module path:" << gio_module_path; + QByteArray bytes = gio_module_path.toLocal8Bit(); + g_io_modules_scan_all_in_directory(bytes.data()); + } +} +#endif + int main(int argc, char *argv[]) { if (CrashReporting::SendCrashReport(argc, argv)) { return 0; @@ -444,6 +463,9 @@ int main(int argc, char *argv[]) { &art_loader, &cover_providers, &global_search); +#ifdef HAVE_GIO + ScanGIOModulePath(); +#endif #ifdef HAVE_DBUS QObject::connect(&mpris, SIGNAL(RaiseMainWindow()), &w, SLOT(Raise())); #endif