There are three ways you can do this:
- The manual method. This is mostly so I can remember how to do things next time the scripts don't work. Use this if you want to compile your own source and want to learn more about how it is done. This is also useful if I have gotten lazy and not updated the ppm's in a while.
- The scripted method. I have created a build environment for people to use.
- The just do it method. You can't or won't want to compile your own sources. You just want to start scripting.
- Updates to this page.
The manual method
Requirements:
- Visual Studio 6.
- Visual Studio 6 environment variables registered.
- 7zip if you want to create ppm's
Steps:
- Download the MusicBrainz Client Library / SDK. Extract it to c:\projects\musicbrainz\. Copy musicbrainz.dll somewhere into your path. (I chose \perl\bin).
- Download the source packages for MusicBrainz::Queries, MusicBrainz::Client, and MusicBrainz::TRM.
- Extract the perl sources into c:\projects\musicbrainz\
-
You have to compile and install MusicBrainz::Queries first, because the other two depend on it.
So go a commandline in the directory where you extracted the source for it and type the following
commands:perl Makefile.pl LIBS="-LC:\projects\musicbrainz\musicbrainz-win32sdk-2.1.2\lib -lmusicbrainz" INC=-IC:\projects\musicbrainz\musicbrainz-win32sdk-2.1.2\includeThese directories are located in the "MusicBrainz Client Library / SDK" that you downloaded earlier.nmake- This is where you compile the module.nmake test- run tests to make sure everything compiled correctly.nmake install- install the module into your local perl. - To create the ppm:
Now open up MusicBrainz-Queries.ppd in a text editor and look for the CODEBASE HREF tag Put the location of MusicBrainz-Queries.tar.gz inside the HREF tag value."c:\Program Files\7-Zip\7z.exe" a -ttar MusicBrainz-Queries.tar blib\*"c:\Program Files\7-Zip\7z.exe" a -tgzip MusicBrainz-Queries.tar.gz MusicBrainz-Queries.tarnmake ppd
If the tar.gz file is in the same directory as the .ppd, it should look like this:<CODEBASE HREF="MusicBrainz-Queries.tar.gz" />
-
Now you just repeat steps 3 and 4 for the remaining two modules.
If you run into problems, email me [musicbrainz at punch.net] with details of what happened and I can try and help you out. Once I get a few problems documented I will post them here.
Problems:
Q: When I run nmake, I get the a bunch of errors, including the following:
c:\perl\lib\core\win32.h(61) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
A: Activestate uses visual studio 6 to compile activeperl. You have to use the same version to compile modules for it. You are probably using Visual Studio .net, which won't work.
The scripted method
Requirements:
- Visual Studio 6.
- Visual Studio 6 environment variables registered.
- mb_build.zip. [207k]
Steps:
- Download mb_build.zip [207k]. Extract it and launch "build.bat"
- The build environment will then download (if necessary), compile, and package the ppm's. If there are errors, or something does not work, email me [musicbrainz at punch.net] what happened and I can try and help you out. Once I get a few problems documented I will post them here.
The just do it method
These ppm's are built with Activeperl build 815, which is basically perl 5.8.7. They will not work with perl 5.6.
The easiest way to install the modules is by typing the following commands in a dos prompt:
ppm install http://www.punch.net/musicbrainz/perl/ppm/MusicBrainz-Queries.ppd ppm install http://www.punch.net/musicbrainz/perl/ppm/MusicBrainz-Client.ppd ppm install http://www.punch.net/musicbrainz/perl/ppm/MusicBrainz-TRM.ppd
I have a batch file that does this for you.
You also must download the MusicBrainz Client Library / SDK.
and copy musicbrainz.dll from the sdk into your path.
I chose \perl\bin.
Updates
- 3/11/2003 - Updated formatting and re-worded some instructions, added instructions about how to verify you have installed the Visual C++ environment variables.
- 3/10/2003 - Updated ppm's for libmusicbrainz 2.0.1 release
- 2/18/2005 - Updated ppm's for libmusicbrainz 2.1.1
- 2/20/2006 - Updated ppm's for libmusicbrainz 2.1.2, updated instructions. (thanks Martin for the kick in the pants)
- 3/31/2007 - Updated ppm's for libmusicbrainz 2.1.4, MusicBrainz::Queries 0.11, MusicBrainz::Client 0.11
Verifying you have Visual C++ environment variables registered.
Open a command prompt and type: cl<enter>.
If they are registered, you should see something like:
C:\projects\mb_build>cl Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved. usage: cl [ option... ] filename... [ /link linkoption... ]
If not it should say:
C:\projects\mb_build>cl 'cl' is not recognized as an internal or external command, operable program or batch file.
If you do not have then registered, run "VCVARS32.BAT" located in \Program Files\Microsoft Visual Studio\VC98\Bin. You must logout and back on for the changes to take affect.