Difference between revisions of "Win32Compile"
Line 51: | Line 51: | ||
$ git clone git://git.videolan.org/vlc.git | $ git clone git://git.videolan.org/vlc.git | ||
− | == 3rd party libraries | + | == Prepare[[Contrib Status|3rd party libraries]] == |
− | VLC | + | Before compiling VLC, you need lots of other libraries. Here is how to get them: |
− | + | $ cd contrib | |
− | + | $ mkdir -p wiN32 && cd win32 | |
− | + | $ ../bootstrap --host=i586-mingw32-msvc | |
− | + | $ make prebuilt | |
− | |||
− | |||
− | |||
− | |||
== Configuring the build == | == Configuring the build == |
Revision as of 23:12, 2 December 2011
How to compile VLC for Windows
Contents
Building Methods
If you want to build VLC from source, you have several choices:
Method | Documentation | Notes |
---|---|---|
Cross-compile with Mingw on Linux | This page | Preferred method (uses cross compilation). On Windows, you should do it in a virtual machine. Note: read Win32CompileFedora13 if building on Fedora 13 |
Native compilation with MSYS+MINGW | Win32CompileMSYSNew | Native compilation method. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows. |
Native compilation with cygwin | Win32CompileCygwinNew | Build using cygwin as your compile environment. Error prone, and slow. |
Obtaining the toolchain
Each build method requires its own toolchain:
Method | Notes |
---|---|
Cross-compile with mingw32 on GNU/Linux |
|
Native-compile with MSYS+MINGW | Read the documentation |
Native-compile with Cygwin | Read the documentation |
Get the source code
$ git clone git://git.videolan.org/vlc.git
Prepare3rd party libraries
Before compiling VLC, you need lots of other libraries. Here is how to get them:
$ cd contrib $ mkdir -p wiN32 && cd win32 $ ../bootstrap --host=i586-mingw32-msvc $ make prebuilt
Configuring the build
First of all, GetTheSource then run ./bootstrap
.
Once you've got all the files you need in place, you need to configure the build with the ./configure
script.
Good configure examples can be found in some files (in git). From the vlc source base directory you could run:
extras/package/win32/configure.sh --with-contrib=/usr/win32 --host=i586-mingw32msvc
extras/package/win32/configure.sh --with-contrib=/path/to/folder/containing/contribs
or just run configure manually, like
./configure --with-contrib=/usr/win32 --host=i586-mingw32msvc
See './configure --help'
for more information.
Building VLC
Once configured, to build VLC, just run 'make'
.
Once the compilation is done, you can either run VLC directly from the source tree or you can build self-contained VLC packages with the following make
rules:
Command | Description |
---|---|
make package-win32-strip (might be package-win-strip)
|
Creates a subdirectory named vlc-x.x.x with all the binaries 'stripped' (that is, smallest size, unusable with a debugger)
|
make package-win32-7zip
|
Same as above but will package the directory in a 7z file. |
make package-win32-zip
|
Same as above but will package the directory in a zip file. |
make package-win32
|
Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work. |
Well done—you're ready to use VLC!