wiki:NativesWin32Build

Version 3 (modified by nenko, 16 years ago) (diff)

--

In order to build the natives you need :

To build the natives on MS Windows

  • for a compiler you can use MinGW - minimalist GNU for Windows
  • also you will need a bash (like) shell for the configure and make files - msys, minimal system (Bourne shell), part of MinGW project

There are two ways to install MinGW. The first one is to use installer. This is the preffered way but right now the installer downloads a w32api-mingw32 that is a corrupt file. So this way doesn't work (at least at the moment of wrting of this document). The other one is manual installation.

Steps for manual installation:

  • create a directory named 'msys'
  • in it create a directory named 'mingw'
    • For example : C:/msys/mingw
  • download from the minGW project, there is a convenient archive file that contains them all - http://asteasolutions.net/~nenko:
    • binutils - (version used in this document is 2.19.1)
    • gcc-core - (version used in this document is 4.2.1)
    • gcc-g++ - (version used in this document is 4.2.1)
    • mingwrt - (version used in this document is 3.15.2)
    • mingwrt-mingw32dll - (version used in this document is 3.15.2)
    • w32api-mingw32-dev - should be at least 3.13 version in order to build ffmpeg (version used in this document is 3.13)
    • extract all files to msys/mingw directory
    • go to msys/mingw/bin directory and rename
      • c++-sjlj.exe to c++.exe
      • cpp-sjlj.exe to cpp.exe
      • g++-sjlj.exe to g++.exe
      • gcc-sjlj.exe to gcc.exe
    • download msys - (version used in this document is 1.0.11)
    • install msys to msys/ directory created before - it is very important to install msys, after you install MinGW, otherwise you should make changes in the configuration of msys
      • For example: C:/msys
    • if everything is OK a console should be opened and you will be promted whether have a MinGW installed and where it is
    • download and unpack 'coreutils'. The unpacked folder contains many UNIX commands and you can copy the one you need. For building ffmpeg you need 'pr'. So copy pr.exe to msys/bin directory
    • checout the natives from the svn
    • the folder structure in sophie2-natives is the following:
      • lib-src - containing the source code for the libraries we depend on
      • lib-target - contains the built libraries
      • src - contains the natives code
      • junk - contains junk. The building happens in this folder

To build the ffmpeg library:

  • start msys - usually there's an icon on the Desktop
    • you will see bash (like) console. You can access your local drives with the following command:
      • cd c:/msys/
      • cd c:
    • go to sophie2-native
      • For example: cd c:/sophie2-natives/
      • create a text file custom.mk that contains the line - PLATF=win32
      • go to sophie2-native/lib-src
        • For example: cd c:/sophie2-natives/lib-src or cd lib-src
      • execute make ffmpeg or make all (make all will build all libraries)
        • For example: make ffmpeg

References:

http://www.mingw.org/
http://ffmpeg.arrozcru.org/wiki/index.php?title=MSys_MinGW
http://en.wikipedia.org/wiki/Make_(software)
http://www.gnu.org/software/make/
http://asteasolutions.net/~nenko

GROUP_WRAPPERS_R0
MEDIA_ENGINE_IMPL_MAIN_R2