Added support for shipping GIO modules (e.g. glib-networking) on win32
This commit is contained in:
parent
799c341dc5
commit
dbca026a66
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
|
||||
|
9
dist/windows/clementine.nsi.in
vendored
9
dist/windows/clementine.nsi.in
vendored
@ -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
|
||||
|
22
src/main.cpp
22
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 <gio/gio.h>
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user