Difference between revisions of "History:How to Build Picard for Windows"

From MusicBrainz Wiki
(Download the Picard source code: Download information)
(Requirements: Added mutagen)
Line 15: Line 15:
 
* [http://www.py2exe.org/ py2exe]
 
* [http://www.py2exe.org/ py2exe]
 
* [http://ffmpeg.org/ FFmpeg]
 
* [http://ffmpeg.org/ FFmpeg]
 +
* [http://code.google.com/p/quodlibet/wiki/Mutagen Mutagen]
 
* [[libdiscid]]
 
* [[libdiscid]]
 
* [http://code.google.com/p/musicip-libofa/ LibOFA]
 
* [http://code.google.com/p/musicip-libofa/ LibOFA]

Revision as of 07:33, 18 June 2009

How to build Picard for Windows

Disclaimer

This HowTo is work in progress and terribly incomplete. Currently it is more a collection of notes which can help you to build Picard on Windows, but it is not a real step by step instruction.

About

This HowTo explains the process of building the Picard installer for Windows from source using the MinGW build environment.

Requirements

Install Python, PyQt and py2exe

Install NSIS

Install MinGW and Minsys

Build libavformat/libavcodec

Download the FFmpeg source code and extract it to a directory. From inside the MSYS shell change to that directory and run:

./configure --prefix=C:/MinGW \
  --extra-cflags="-mno-cygwin -mms-bitfields" \
  --extra-ldflags="-Wl,--add-stdcall-alias" \
  --enable-memalign-hack \
  --target-os=mingw32 \
  --enable-shared \
  --disable-static \
  --disable-ffmpeg \
  --disable-ffplay \
  --disable-ffserver \
  --disable-vhook \
  --disable-muxers \
  --disable-demuxers \
  --enable-demuxer=aac \
  --enable-demuxer=ac3 \
  --enable-demuxer=ape \
  --enable-demuxer=flac \
  --enable-demuxer=mpc \
  --enable-demuxer=mpc8 \
  --enable-demuxer=ogg \
  --enable-demuxer=wav \
  --disable-bsfs \
  --disable-filters \
  --disable-parsers \
  --enable-parser=aac \
  --enable-parser=ac3 \
  --enable-parser=mpegaudio \
  --disable-protocols \
  --enable-protocol=file \
  --disable-indevs \ 
  --disable-outdevs \
  --disable-encoders \
  --disable-decoders \
  --enable-decoder=aac \
  --enable-decoder=ac3 \
  --enable-decoder=alac \
  --enable-decoder=flac \
  --enable-decoder=mp2 \
  --enable-decoder=mp3 \
  --enable-decoder=mpc7 \
  --enable-decoder=mpc8 \
  --enable-decoder=ape \
  --enable-decoder=wavpack \
  --enable-decoder=vorbis \
  --enable-decoder=wmav1 \
  --enable-decoder=wmav2 \
  --enable-decoder=tta \
  --enable-decoder=pcm_alaw \
  --enable-decoder=pcm_dvd \
  --enable-decoder=pcm_f32be \
  --enable-decoder=pcm_f32le \
  --enable-decoder=pcm_f64be \
  --enable-decoder=pcm_f64le \
  --enable-decoder=pcm_s16be \
  --enable-decoder=pcm_s16le \
  --enable-decoder=pcm_s16le_planar \
  --enable-decoder=pcm_s24be \
  --enable-decoder=pcm_daud \
  --enable-decoder=pcm_s24le \
  --enable-decoder=pcm_s32be \
  --enable-decoder=pcm_s32le \
  --enable-decoder=pcm_s8 \
  --enable-decoder=pcm_u16be \
  --enable-decoder=pcm_u16le \
  --enable-decoder=pcm_u24be \
  --enable-decoder=pcm_u24le

Build the libraries with

make

Download the Picard source code

See Picard Download for instructions on how to obtain the source code of Picard.

Install libdiscid and libofa

Build the Picard installer

Configure Picard:

python setup.py config --compiler mingw32 --library-dirs C:\MinGW\lib --include-dirs C:\MinGW\include

Build Picard and create the installer:

python setup.py build --compiler mingw32 bdist_nsis

Known issues

  • It is possible that the resulting picard.exe does not show the proper file icon. This is probably a bug of py2exe on Vista. You can fix the icon with the tool Resource Hacker or any other tool, that can edit the resources in executables.