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

From MusicBrainz Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Note}} See up-to-date docs at [https://picard.musicbrainz.org/docs/build-windows/ the dedicated Picard site].
This page explains the process of building the Picard installes for Windows. It only works for Picard 1.2 and newer, which no longer supports AmpliFIND.

----

This page explains the process of building [[MusicBrainz Picard]] and the installer for Windows. It only works for Picard 1.2 and newer, which no longer supports AmpliFIND.


== Requirements ==
== Requirements ==


* Python 2.7.x
* Python 2.7.x
** http://www.python.org/download/
** http://python.org/download/
** Download and install "Python 2.7.x Windows Installer"
** Download and install "Python 2.7.x Windows Installer"
** Add C:\Python27 to %PATH%
** Add C:\Python27 to %PATH%
* PyQt 4.9.x
* PyQt 4.10.x
** http://www.riverbankcomputing.co.uk/software/pyqt/download
** http://www.riverbankcomputing.co.uk/software/pyqt/download
** Download and install "PyQt-Py2.7-x86-gpl-4.9.x-1.exe"
** Download and install "PyQt4-4.10.x-gpl-Py2.7-Qt4.8.x-x32.exe"
* libdiscid
** http://musicbrainz.org/doc/libdiscid
** Download "libdiscid-0.6.1-win32.zip" and put "discid.dll" in your Windows\System32 folder
* Pip for Windows
** https://sites.google.com/site/pydatalog/python/pip-for-windows
** Download to a location you find again (no installation)
** in Pip_Win:
*** <code>pip install mutagen</code> for Mutagen (1.22 tested)
*** <code>pip install discid</code> for python-discid (1.1.x tested)
* gettext >= 0.15
** http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
** Download both gettext-tools-0.17.zip and gettext-runtime-0.17-1.zip and unzip both into the same directory
** Add the gettext bin folder to %PATH% (normally ''C:\Programs\GnuWin32\bin'')
* Visual C++ 2008 Express
* Visual C++ 2008 Express
** https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=14597
** http://go.microsoft.com/?linkid=7729279
** Download and install "vcsetup.exe"
** Download and install "vcsetup.exe"
* Chromaprint
* NSIS 2.46
** http://nsis.sourceforge.net/Download
** http://acoustid.org/chromaprint
** Download "chromaprint-fpcalc-1.1-win-i86.zip" and put "fpcalc.exe" to the Picard source code directory
** Download and install "nsis-2.46-setup.exe"
* Mutagen 1.20
** http://code.google.com/p/mutagen/downloads/list
** Download and unpack "mutagen-1.20.tar.gz"
** python setup.py install
* MingGW
** http://sourceforge.net/projects/mingw/files/
** Download and install the latest "mingw-get-inst-xxxx.exe"
** Uncheck the C compiler option, we need only the directory structure and mingw-get
** Add C:\MinGW\bin to %PATH%
* Gettext
** mingw-get install gettext


== Running Picard From Sources ==
== Running Picard From Sources ==


Before you can run Picard from sources, you need to build the C extension. Start the VS console using "Visual Studio 2008 Command Prompt", go to the source directory and run this command:
Before you can run Picard from sources, you need to build the C extension. Start the VS console using "Visual Studio 2008 Command Prompt", go to the source directory and run these commands:


python setup.py build_ext -i
python setup.py build_ext -i
python setup.py build_locales -i


After you have done this, you can run Picard directly from the sources using:
After you have done this, you can run Picard directly from the sources using:


python tagger.py
python tagger.py

In order to have a fully functional copy of Picard, you need to get add [http://musicbrainz.org/doc/libdiscid discid.dll] and [http://acoustid.org/chromaprint fpcalc.exe] to the source directory.


== Building the Installer ==
== Building the Installer ==


To build the installer executable you need additional Tools:
If you have done all steps necessary to run Picard from sources and it works, you can build the installer using this command:

* py2exe 0.6.9
** http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/
** Download and install "py2exe-0.6.9.win32-py2.7.exe"
* NSIS 2.46
** http://nsis.sourceforge.net/Download
** Download and install "nsis-2.46-setup.exe"

Then you need to copy msvcr90.dll and msvcp90.dll from "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT" to the source code directory, so that py2exe can find them.
You also need copy discid.dll (libdiscid) to the picard source.

Then you can build the installer using this command:


python setup.py bdist_nsis
python setup.py bdist_nsis


The setup is installer\picard-setup-1.x.exe and an executable for your system is dist\picard.exe, which you can use to create a desktop shortcut.
== 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 [http://angusj.com/resourcehacker/ Resource Hacker] or any other tool, that can edit the resources in executables.
== 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 [http://angusj.com/resourcehacker/ Resource Hacker] or any other tool, that can edit the resources in executables.


[[Category:Development]][[Category:MusicBrainz Picard]][[Category:How To]][[Category:To Be Reviewed]]
[[Category:Development]][[Category:MusicBrainz Picard]][[Category:How To]][[Category:To Be Reviewed]]

Latest revision as of 12:50, 22 May 2015

Note Note: See up-to-date docs at the dedicated Picard site.


This page explains the process of building MusicBrainz Picard and the installer for Windows. It only works for Picard 1.2 and newer, which no longer supports AmpliFIND.

Requirements

Running Picard From Sources

Before you can run Picard from sources, you need to build the C extension. Start the VS console using "Visual Studio 2008 Command Prompt", go to the source directory and run these commands:

python setup.py build_ext -i
python setup.py build_locales -i

After you have done this, you can run Picard directly from the sources using:

python tagger.py

Building the Installer

To build the installer executable you need additional Tools:

Then you need to copy msvcr90.dll and msvcp90.dll from "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT" to the source code directory, so that py2exe can find them. You also need copy discid.dll (libdiscid) to the picard source.

Then you can build the installer using this command:

python setup.py bdist_nsis

The setup is installer\picard-setup-1.x.exe and an executable for your system is dist\picard.exe, which you can use to create a desktop shortcut.

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.