wiki:NativesWin32Build
Last modified 15 years ago Last modified on 10/30/09 12:20:28

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://www.asteasolutions.net/~nenko/mingw+msys.rar:
    • binutils - (version used in this document is 2.19.1)
    • gcc-core - (version used in this document is 4.4.0) - contained in gcc-core-4.4.0-mingw32-bin.tar.gz and gcc-core-4.4.0-mingw32-dll.tar.gz
    • gcc-g++ - (version used in this document is 4.4.0) - contained in the files gcc-c++-4.4.0-mingw32-bin.tar.gz and gcc-c++-4.4.0-mingw32-dll.tar.gz
    • gmp (version used in this document is 4.2.4)
    • mingwrt-dev - (version used in this document is 3.15.2)
    • mingwrt-dll - (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)
    • mpfr - version used in this document is (2.4.1)
    • extract all files to msys/mingw directory
    • 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. The console should seem happy that you do not have msys/mingw/bin/make.exe - this is normal.
    • download and unpack 'coreutils'(it is contained in the rar file mentioned above). 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
    • checkout 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

To build the swfdec library:

  • download the build.rar and unrar it into the mingw directory. This archive contains the pre-built binaries for the required libraries as well as already built binaries for swfdec library and the pkg-config binary. The full list of libraries in the rar is:
    • atk-1.0
    • cairo
    • fontconfig
    • freetype2
    • gail-1.0
    • glib-2.0 (gio-2.0,gthread-2.0, gobject-2.0, gmodule-2.0)
    • gtk-2.0
    • liboil-0.3
    • libpng12
    • libsoup-2.4
    • libxml2
    • pango-1.0
    • zlib1
    • tiff
    • libcharset
    • iconv
    • expat
    • jpeglib
    • libpng
    • pthread
    • bz2
    • swfdec
      It is strongly recommended to use this rar instead of building all the libraries separately as this would take up to 30 hours.
  • install perl on your computer: click on the active perl from here http://www.activestate.com/activeperl/ and follow the instructions. Choose the folder c:/msys as instalation directory(edit the path as necessary to point to your msys installation).
  • if you have not added c:/msys/mingw/bin to your PATH then do so. To do that: right-click on My Computer;select Properties; select advanced; go to "environment variables". Find the variable named PATH ,select edit and add to the end of the value ";c:/msys/mingw/bin"
  • download the file swfdec-0.9.2.tar.gz and uncompress it (this can be done using 7-zip or winrar) and navigate to the newly created folder(0.9.2 is the version of swfdec used in the document). It is important to use this tar.gz not the ordinary swfdec-0.9.2.tar.gz because the common distribution can not run on windows.
  • open msys and navigate to the newly created folder(swfdec-0.9.2)and type:
    PKG_CONFIG_PATH=C:/msys/mingw/lib/pkgconfig (here change C:/msys to the path to the msys installation)
    ./configure --enable-gtk=no --enable-gstreamer=no --with-audio=none --prefix=/mingw
  • while still in the swfdec-0.9.2 folder type: make install

On some installations depending on the msys and perl installations sometimes an error occures while executing the last command. The output contains information about errors found in the file swdfdec_enums.h . If such an error occurs, open the file swfdec-0.9.2/swfdec/swfdec_enums.h in a text editor and comment out( add double slash("") in the beging of) the lines containing filepath (lines number 10,13,18,21, 24 and 27). After doing so type(again) the command: make install
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