Win32CompileMSYSNew: Difference between revisions

From VideoLAN Wiki
Jump to navigation Jump to search
m Titles starts at level 2
Line 1: Line 1:
=Introduction=
== Introduction ==
 
MSYS is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the fastest way to build VLC natively on Windows.
MSYS is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the fastest way to build VLC natively on Windows.


This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in  June 2009.
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in  June 2009.


=Install MinGW=
 
== Install MinGW ==
 
Use the main installer 5.1.4 found at
Use the main installer 5.1.4 found at
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.4/MinGW-5.1.4.exe/download
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.4/MinGW-5.1.4.exe/download
Line 16: Line 19:
*mingw32-make-3.81
*mingw32-make-3.81


=Install MSYS=
 
== Install MSYS ==
 
* Install 7-zip and Mozilla Firefox
* Install 7-zip and Mozilla Firefox
* Install MSys 1.0.11-rc1 with the exe: http://sourceforge.net/project/downloading.php?group_id=2435&filename=MSYS-1.0.11.exe
* Install MSys 1.0.11-rc1 with the exe: http://sourceforge.net/project/downloading.php?group_id=2435&filename=MSYS-1.0.11.exe
Line 24: Line 29:
* Install MSys Developer Tooltkit: http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe
* Install MSys Developer Tooltkit: http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe


== AutoTools ==
=== AutoTools ===
 
Update your autoconf, automake and libtool by downloading and installing them, keeping in mind that you need to extract the content of the usr folder in C:\Msys
Update your autoconf, automake and libtool by downloading and installing them, keeping in mind that you need to extract the content of the usr folder in C:\Msys
* http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download
* http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download
Line 34: Line 40:
* http://www.mingw.org/wiki/msys
* http://www.mingw.org/wiki/msys


=Install other tools=
 
== Install other tools ==


Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz, extract it to mingw/bin.
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz, extract it to mingw/bin.
Line 43: Line 50:
Extract the .tar.bz2 file. It contains wget.exe in the bin subfolder, extract it to mingw/bin.
Extract the .tar.bz2 file. It contains wget.exe in the bin subfolder, extract it to mingw/bin.


== Install Git and checkout VLC==
=== Install Git and checkout VLC ===


See [[Git_Windows]].
See [[Git_Windows]].
Line 49: Line 56:
You can also retrieve the source code from [http://www.videolan.org/vlc/download-sources.html VideoLAN Project: VLC media player source code]
You can also retrieve the source code from [http://www.videolan.org/vlc/download-sources.html VideoLAN Project: VLC media player source code]


== PKG-CONFIG==  
=== PKG-CONFIG ===
 
pkg-config is a mess, this is not NEWS... And you cannot compile it from Windows because of a few bugs...
pkg-config is a mess, this is not NEWS... And you cannot compile it from Windows because of a few bugs...


Line 58: Line 66:
Unzip it to C:\Msys.
Unzip it to C:\Msys.


=Contribs=
 
== Contribs ==
 
Take the precompiled contribs from:
Take the precompiled contribs from:
  http://people.videolan.org/~jb/Contribs/
  http://people.videolan.org/~jb/Contribs/
Line 66: Line 76:
  rm -v /usr/win32/bin/moc /usr/win32/bin/uic /usr/win32/bin/rcc
  rm -v /usr/win32/bin/moc /usr/win32/bin/uic /usr/win32/bin/rcc


=Bootstrap VLC=
 
== Bootstrap VLC ==
 
  cp -v /usr/win32/share/aclocal/* m4/
  cp -v /usr/win32/share/aclocal/* m4/
  cp -v /usr/share/aclocal/* m4/
  cp -v /usr/share/aclocal/* m4/
Line 72: Line 84:
It should warn about gettext... Just ignore.
It should warn about gettext... Just ignore.


=Configure=
 
== Configure ==
 
  sh extras/package/win32/configure-msys.sh
  sh extras/package/win32/configure-msys.sh
* If you downloaded a VLC source code tarball, you cant retrieve ''configure-msys.sh'' and ''configure-common.sh'' from [[http://git.videolan.org/?p=vlc.git;a=summary vlc.git]] / extras / package / win32 /
* If you downloaded a VLC source code tarball, you cant retrieve ''configure-msys.sh'' and ''configure-common.sh'' from [[http://git.videolan.org/?p=vlc.git;a=summary vlc.git]] / extras / package / win32 /


=Compile=
 
== Compile ==
 
  PATH=/usr/win32/bin:$PATH make
  PATH=/usr/win32/bin:$PATH make
If you have Cygwin and others tools installed, try using a shorter PATH inside MSYS shell i.e.
If you have Cygwin and others tools installed, try using a shorter PATH inside MSYS shell i.e.
  $ echo $PATH
  $ echo $PATH
  .:/usr/local/bin:/mingw/bin:/bin
  .:/usr/local/bin:/mingw/bin:/bin

Revision as of 14:52, 20 October 2009

Introduction

MSYS is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the fastest way to build VLC natively on Windows.

This howto was re-created by Jean-Baptiste Kempf and updated in June 2009.


Install MinGW

Use the main installer 5.1.4 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.4/MinGW-5.1.4.exe/download

Go through the wizard, selecting "Downloading and Install" and using the candidate release. Select gcc, g++ and MinGW make. It should download automatically:

  • mingwrt-3.15
  • w32api-3.12
  • binutils-2.18
  • gcc-core-3.4.5
  • gcc-g++-3.4.5
  • mingw32-make-3.81


Install MSYS

Accept Post Install: [y]
MinGW Installed? :   [y]
path to MinGW:       [c:/MinGW]

AutoTools

Update your autoconf, automake and libtool by downloading and installing them, keeping in mind that you need to extract the content of the usr folder in C:\Msys

You can also compile them according to:


Install other tools

Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz, extract it to mingw/bin.

Installation of wget too: http://prdownloads.sourceforge.net/mingw/wget-1.9.1-mingwPORT.tar.bz2

Although this is a mingwPORT package it already has a precompiled wget on board. Extract the .tar.bz2 file. It contains wget.exe in the bin subfolder, extract it to mingw/bin.

Install Git and checkout VLC

See Git_Windows.

You can also retrieve the source code from VideoLAN Project: VLC media player source code

PKG-CONFIG

pkg-config is a mess, this is not NEWS... And you cannot compile it from Windows because of a few bugs...

Get Glib from GNOME: http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip Unzip it to C:\Msys.

Get PKG-CONFIG from GNOME: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-0.23-2.zip Unzip it to C:\Msys.


Contribs

Take the precompiled contribs from:

http://people.videolan.org/~jb/Contribs/

Copy them in your ~

tar xvjf contrib-20090813-win32-bin-gcc-4.2.1-sjlj-runtime-3.15.2-only.tar.bz2 -C /
rm -v /usr/win32/bin/moc /usr/win32/bin/uic /usr/win32/bin/rcc


Bootstrap VLC

cp -v /usr/win32/share/aclocal/* m4/
cp -v /usr/share/aclocal/* m4/
PATH=/usr/win32/bin:$PATH ./bootstrap

It should warn about gettext... Just ignore.


Configure

sh extras/package/win32/configure-msys.sh
  • If you downloaded a VLC source code tarball, you cant retrieve configure-msys.sh and configure-common.sh from [vlc.git] / extras / package / win32 /


Compile

PATH=/usr/win32/bin:$PATH make

If you have Cygwin and others tools installed, try using a shorter PATH inside MSYS shell i.e.

$ echo $PATH
.:/usr/local/bin:/mingw/bin:/bin