[MPlayer-dev-eng] Compiling MPlayer under Wine

Ingo Brückl ib at wupperonline.de
Thu Oct 6 17:59:48 CEST 2011


Diego Biurrun wrote on Thu, 06 Oct 2011 12:17:17 +0200:

> On Wed, Oct 05, 2011 at 08:03:22PM +0200, Ingo Brückl wrote:
>>
>> If there is interest in this new "porting", I'd like to post the necessary
>> patches for discussing and explain compilation in DOCS/tech/crosscompile.txt
>> (renamed from DOCS/tech/mingw-crosscompile.txt then).

> Let's see the patches.  If they are not too ugly - why not ...

Here you are.

#1: Should be no problem. Even the standard windres understands option -o,
    for Wine's windres the option is essential.

#2: GUI patch, so no problem at all.

#3: We need to include windows.h.

#4: I initially used target=mingw32, but this enables Windows stuff
    (_getch=getch2-win.c and shmem=yes at line 1562) we don't want.

That's it!

With these patches, I can compile MPlayer configuring

  ./configure --target=i686-wine --cc=winegcc --extra-cflags="-fno-pic -UWIN32 -U_WIN32 -U__WIN32 -U__WIN32__ -DWINE_NOWINSOCK -DHAVE_LINUX_DVD_STRUCT -Dstricmp=strcasecmp" --windres=wrc --language-msg=de --enable-gui --disable-ffmpeg_a --disable-tv

and run it under Wine - even a network stream with caching works (though I'm
still fighting with the GUI).

There is only one file left that causes problems: stream/tvi_dshow.c. I
configure --disable-tv, because I don't need it and so far did not succeed
to figure out how to fix:

  warning: 'visibility' attribute ignored
  error: non-static declaration of 'MP_CLSID_SampleGrabber' follows static declaration
  error: previous declaration of 'MP_CLSID_SampleGrabber' was here

Maybe somebody knows what to do.

Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winegcc.1.patch
Type: text/x-diff
Size: 389 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20111006/ecf19d35/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winegcc.2.patch
Type: text/x-c
Size: 322 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20111006/ecf19d35/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winegcc.3.patch
Type: text/x-diff
Size: 383 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20111006/ecf19d35/attachment-0001.bin>
-------------- next part --------------
--- configure	2011-10-01 17:32:38.000000000 +0200
+++ /home/ib/mplayer/configure	2011-10-06 16:07:45.000000000 +0200
@@ -240,7 +240,8 @@
 os2()       { issystem "OS/2"; }
 qnx()       { issystem "QNX"; }
 sunos()     { issystem "SunOS"; }
-win32()     { cygwin || mingw32; }
+wine()      { issystem "Wine"; }
+win32()     { cygwin || mingw32 || wine; }
 
 # arch test boolean functions
 # x86/x86pc is used by QNX
@@ -1514,6 +1515,7 @@
     morphos) system_name=MorphOS ;;
     amigaos) system_name=AmigaOS ;;
     mingw32*) system_name=MINGW32 ;;
+    wine) system_name=Wine ;;
   esac
   # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
   host_arch=$(echo $_target | cut -d '-' -f 1)


More information about the MPlayer-dev-eng mailing list