unix emulation layer (without if you use CC="gcc -mno-cygwin").
* INSTALL.win32: doc update for cygwin build.
* modules/video_output/directx/events.c, modules/video_output/directx/directx.c,
modules/audio_output/directx.c: compilation fixes for cygwin.
=============================================
If you want to do the tricky job of building vlc from sources, you can do it
-in two ways:
+in several ways:
- natively on Windows, using MSYS+MINGW (www.mingw.org)
(MSYS is a minimal build environnement to compile unixish projects under
windoze. It provides all the common unix tools like sh, gmake...)
+- natively on Windows, using cygwin (www.cygwin.com) with or without the
+ unix emulation layer.
+
- or on Linux, using the mingw32 cross-compiler
Getting the right tools
You must also not forget to install the extra development packages if you want
to build the DirectX, GTK and SDL plugins.
-- compiling natively on Windoze:
+- compiling natively on Windoze with MSYS+MINGW:
You will need to download and install the latest MSYS (version 1.0.7 as
of now) and MINGW.
The installation is really easy. Begin with the MSYS auto-installer and once
SDL-1.2.3-win32/i386-mingw32msvc/bin/sdl-config if you plan to extract the
archive in a different directory.
+- compiling natively on Windoze with cygwin:
+You will need to download and install cygwin (www.cygwin.com).
+
+You must also not forget to install the extra development packages if you want
+to build the DirectX, GTK and SDL plugins.
+(http://www.videolan.org/vlc/windows.html)
+
Configuring the build
=====================
If you are cross-compiling from Debian, you can use something
along those lines:
- make distclean ; \
+ ./bootstrap; \
CC=i586-mingw32msvc-gcc \
./configure --host=i586-mingw32msvc --build=i386-linux \
--with-gtk-config-path=/usr/local/gtk-win32/bin \
If you are cross-compiling using the mingw32 package provided by
www.videolan.org, you have to use something along those lines:
+ ./bootstrap; \
CC=i586-mingw32msvc-gcc \
PATH=/usr/local/cross-tools/bin:$PATH \
./configure --host=i586-mingw32msvc --build=i386-linux \
If you are compiling natively on Windoze, then you can use something
along those lines:
+ ./bootstrap; \
./configure \
--with-gtk-config-path=/c/dev/gtk-win32/bin \
--with-sdl-config-path=/c/dev/SDL-1.2.3-win32/i386-mingw32msvc/bin \
--with-directx=/c/dev/dxheaders \
--with-dvdcss-tree=../libdvdcss-win
+If you are using cygwin, you can build vlc with or without the unix emulation
+layer (without is usually better). To build without the emulaion layer, use
+something like this:
+ ./bootstrap; \
+ CC="gcc -mno-cygwin" \
+ ./configure \
+ --with-gtk-config-path=/cygdrive/c/dev/gtk-win32/bin \
+ --with-sdl-config-path=/cygdrive/c/dev/SDL-1.2.3-win32/i386-mingw32msvc/bin \
+ --with-directx=/cygdrive/c/dev/dxheaders \
+ --with-dvdcss-tree=../libdvdcss-win
+If you want to use the emulation layer, then just omit the CC="gcc -mno-cygwin"
+line.
+
Note: when using the --with-dvdcss-tree you need to compile the tree
beforehand.
LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
LIBEXT=".dylib"
;;
- x*mingw32*)
- SYS=mingw32
- AC_CHECK_TOOL(WINDRES, windres, :)
- CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
- LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
- LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
- LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
- LDFLAGS_access_http="${LDFLAGS_http} -lws2_32"
- LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
- LIBEXT=".dll"
- ;;
- x*cygwin*)
- SYS=cygwin
+ x*mingw32* | x*cygwin*)
AC_CHECK_TOOL(WINDRES, windres, :)
LIBEXT=".dll"
+
+ case "x${target_os}" in
+ x*mingw32*)
+ SYS=mingw32
+ ;;
+ x*cygwin*)
+ dnl Check if we are using the mno-cygwin mode in which case we are
+ dnl actually dealing with a mingw32 compiler.
+ AC_EGREP_CPP(yes,
+ [#ifdef WIN32
+ yes
+ #endif],
+ SYS=mingw32, SYS=cygwin)
+ ;;
+ esac
+
+ if test "x$SYS" = "xmingw32"; then
+ CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
+ CPPFLAGS="${CPPFLAGS_save}"
+ LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
+ LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
+ LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
+ LDFLAGS_access_http="${LDFLAGS_http} -lws2_32"
+ LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
+ fi
;;
x*nto*)
SYS=nto
[ --enable-directx Win32 DirectX support (default enabled on Win32)])
if test "x${enable_directx}" != "xno"
then
- if test "x${SYS}" = "xmingw32"
+ if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"
then
AC_ARG_WITH(directx,
[ --with-directx=PATH Win32 DirectX headers])
dnl
AC_ARG_ENABLE(waveout,
[ --enable-waveout Win32 waveOut module (default enabled on Win32)])
-if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
- then
+if test "x${enable_waveout}" != "xno"; then
+ if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
PLUGINS="${PLUGINS} waveout"
LDFLAGS_waveout="-lwinmm"
+ fi
fi
dnl
* aout.c: Windows DirectX audio output method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: directx.c,v 1.1 2002/10/05 17:29:50 gbazin Exp $
+ * $Id: directx.c,v 1.2 2002/10/06 19:28:28 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#include <vlc/aout.h>
#include "aout_internal.h"
+#include <windows.h>
#include <mmsystem.h>
#include <dsound.h>
* vout.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: directx.c,v 1.2 2002/10/05 17:29:50 gbazin Exp $
+ * $Id: directx.c,v 1.3 2002/10/06 19:28:28 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#include <vlc/intf.h>
#include <vlc/vout.h>
+#include <windows.h>
#include <ddraw.h>
#include "netutils.h"
* events.c: Windows DirectX video output events handler
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: events.c,v 1.2 2002/10/01 20:43:35 ipkiss Exp $
+ * $Id: events.c,v 1.3 2002/10/06 19:28:28 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
HDC hdc;
HMENU hMenu;
HICON vlc_icon = NULL;
- char vlc_path[_MAX_PATH+1];
+ char vlc_path[MAX_PATH+1];
msg_Dbg( p_vout, "DirectXCreateWindow" );
/* Get the Icon from the main app */
vlc_icon = NULL;
- if( GetModuleFileName( NULL, vlc_path, _MAX_PATH ) )
+ if( GetModuleFileName( NULL, vlc_path, MAX_PATH ) )
{
vlc_icon = ExtractIcon( hInstance, vlc_path, 0 );
}