Python Bindings Build HOWTO
For win32
- Install cross-compilation environment with mingw32-runtime >= 3.15 (VLC 1.0.0 requires this). E.g. Ubuntu Karmic Alpha 2.
- Follow instructions on wiki:BrowserPluginBuildHOWTO
- Retrieve python bindings via git as per wiki:VlcUbuntuHowto (intrepid instructions)
- Obtain Python 2.5.4 source, extract in build dir.
- Remove test for cross-compilation from test %zd printf() format support from configure script.
- Configure Python for cross-compile:
./configure --host=mingw32 --with-gcc=i586-mingw32msvc-gcc --with-cxx=i586-mingw32msvc-g++ --enable-shared --with-threads
- Obtain python25.dll for Python 2.5.4 from \windows\system32 after Python 2.5.4 binary installer was run, put in build dir.
- Copy bindings to compiled vlc-1.0.0
- Run following commands (supposedly the equivalent of running "python setup build build_ext" in Win32 space.
cd bindings/python
i586-mingw32msvc-gcc -mthreads -fno-strict-aliasing -g -O3 -Wall -Wstrict-prototypes -I../.. -I./../../include -I/usr/win32/include -I../../../Python-2.5.4 -I../../../Python-2.5.4/Include -c ./vlc_module.c -o ../../bindings/python/./vlc_module.o -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -O3 -ffast-math -funroll-loops -mtune=pentium2 -g
i586-mingw32msvc-g++ -Wsign-compare -Wall -mms-bitfields -pipe -shared ../../bindings/python/./vlc_module.o ../../src/.libs/libvlc.dll.a ../../../python25.dll -o ../../bindings/python/vlc.pyd -g -lkernel32 -L/usr/win32/lib -liconv /usr/win32/lib/libintl.a /usr/win32/lib/libiconv.a -lws2_32 -lnetapi32 -lwinmm -mwindows
- Copy created vlc.pyd to a checkout of the source.
- Create VLC win32 binary distro:
cd ../..
make package-win32-base
- Copy the created vlc-1.0.0 dir as vlc to the checkout.
- Run
cd checkout
copy vlc\libvlc.dll .
copy vlc\libvlccore.dll .
- Make sure VLCWrapper does not use --http-reconnect and that plugin-path is set to the checkout\vlc\plugins dir.
For Ubuntu
See VlcUbuntuHowto
|