This will explain the process of downloading the source code and compiling it on your own system. This way you can get the latest revisions between official releases.
DisclaimerEven though the steps in this topic are pretty straight forward, it’s expected that you are an advanced computer user and know what you're doing. You should be able to resolve basic issues yourself.
We strongly suggest that you only compile builds on a development machine.
Only install trunk builds on other systems if you know what you're doing!
The Media Browser Project is hosted on Google Code. You can retrieve the latest source code and compile a working Media Browser version from that.
In this tutorial we're going to describe the steps involved to retrieve, compile and install a working version of Media Browser.
First things first, the pre-requisites:
In order to retrieve and compile a mercurial build yourself, you need to download and install some tools.
Install the applications in the following order:
TortoiseHG
“TortoiseHg is a Windows shell extension and a series of applications for the Mercurial distributed revision control system.”
Microsoft Visual Studio 2008 Professional Trial or Microsoft Visual Studio C# 2008 Express (vcssetup.exe)
- “Visual Studio 2008 Professional Edition is a comprehensive set of tools that accelerates the process of turning the developer’s vision into reality”
- “Visual Studio 2008 Express Editions are free development tools. Register your product within 30 days from installation.”
if you want to contribute to the project, you will probably need the Professional edition to debug, otherwise the Express version is sufficient.
The Windows Installer XML (WiX) toolset
“The Windows Installer XML (WiX) is a toolset that builds Windows installation packages from XML source code. The toolset supports a command line environment that developers may integrate into their build processes to build MSI and MSM setup packages.”
WiX 3.5 is required. Download the latest Wix35.msi from the Weekly releases page.
Microsoft .NET Runtime 3.5
“Microsoft .NET Framework 3.5 contains many new features building incrementally upon .NET Framework 2.0 and 3.0, and includes .NET Framework 2.0 service pack 1 and .NET Framework 3.0 service pack 1.”
(already installed on most systems through Windows Update)
Make sure all these tools are download and installed before proceeding.
Optionally, install Votive to support syntax highlighting and IntelliSense for .wxs source files and adds a WiX setup project type to Visual Studio. Votice requires Visual Studio 2008 Standard Edition and does not work in the Express edition.
Downloading the source code to your development machine
The first step is to setup a local clone of the online sourcecode repository (also called trunk). After this is done you can compile the necessary files from this local clone and optionally generate an MSI installer to install the application.
- Create a folder on your hard disk that will contain the local clone. In this tutorial we're going to use “
D:\MediaBrowser\Sourcecode” - Right-click the Sourcecode folder and choose “TortoiseHg > Clone…” from the context-menu.

- In the Clone window, for “Source Path”, type “
https://videobrowser.googlecode.com/hg/ videobrowser” then click on the Clone button to begin downloading. (The space before “videobrowser” at the end is intentional). The sourcecode will now be downloaded to your local machine and can take some time to complete. Once the download has completed the “Sourcecode” folder on the harddisk will now contain a copy of the latest trunk which you can compile by following the next section of this tutorial.

Updating the source code
After the initial download, you will probably want to regularly update the local clone of the source code to get the latest changesets.
- Right-click the Sourcecode folder again and select “TortoiseHg > Synchronize” from the context-menu.
- In the Synchronize window, set the “Post Pull” option to “Update” and then click the “Pull” button.

If any changes are found, the program will update your local copy and then display “Command Completed Successfully”, you can now compile the code.
Compiling the source code in Visual Studio / DevInstall
Now that you have the latest source code on your harddisk, you're ready to compile the required files.
Compiling the source in Visual Studio will also perform a DevInstall after it completes. What this means is that it will automatically install and register the required files to run Media Browser.
This DevInstall does not create any shortcuts or an easy uninstallation method in “Programs & Features” in Windows Control Panel.
Make sure you have uninstalled any previous version you installed using an MSI installer.
Launch Visual Studio as an administrator and open the “MediaBrowser.sln” solution file in “
D:\MediaBrowser\Sourcecode”. (Note you may not see the .sln file extension on your PC)In the Solution Explorer pane, right-click “Solution ‘MediaBrowser’ (13 projects)” and choose “Configuration Manager” from the context-menu.

- In the Configuration Manager window, set “Active Solution Configuration” to “Release” and place a checkmark in the “Build” Column for “Configurator and MediaBrowser”. Remove all other checkmarks in that column (unless you specifically want to compile other projects aswell. Compiling other projects is outside the scope of this article).
This will make sure that we only compile the minimum required files and will prevent any errors or warnings showing up for the projects in the solution. Choose Close when done.

- In Visual Studio, in the Solution Explorer pane, right-click “Solution ‘MediaBrowser’ (13 projects)” again and choose “Build Solution” from the context-menu.
The selected projects are now going to be compiled and the DevInstall.cmd in “
D:\MediaBrowser\Sourcecode\MediaBrowser” is automatically executed. This script will automatically install and register the required files. (This script does not execute properly if Visual Studio is not launched as administrator, but will not return an error).
- Check the status bar at the bottom and wait for the message “Build Succeeded”.

- Close Visual Studio
The compile process is now completed. It’s not required to generate and run the MSI installer after compiling if you only want to run Media Browser on this development machine. You can run and use Media Browser immediately after compiling.
Important notes:
- No shortcuts are created using this installation method.
- If you want to run the Media Browser Configuration Wizard, you'll have to launch “Configurator.exe” from “
D:\MediaBrowser\Sourcecode\Configurator\bin\Release” - No uninstallation method in Windows Control Panel is available.
If you want to install this trunk build of Media Browser on another system, read on to create the MSI installer.
Creating the MSI Installer
To complete the process so you can install Media Browser on another system, we'll generate the MSI installer. The installer will contain the required files and will allow you to perform an installation identically to what you'd expect when downloading an official release.
- In Windows Explorer, go to “
D:\MediaBrowser\Sourcecode\Installer” and double-click the “build_x86.bat” file.
This will launch MSBuild.exe with the Installer.wixproj file and generate the MSI file.

You can disregard any yellow warnings. Note the Green “Build Succeeded” message. Any errors will show up in red text to help you find the problem.
- Press any key to close the Command Prompt window.
- In Windows Explorer, go to “
D:\MediaBrowser\Sourcecode\Installer\bin\Release\en-us”. You'll find a “MediaBrowser.msi” in this directory.
The MediaBrowser.msi is the MSI Installer you can use to actually install Media Browser on any other computer that you want to run the trunk version on. We do not recommend installing the MSI on the same machine you compiled on, because it will not properly uninstall/unregister the necessary files.
Uninstalling a DevInstall
When you want to install an official release that is launched after you're latest DevInstall you will first need to uninstall the DevInstall.
- In Windows Explorer, go to “
D:\MediaBrowser\Sourcecode\MediaBrowser” and create a shortcut to DevInstall.cmd. (right-click the file and choose “create shortcut” from the context-menu) - Edit this shortcut and add the uninstall paramater “/u” to the target. Save the changes.

- Run the shortcut as an administrator (right-click the shortcut and choose “run as administrator”)
You will briefly see a Command Prompt window. After that the DevInstall is removed from your system.
Double check that the uninstallation has completed succesfully:
- Check if the “
C:\Program Files\MediaBrowser\MediaBrowser” folder is empty or that it doesn’t exist anymore. If it’s not empty or still exists, delete the folder. (keep in mind: not ProgramData, but Program Files) - Check if there’s a “MediaBrowser” file in “
C:\Windows\assembly”. If it exists, right-click it and choose “uninstall”. (Be very careful what you do in this folder!)
All your settings under “
C:\ProgramData\MediaBrowser” will be retained.