There are three ways you can do this:


The manual method

Requirements:

Steps:

  1. Download the MusicBrainz Client Library / SDK. Extract it to c:\projects\musicbrainz\. Copy musicbrainz.dll somewhere into your path. (I chose \perl\bin).
  2. Download the source packages for MusicBrainz::Queries, MusicBrainz::Client, and MusicBrainz::TRM.
  3. Extract the perl sources into c:\projects\musicbrainz\
  4. 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\include
    
    These 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.
  5. To create the ppm:
    "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.tar
    nmake ppd
    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.
    If the tar.gz file is in the same directory as the .ppd, it should look like this:
    <CODEBASE HREF="MusicBrainz-Queries.tar.gz" />
  6. 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:

Steps:

  1. Download mb_build.zip [207k]. Extract it and launch "build.bat"
  2. 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 for Activeperl build 633, which is basically perl 5.6.1. They will not work with perl 5.8.
These ppm's are built for Activeperl build 810, which is basically perl 5.8.4.
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



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.