diff options
Diffstat (limited to 'src/libw32dll')
-rw-r--r-- | src/libw32dll/DirectShow/Makefile.am | 33 | ||||
-rw-r--r-- | src/libw32dll/Makefile.am | 36 | ||||
-rw-r--r-- | src/libw32dll/dmo/Makefile.am | 28 | ||||
-rw-r--r-- | src/libw32dll/wine/Makefile.am | 57 | ||||
-rw-r--r-- | src/libw32dll/wine/registry.c | 39 | ||||
-rw-r--r-- | src/libw32dll/wine/windef.h | 7 |
6 files changed, 78 insertions, 122 deletions
diff --git a/src/libw32dll/DirectShow/Makefile.am b/src/libw32dll/DirectShow/Makefile.am index a74c65815..02eddc00a 100644 --- a/src/libw32dll/DirectShow/Makefile.am +++ b/src/libw32dll/DirectShow/Makefile.am @@ -1,26 +1,9 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer \ - -Wmissing-prototypes -Wimplicit-function-declaration \ - -DWIN32_PATH=\"@w32_path@\" -DNOAVIFILE_HEADERS \ +AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer +AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -DNOAVIFILE_HEADERS \ -I$(srcdir)/.. -I$(srcdir)/../wine -if HAVE_W32DLL -ds_filter_lib = libds_filter.la -endif - -noinst_LTLIBRARIES = $(ds_filter_lib) - -libds_filter_la_SOURCES = \ - allocator.c \ - cmediasample.c \ - guids.c \ - inputpin.c \ - outputpin.c \ - DS_Filter.c \ - DS_AudioDecoder.c \ - DS_VideoDecoder.c - noinst_HEADERS = \ allocator.h \ cmediasample.h \ @@ -32,3 +15,15 @@ noinst_HEADERS = \ DS_AudioDecoder.h \ DS_Filter.h \ DS_VideoDecoder.h + +noinst_LTLIBRARIES = libds_filter.la + +libds_filter_la_SOURCES = \ + allocator.c \ + cmediasample.c \ + guids.c \ + inputpin.c \ + outputpin.c \ + DS_Filter.c \ + DS_AudioDecoder.c \ + DS_VideoDecoder.c diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index 358eea40a..7d11bb2dc 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -1,36 +1,32 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"@w32_path@\" $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"$(w32_path)\" +AM_LDFLAGS = $(xineplug_ldflags) -SUBDIRS = wine DirectShow dmo qtx - -if HAVE_W32DLL -w32dll_codec = xineplug_decode_w32dll.la -qt_codec = xineplug_decode_qt.la +SUBDIRS = +if ENABLE_W32DLL +SUBDIRS += wine DirectShow dmo qtx endif -xineplug_LTLIBRARIES = $(w32dll_codec) $(qt_codec) - EXTRA_DIST = common.c +noinst_HEADERS = libwin32.h w32codec.h + +if ENABLE_W32DLL +xineplug_LTLIBRARIES = xineplug_decode_w32dll.la xineplug_decode_qt.la +endif + xineplug_decode_w32dll_la_SOURCES = w32codec.c -xineplug_decode_w32dll_la_LDFLAGS = -avoid-version -module +xineplug_decode_w32dll_la_DEPS = $(XDG_BASEDIR_DEPS) xineplug_decode_w32dll_la_LIBADD = \ $(top_builddir)/src/libw32dll/wine/libwine.la \ - $(XINE_LIB) \ - $(PTHREAD_LIBS) \ - -lm \ $(top_builddir)/src/libw32dll/DirectShow/libds_filter.la \ $(top_builddir)/src/libw32dll/dmo/libdmo_filter.la \ - @KSTAT_LIBS@ + $(XINE_LIB) $(PTHREAD_LIBS) -lm $(KSTAT_LIBS) $(XDG_BASEDIR_LIBS) +xineplug_decode_w32dll_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS) xineplug_decode_qt_la_SOURCES = qt_decoder.c -xineplug_decode_qt_la_LDFLAGS = -avoid-version -module xineplug_decode_qt_la_LIBADD = \ $(top_builddir)/src/libw32dll/wine/libwine.la \ - $(XINE_LIB) \ - $(PTHREAD_LIBS) \ - -lm \ - @KSTAT_LIBS@ - -noinst_HEADERS = libwin32.h w32codec.h + $(XINE_LIB) $(PTHREAD_LIBS) -lm $(KSTAT_LIBS) diff --git a/src/libw32dll/dmo/Makefile.am b/src/libw32dll/dmo/Makefile.am index 2b7cd3e37..531a4559a 100644 --- a/src/libw32dll/dmo/Makefile.am +++ b/src/libw32dll/dmo/Makefile.am @@ -1,22 +1,7 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer \ - -Wmissing-prototypes -Wimplicit-function-declaration \ - -DWIN32_PATH=\"@w32_path@\" -DNOAVIFILE_HEADERS \ - -I$(srcdir)/.. -I$(srcdir)/../wine - -if HAVE_W32DLL -dmo_filter_lib = libdmo_filter.la -endif - -noinst_LTLIBRARIES = $(dmo_filter_lib) - -libdmo_filter_la_SOURCES = \ - buffer.c \ - DMO_AudioDecoder.c \ - dmo.c \ - dmo_guids.c \ - DMO_VideoDecoder.c +AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer +AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -DNOAVIFILE_HEADERS -I$(srcdir)/.. -I$(srcdir)/../wine noinst_HEADERS = \ DMO_AudioDecoder.h \ @@ -25,3 +10,12 @@ noinst_HEADERS = \ DMO_Filter.h \ dmo.h \ DMO_VideoDecoder.h + +noinst_LTLIBRARIES = libdmo_filter.la + +libdmo_filter_la_SOURCES = \ + buffer.c \ + DMO_AudioDecoder.c \ + dmo.c \ + dmo_guids.c \ + DMO_VideoDecoder.c diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index 63da4068e..1756e3262 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -1,40 +1,13 @@ include $(top_srcdir)/misc/Makefile.common -LIBTOOL = $(SHELL) $(top_builddir)/libtool - -EXTRA_DIST = stubs.s wrapper.S - -noinst_LTLIBRARIES = $(wine_lib) - -AM_CFLAGS = $(X_CFLAGS) @W32_NO_OPTIMIZE@ \ - -Wmissing-prototypes -Wimplicit-function-declaration \ - -DWIN32_PATH=\"@w32_path@\" -I$(srcdir)/.. -D__WINE__ \ +# disable -fomit-frame-pointer, -finline-functions, and -frename-registers +# because they cause bad behavior of wine +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) @W32_NO_OPTIMIZE@ \ + -fno-omit-frame-pointer -fno-inline-functions -fno-rename-registers +AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -I$(srcdir)/.. -D__WINE__ \ -Ddbg_printf=__vprintf -DTRACE=__vprintf -# CFLAGS is here to filter out -fomit-frame-pointer, -# -finline-functions and -frename-registers because they cause bad -# behavior of wine -CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-finline-functions//g;s/-frename-registers//g'` - -if HAVE_W32DLL -wine_lib = libwine.la -endif - -libwine_la_SOURCES = \ - afl.c \ - driver.c \ - elfdll.c \ - ext.c \ - ldt_keeper.c \ - module.c \ - pe_image.c \ - pe_resource.c \ - resource.c \ - registry.c \ - vfl.c \ - win32.c \ - stubs.s \ - wrapper.S +EXTRA_DIST = stubs.s wrapper.S noinst_HEADERS = \ avifmt.h \ @@ -74,3 +47,21 @@ noinst_HEADERS = \ winuser.h \ wrapper.h +noinst_LTLIBRARIES = libwine.la + +libwine_la_SOURCES = \ + afl.c \ + driver.c \ + elfdll.c \ + ext.c \ + ldt_keeper.c \ + module.c \ + pe_image.c \ + pe_resource.c \ + resource.c \ + registry.c \ + vfl.c \ + win32.c \ + stubs.s \ + wrapper.S +libwine_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS) diff --git a/src/libw32dll/wine/registry.c b/src/libw32dll/wine/registry.c index 0f91499b3..c8e3c4dd0 100644 --- a/src/libw32dll/wine/registry.c +++ b/src/libw32dll/wine/registry.c @@ -19,6 +19,7 @@ #ifdef XINE_MAJOR #include "xineutils.h" +#include <basedir.h> #endif //#undef TRACE @@ -302,44 +303,22 @@ static struct reg_value* insert_reg_value(int handle, const char* name, int type static void init_registry(void) { + xdgHandle tmph = xdgAllocHandle(); + const char *const xdg_cache_home = xdgCacheHome(tmph); + TRACE("Initializing registry\n"); // can't be free-ed - it's static and probably thread // unsafe structure which is stored in glibc -#ifdef MPLAYER - regpathname = get_path("registry"); - localregpathname = regpathname; -#else -#ifdef XINE_MAJOR - localregpathname = (char *)malloc(strlen(xine_get_homedir()) + 21); - sprintf(localregpathname, "%s/.xine/win32registry", xine_get_homedir()); -#else - // regpathname is an external pointer - // - // registry.c is holding it's own internal pointer - // localregpathname - which is being allocate/deallocated - - if (localregpathname == 0) - { - const char* pthn = regpathname; - if (!regpathname) - { - // avifile - for now reading data from user's home - struct passwd* pwent; - pwent = getpwuid(geteuid()); - pthn = pwent->pw_dir; - } - - localregpathname = (char*)malloc(strlen(pthn)+20); - strcpy(localregpathname, pthn); - strcat(localregpathname, "/.registry"); - } -#endif -#endif + localregpathname = malloc(strlen(xdg_cache_home) + sizeof("/"PACKAGE"/win32registry")); + strcpy(localregpathname, xdg_cache_home); + strcat(localregpathname, "/"PACKAGE"/win32registry"); open_registry(); insert_handle(HKEY_LOCAL_MACHINE, "HKLM"); insert_handle(HKEY_CURRENT_USER, "HKCU"); + + xdgFreeHandle(tmph); } #if 0 diff --git a/src/libw32dll/wine/windef.h b/src/libw32dll/wine/windef.h index e7f691a02..b86f2f740 100644 --- a/src/libw32dll/wine/windef.h +++ b/src/libw32dll/wine/windef.h @@ -7,8 +7,9 @@ #ifndef __WINE_WINDEF_H #define __WINE_WINDEF_H +#include "config.h" + #ifdef __WINE__ -# include "config.h" # undef UNICODE #endif @@ -493,14 +494,14 @@ typedef LRESULT CALLBACK (*WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM); /* Macro for structure packing. */ +#define WINE_PACKED XINE_PACKED + #if defined(__GNUC__) || defined(__ICC) #ifndef _EGCS_ -#define WINE_PACKED __attribute__((packed)) #define WINE_UNUSED __attribute__((unused)) #define WINE_NORETURN __attribute__((noreturn)) #endif #else -#define WINE_PACKED /* nothing */ #define WINE_UNUSED /* nothing */ #define WINE_NORETURN /* nothing */ #endif |