⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cygwin-compile.txt

📁 这是一个很好的文档
💻 TXT
📖 第 1 页 / 共 4 页
字号:
This document is constantly under construction :P
=================================================

Document : Cygwin environment under Windows (9x/ME/XP/2000/2003)

Version  : 20050627 Initial version
           20050628 Updated some more exceptions
           20050628 Some info added about FFmpeg compiling with AMR
           20050629 Finalized FFmpeg compiling
           20050630 Cross-compiling
           20050724 Some extra compile explanations
           20050726 Removed cross-compiling (was for linux -> win32)
                    Patching source code with .diff files
           20050823 Added zlib error
           20050923 --enable-sdl --with-sdl-config-path=/usr/win32/bin added
                    to configure. Added debug section
           20051102 Changed FFmpeg lib names
           20051128 Detailed Cygwin upgrade/downgrade for gcc 3.3
                    Renamed some update scripts. Added FFmpeg CVS update.
                    --disable-gnomevfs added to configure (only used on linux)
           20060121 PKG_CONFIG_PATH=/usr/win32/lib/pkgconfig added to configure
           20060128 Added curl and libtool to Cygwin for those that want to be
                    able to build extras/contrib themselves
           20060217 Added make install-libs install-headers to FFmpeg compile
           20060222 Remark about missing "gettext" libs for Cygwin during install
           20060225 ./bootstrap: you need libtool
           20060618 Updated GCC to 3.4 version and added FFmpeg SVN and DTS support
           20060805 Added note about using older binutils and gdb for Cygwin!
           20060915 Added note about updating autoconf from extras/contrib for
                    an OBJC problem during configure

Based on : "Win32 Cygwin Environment" Rev. B (20041003)
           by Mark Moriarty
           "Win32 Compile HOWTO" (20050513)
           by Gildas Bazin and Olivier Teuli鑢e  


1        Introduction
=====================

This is a guide for the Cygwin compilation environment for Windows users
including a step-by-step instructions to download, install and configure
the following packages on your system:

1.  SVN (Subversion): Version control system that will let you "download"
    the latest VLC source code from a so called "repository".

2.  Libraries:
    - "Contrib" package: Precompiled library package (with DTS support)

    Optional updated libraries:
    - FFmpeg (with AMR support)
    - x264 for encoding H.264 video 
    - live555 (old name live.com) for RTP/RTCP/RTSP/SIP multimedia streaming

3.  Cygwin: Linux-like environment for Windows that will be used for the
    compilation of the VLC source code.

NOTE: The best approach is to first start getting comfortable with building
VLC from the precompiled library package before using updated or additional
libraries.


2        VLC source code
========================

The very latest VLC source code can be obtained through a tool called SVN
(Subversion). It's also possible to download a daily "snapshot" of the code.

The preferred method is to use SVN.

Start by creating a download folder on your hard drive where you can put all
the installation files:

C:\Downloads          (example)


2.1      SVN (Subversion)
=========================

The subversion tool can be found at the following location:

http://subversion.tigris.org/project_packages.html#binary-packages

The latest command-line binaries for Windows are referred to at the
"Windows NT, 2000, XP and 2003" section and should link to:

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91

Download the latest stable "Windows installer with the basic win32 binaries"

svn-1.3.1-setup.exe          (example)

and save it into a subfolder in your download location:

C:\Downloads\SVN          (example)

Run the installer and perform a basic installation.

NOTE: If you are upgrading from a previous version make sure to first uninstall
the older version otherwise upgrading runs into problems with the inability to
overwrite some .dll files.


2.2      VLC source code "snapshot"
===================================

Another way of obtaining source code is by downloading a daily code "snapshot"
from the following location:

http://nightlies.videolan.org/build/source

Download the latest snapshot:

vlc-snapshot-20060616.tar.gz        (example)

and save it into a subfolder in your download location:

C:\Downloads\VLC\src        (example)

Check if the downloaded file has not been renamed by Internet Explorer in your
download folder to something with the extension .tar.tar and if so then simple
rename the files back to .tar.gz


3       Adding libraries to the source code
===========================================

VLC depends on other libraries (code) to provide some features like AC3 audio
or MPEG-4 video encoding/decoding etc.

Depending on your needs you will have to install and compile some or all of
these external libraries. Most of them can be found here (source code):

http://download.videolan.org/pub/testing/contrib/


3.1      "Contrib" package
==========================

A package with most of these libraries already compiled so it's actually really
easy to compile a full-featured version of vlc can be found here:

http://download.videolan.org/pub/testing/win32/

Download the latest version of a "contrib" package for win32

contrib-20060730-win32-bin-gcc-3.4.5-only.tar.bz2          (example)

and save it into a subfolder in your download location:

C:\Downloads\VLC\contrib          (example)

Check if the file has not been renamed by Internet Explorer in your download
folder to something with the extension .tar.tar and if so then simple rename
the file back to .tar.bz2

Also remember the "gcc-3.4.5" part in the "contrib" package filename since it
relates to the GCC version that needs to be installed in Cygwin lateron!


3.2      "Contrib" packages for older GCC versions
==================================================

For historical reasons older versions of the "contrib" package are provided at
the following location:

http://download.videolan.org/pub/testing/win32/contrib-old-gcc-3.3-only/

Download the latest version of a "contrib" package for win32

contrib-20051213-win32-bin-gcc3.3.1-only.tar.bz2          (example)

and save it into a subfolder in your download location:

C:\Downloads\VLC\contrib          (example)

NOTE: gcc3.3.1-only in the filename means it was (obviously) intended for
compilation with GCC 3.3 only. The latest gcc-3.4.5-only "contrib" packages
should compile just fine with GCC 3.3 so it's preferred to always use those.


3.3      Adding additional or updated libraries to the source
=============================================================

Updated libraries for FFmpeg and x264 are available through SVN (which is
discussed in a later stage of this guide).


3.3.1    live555 "snapshot"
===========================

More info about live555 can be found at:

http://www.live555.com

The project source code is available here:

http://live555.com/liveMedia/public/

Download the latest snapshot:

live.2006.05.17.tar.gz          (example)

NOTE: live555-latest.tar.gz is also the latest version but keeping the date
in the filename makes it easier to reference.

and save it into a subfolder in your download location:

C:\Downloads\VLC\src        (example)

Check if the downloaded file has not been renamed by Internet Explorer in your
download folder to something with the extension .tar.tar and if so then simple
rename the files back to .tar.gz


4        Cygwin
===============

More info about Cygwin can be found at:

http://www.cygwin.com

Download the latest Cygwin setup.exe (at the section install or update now):

http://www.cygwin.com/setup.exe

and save it into a subfolder in your download location:

C:\Downloads\cygwin          (example)


4.1      Selecting Cygwin packages to install
=============================================

Run the installer.

Installation type        :  Install from Internet (default)
Root Install directory   :  C:\cygwin (default)
Local Package directory  :  C:\Downloads\cygwin (your download location)
Internet Connection      :  Direct Connection (preferred, if it fails try other)
Download Site            :  Choose a download site closest to you (FTP preferred)

At the "Select Packages" section of the installation process you can select
packages by clicking the button with the rotating 2 arrows. (This is under
the "New" section). It shows "Skip" next to the button if the package isn't
selected yet.

Clicking the button a few times will rotate through the possible package
versions including "Skip" (meaning do not install or remove if installed)
and "Keep" (meaning keep using the current installed version). If a package
was already installed it will also show the "Current" version just to the
left of it.

Select the following packages (open the category by clicking on the + sign):

+ Archive
1.  ->  5.50-5          unzip           (recommended: goes hand in hand with zip utility)
2.  ->  2.3-6           zip             (required: to make self contained zip packages)

+ Devel
3.  ->  1.9.6-1         automake1.9     (> 1.5 required)
        2.59-2          autoconf        autoselected
        2.13-1          autoconf2.1     autoselected
        2.59-2          autoconf2.5     autoselected
        20060709-1      binutils        autoselected ->	CHANGE to 20050610-01
4.  ->  1.11.17-1       cvs             (required for autopoint)
5.  ->  3.4.4-1         gcc-g++
        3.4.4-1         gcc-core        autoselected
6.  ->  20040810-1      gcc-mingw
        20050522-1      gcc-mingw-core  autoselected
        20050522-1      gcc-mingw-g++ 	autoselected
7.  ->  20060706-2      gdb             (optional: for debugging purposes) -> CHANGE to 20041228-3
8.  ->  0.14.5-1        gettext-devel
        0.14.5-1        gettext         autoselected
9.  ->  1.5.22-1        libtool1.5
10. ->  3.81-1          make
        3.10-1          mingw-runtime   autoselected
11. ->  0.98.39-1       nasm            (optional: for compiling x264 encoder)	
12. ->  0.2.31-1        patchutils      (optional: for patching source files with .diff files)
13. ->  0.20-1          pkgconfig       (recommended: otherwise ./configure will complain about accuracy)

+ Web
14. ->  7.15.4-1        curl            (optional: for building extras/contrib)

The package version numbers are just representations of what was the most
current version available at the time this document was written. Any newer
versions should work fine as well with the exception of binutils and gdb!

NOTE: It is extremely important to DOWNGRADE binutils from 20060709-1 to
20050610-01 (will otherwise give weird results like VLC gui not opening)
and also to DOWNGRADE gdb from 20060706-2 to 20041228-3 if you decided to
install that (will otherwise crash on opening VLC). Whenever new packages
are installed or updated through the Cygwin installer, make sure not to
update these packages by keeping the old versions (using the "Keep" option).

NOTE: There have been reports of problems of missing packages during install
(particularly gettext: cyggettextsrc-0-14-1.dll not found). If you run into
these sort of problems then try selecting another Download Site from the mirror
list (the author of this document personally never had problems using funet.fi
or sunet.se).


4.2      Installing older GCC 3.3 version
=========================================

The gcc version used for compilation should match the version specified in the
"contrib" package, at present gcc-3.4.5-only. 

So the preferred version to use is GCC 3.4 but for historical reasons this
section descibes what version to use together with an older gcc-3.3.1-only
"contrib" package.

The 3.3.1 version is not available in Cygwin but 3.3.3-3 (still) is.

The only compatibility issue with using GCC 3.4 and the precompiled 3.3.1
"contrib" package is that it doesn't support the compiling of the matroska
container .mkv so that leaves 2 options:

1. Use gcc 3.3.3-3 with a 3.3.1-only "contrib"
2. Use gcc 3.4 or newer but disable matroska support

The second option requires you to add the following line to the configure options:

--disable-mkv

If you use the older gcc-g++ and gcc-core versions you have to change the
gcc-mingw-core and gcc-mingw-g++ back to the older versions as well.

Select the following package versions instead:

5. ->	3.4.4-1         gcc-g++                      ->  CHANGE to 3.3.3-3
	3.4.4-1         gcc-core        autoselected ->  CHANGE to 3.3.3-3
6. ->	20040810-1      gcc-mingw
        20050522-1      gcc-mingw-core  autoselected ->  CHANGE to 20040810-1
        20050522-1      gcc-mingw-g++ 	autoselected ->  CHANGE to 20040810-1

NOTE: The gcc-3.4.5-only "contrib" package should compile just fine with
GCC 3.3


4.2      Cygwin environment (home directory)
============================================

Start Cygwin from the icon on your desktop. If run for the first time it will
automatically create a home\"username" folder in the Cygwin environment for
which the user is the currently logged on Windows user. Let's just assume that
is Administrator for easy reference...

C:\cygwin\home\Administrator          (example)


5        Getting the latest sources
===================================

In order to have the latest source code you have to download this using SVN.

Create a new folder at your download/install location:

C:\Downloads\VLC\scripts          (example)


5.1      SVN update script for VLC
==================================

Create a new text document with 2 following lines:

"C:\Program Files\Subversion\bin\svn" checkout svn://svn.videolan.org/vlc/trunk vlc-trunk
pause

Save as filename in your "scripts" folder at your download/install location:

update-vlc.bat          (example)

NOTE: This file has the .bat extension (save using "All files" and not "Text files"
otherwise Windows might append the extension .txt). The double " (quote) signs are
required in the first part because the foldername has a space in it.

This script will download a complete svn trunk.

Copy the script file into your Cygwin "home directory":

C:\cygwin\home\Administrator


5.2      SVN update scripts for additional libraries
====================================================

Updating source code using SVN for additional libraries such as x264 or FFmpeg works
the same way.


5.2.1    SVN update scripts for x264
====================================

Create a new text document with 2 following lines:

"C:\Program Files\Subversion\bin\svn" checkout svn://svn.videolan.org/x264/trunk x264-trunk
pause

Save as filename in your "scripts" folder at your download/install location:

update-x264.bat

Copy the script file into your Cygwin "home directory":

C:\cygwin\home\Administrator


5.2.2    SVN update script for FFmpeg
=====================================

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -