Commit eddf1236 authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac.in: vlc can now be built under cygwin with or without the
   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.
parent 81478e4f
......@@ -23,12 +23,15 @@ Building VideoLAN Client from the source code
=============================================
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
......@@ -44,7 +47,7 @@ You first need to download a linux cross-compiler version of mingw32.
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
......@@ -69,6 +72,13 @@ The same is true for the SDL package, it is installed in
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
=====================
......@@ -80,7 +90,7 @@ See `./configure --help' for more information.
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 \
......@@ -91,6 +101,7 @@ along those lines:
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 \
......@@ -101,12 +112,26 @@ www.videolan.org, you have to use something along those lines:
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.
......
......@@ -95,21 +95,34 @@ case "x${target_os}" in
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
......@@ -1483,7 +1496,7 @@ AC_ARG_ENABLE(directx,
[ --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])
......@@ -1667,10 +1680,11 @@ dnl win32 waveOut plugin
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
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -34,6 +34,7 @@
#include <vlc/aout.h>
#include "aout_internal.h"
#include <windows.h>
#include <mmsystem.h>
#include <dsound.h>
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -42,6 +42,7 @@
#include <vlc/intf.h>
#include <vlc/vout.h>
#include <windows.h>
#include <ddraw.h>
#include "netutils.h"
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -246,7 +246,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
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" );
......@@ -290,7 +290,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
/* 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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment