diff options
-rw-r--r-- | plugins.c | 13 | ||||
-rw-r--r-- | plugins/gtkui/gtkui.c | 6 | ||||
-rw-r--r-- | plugins/gtkui/gtkui.h | 14 | ||||
-rwxr-xr-x | portable_build.sh | 13 | ||||
-rwxr-xr-x | portable_package.sh | 1 | ||||
-rwxr-xr-x | portable_postbuild.sh | 1 |
6 files changed, 37 insertions, 11 deletions
@@ -639,8 +639,8 @@ plug_load_all (void) { int i; for (i = 0; i < n; i++) { - // no hidden files - while (namelist[i]->d_name[0] != '.') + // skip hidden files and fallback plugins + while (namelist[i]->d_name[0] != '.' && !strstr (namelist[i]->d_name, ".fallback.")) { int l = strlen (namelist[i]->d_name); if (l < 3) { @@ -679,7 +679,14 @@ plug_load_all (void) { void *handle = dlopen (fullname, RTLD_NOW); if (!handle) { trace ("dlopen error: %s\n", dlerror ()); - break; + strcpy (fullname + strlen(fullname) - 3, ".fallback.so"); + handle = dlopen (fullname, RTLD_NOW); + if (!handle) { + break; + } + else { + fprintf (stderr, "successfully started fallback plugin %s\n", fullname); + } } d_name[l-3] = 0; strcat (d_name, "_load"); diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index f468f0c5..8c30f090 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -223,7 +223,7 @@ update_songinfo (gpointer ctx) { void set_tray_tooltip (const char *text) { if (trayicon) { -#if (GTK_MINOR_VERSION < 16) +#if !GTK_CHECK_VERSION(2,16,0) || defined(ULTRA_COMPATIBLE) gtk_status_icon_set_tooltip (trayicon, text); #else gtk_status_icon_set_tooltip_text (trayicon, text); @@ -292,7 +292,7 @@ mainwin_toggle_visible (void) { } } -#if GTK_MINOR_VERSION<=14 +#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE) gboolean on_trayicon_activate (GtkWidget *widget, @@ -588,7 +588,7 @@ gtkui_update_status_icon (gpointer unused) { g_object_set (trayicon, "visible", FALSE, NULL); } -#if GTK_MINOR_VERSION <= 14 +#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE) g_signal_connect ((gpointer)trayicon, "activate", G_CALLBACK (on_trayicon_activate), NULL); #else g_signal_connect ((gpointer)trayicon, "scroll_event", G_CALLBACK (on_trayicon_scroll_event), NULL); diff --git a/plugins/gtkui/gtkui.h b/plugins/gtkui/gtkui.h index 53db09af..7cb2dff4 100644 --- a/plugins/gtkui/gtkui.h +++ b/plugins/gtkui/gtkui.h @@ -25,12 +25,20 @@ #include <gtk/gtk.h> +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#if defined(ULTRA_COMPATIBLE) +#warning compiling for compatibility with gtk <2.14 +#endif + // workaround to make older gtk compatible with vala codegen -#if !GTK_CHECK_VERSION(2,14,0) +#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE) #define gtk_widget_get_window(widget) ((widget)->window) #endif -#if !GTK_CHECK_VERSION(2,18,0) +#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE) #define gtk_widget_set_has_window(widget, has_window) \ if (has_window) GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW); \ else GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW); @@ -39,7 +47,7 @@ #define gtk_widget_get_has_window(widget) (!GTK_WIDGET_NO_WINDOW(widget)) #endif -#if !GTK_CHECK_VERSION(2,20,0) +#if !GTK_CHECK_VERSION(2,20,0) || defined(ULTRA_COMPATIBLE) #define gtk_widget_get_realized(widget) (GTK_WIDGET_REALIZED(widget)) #endif diff --git a/portable_build.sh b/portable_build.sh index 062d391b..b7a06483 100755 --- a/portable_build.sh +++ b/portable_build.sh @@ -3,15 +3,24 @@ VERSION=`cat PORTABLE_VERSION | perl -ne 'chomp and print'` ORIGIN=`pwd | perl -ne 'chomp and print'` export APBUILD_STATIC_LIBGCC=1 -CC=$ORIGIN/tools/apbuild/apgcc CXX=$ORIGIN/tools/apbuild/apgcc ./configure --enable-portable --disable-pulse --disable-mpris --enable-maintainer-mode --disable-nls +#CC=$ORIGIN/tools/apbuild/apgcc CXX=$ORIGIN/tools/apbuild/apgcc ./configure --enable-portable --disable-pulse --disable-mpris --enable-maintainer-mode --disable-nls +#sed -i 's/-lstdc++ -lm -lgcc_s -lc -lgcc_s/-lm -lc/g' libtool +#make clean -sed -i 's/-lstdc++ -lm -lgcc_s -lc -lgcc_s/-lm -lc/g' libtool +echo "building low-end gtkui version" +cd plugins/gtkui make clean +make CFLAGS="-DULTRA_COMPATIBLE=1" +cp .libs/gtkui.so gtkui.fallback.so +make clean +cd ../.. make -j9 +echo "building pluginfo tool..." cd tools/pluginfo make cd ../../ + ./portable_postbuild.sh diff --git a/portable_package.sh b/portable_package.sh index 14a6233f..a07d802b 100755 --- a/portable_package.sh +++ b/portable_package.sh @@ -23,6 +23,7 @@ tar jcvf portable_out/build/deadbeef-$VERSION-portable-build$BUILD.tar.bz2\ $PLUGDIR/vfs_curl.so\ $PLUGDIR/artwork.so\ $PLUGDIR/gtkui.so\ + $PLUGDIR/gtkui.fallback.so\ $PLUGDIR/hotkeys.so\ $PLUGDIR/cdda.so\ $PLUGDIR/mpgmad.so\ diff --git a/portable_postbuild.sh b/portable_postbuild.sh index 5dd36117..3e99e6e5 100755 --- a/portable_postbuild.sh +++ b/portable_postbuild.sh @@ -26,6 +26,7 @@ cp ./plugins/lastfm/.libs/lastfm.so $PLUGDIR/ cp ./plugins/sid/.libs/sid.so $PLUGDIR/ cp ./plugins/adplug/.libs/adplug.so $PLUGDIR/ cp ./plugins/gtkui/.libs/gtkui.so $PLUGDIR/ +cp ./plugins/gtkui/gtkui.fallback.so $PLUGDIR/ cp ./plugins/sndfile/.libs/sndfile.so $PLUGDIR/ cp ./plugins/artwork/.libs/artwork.so $PLUGDIR/ cp ./plugins/supereq/.libs/supereq.so $PLUGDIR/ |