How to compile VVV

Here are some instructions for building VVV in both Windows and Linux. Feel free to contact me if you have problems.

Using Windows

First you need to install the wxWidgets library. You can download the source code from www.wxwidgets.org. When this document was written the current version was 2.8.7.
Download the Windows installer and install the library. The "docs\msw\install.txt" file contains instructions about compiling the library. It is probably better to compile wxWidgets as a static library to avoid runtime dependencies. Read below about a compatibility setting problem between the wxWidgets and vvv solution files.

Then unpack the zip source file. You will find a Visual Studio 2003 solution file: "vvv.sln" that can be used to compile VVV. The solution will use the WXDIR environment variable to locate wxWidgets. To set it open Control panel/System/Advanced/Environment variables: add a variable with name WXDIR, and set the value to the path where wxWidgets is installed, for example C:\wxWidgets-2.8.7.

The source code also contains the id3lib-3.8.3 library, that is used to read MP3 tags. I have changed a file to fix a bug, so it is different from the one that you can download from Sourceforge.

The solution contains three projects. The main project is vvv and it will create the executable program. The other two projects create static libraries. All three projects, in the Release configuration, have the C/C++/Code Generation/Runtime Library set to Multi-threaded (/MT). This is a non-standard setting used to remove dependencies from the runtime library. The wxWidgets project files use a different setting so the code will not be compatible and will cause build errors.
Either compile wxWidgets in release configuration using /MT or change the setting of the three projects in the vvv solution to the same value used to build wxWidgets.

Everything should be correctly configured in the solution, so you should be able to compile VVV, choosing between Debug and Release builds. In order to be able to create new catalogs you will need to copy the VVV.fbk file from the distribution archive to the working directory.

Now that you have built VVV, you need to run it. VVV uses the Firebird relational database (www.firebirdsql.org) to handle catalogs. You can install the full server or use the embedded version.

Using Linux

First you need to install the wxWidgets library. You can download the source code from www.wxwidgets.org. When this document was written the current version was 2.8.7.

You need to download the wxGTK source code and compile it. Expand the archive in a folder and read  install-gtk.txt that contains compilation instructions.
Create two folders, one for a debug build and one for a release one. In each folder you will execute the configure scritpt with different parameters.
Use --enable-debug for the debug build. For the release build I use --disable-shared to statically link wxWidgets and reduce dependencies. Configure will run and print a summary of the configuration: depending on your system it will use wxWidgets' version of many libraries or the one that is already installed. Using wxWidgets' own version of the library will reduce dependencies too. For example you can run configure with --with-expat=builtin to force configure to use the wxWidgets' version of expat instead of the one already installed in your computer. Similar switches are available for other libraries too.

Once you have compiled wxWidgets you must install the firebird database server. Some newer distributions have a package that you can download from their repositories. For example the latest versions of Mandriva and Ubuntu have such a package. Be careful to install the classic server (not superserver) version 2.0.x. Ubuntu has an older Firebird2 package that installs version 1.5.x: do not install it.
If your distribution does not have such a package you can download it from www.firebirdsql.org.
The "root" username in Firebird is called SYSDBA. Be careful with the SYSDBA password: some package will use the masterkey password, others will ask you for such a password, others will generate a random one that you can read from a file.

VVV uses id3lib-3.8.3 to read MP3 tags. The source code included in the VVV archive contains a bug fix that I have done, so it is different from the version that you can find in Sourceforge.
You can add the id3lib code to the VVV project, building it as a static library intermediate target.
I preferred to compile id3lib as a separate library, following the instructions in the INSTALL file: at the end of the process I had a static library in /usr/local/lib.

Now you must compile VVV. This will take some work.
First you need to setup your development environment to compile all the source files, usually adding them to a project.
Then you need to configure the development environment to use wxWidgets. This obviously changes from tool to tool: with KDevelop open the Project/Project Options menu and choose Configure Options.
In the General tab add $(wx-config --libs --static --debug=no) /usr/local/lib/libid3.a to the Linker flags (LDFLAGS) texbox. The first part is used for wxWidgets: it is typical for an optimized build and must match the configure options. The string for a debug build will be different. The second part is the path of the id3lib static library: you do not need this if you have set up id3lib as a subproject, of course.
In the C++ tab add $(wx-config --cxxflags --static --debug=no) -DIBPP_LINUX to the Compiler flags (CXXFLAGS) textbox. The first part is used for wxWidgets and changes between optimized and debug builds. The second part does not change and it is required by the IBPP library used to access the Firebird database.

Now you need to tell the linker to link against libfbembed.so: it is the library used to connect to the Firebird database at runtime.
In Link libraries outside project (LDADD) add -lfbembed

At this point you should be able to build VVV. In order to be able to create new catalogs you will need to copy the VVV.fbk file from the distribution archive to the working directory.