Attempt at updated Howto Compile Guide (1 Viewer)

slapout

Portal Member
May 8, 2006
7
0
I’ve attempted to create an up to date guide to downloading and compiling the MediaPortal source code. This is based on information I’ve found in the wiki, the forums and my personal experience.

However, there are some things I wasn’t sure about. Like does register.bat need to be run? Is NUnit required or optional? Any comments or corrections would be appreciated.


To download and compile Media Player, you need these:
• TortiseSVN (or other svn client)
• Direct X SDK
• Visual Studio 2005
• (optional) NUnit

TortiseSVN
This is the program you will use to download the source code from SourceForge. The MediaPortal source code is stored there in a Subversion repository. To access it you need a Subversion client like TortiseSVN. These are the steps to follow to get TortiseSVN and download the source code:

• Download TortiseSVN from http://tortoisesvn.tigris.org. You will probably have to reboot as part of the install process. TortiseSVN is implemented as a Windows Shell Extension -- when you install it, it will add right-click options to Windows Explorer.

• Create a folder to download the Media Portal source into. I’m going to use C:\mp-source for the examples in this tutorial.

• Right click on this folder and select “SVN Checkout…†from the menu.

• In the “URL of repository†field enter: https://svn.sourceforge.net/svnroot/mediaportal/trunk/mediaportal

• The “Checkout directory†field should already have the name of the folder you right clicked on.



• Press the OK button and your download should begin.

• If your download is interrupted, you can resume it by right clicking on the folder again and selecting “SVN Update.†(If you do this, you may get a message saying that you need to run the cleanup command. If you do, just right click your folder again and select TortiseSVN/Clean Up. When it’s done, you can then right click on the folder and select SVN Update to continue the download.)


Visual Studio 2005
Media Portal is written in C# and is based on the .Net 2.0 framework. You will need Visual Studio 2005 to compile it. If you do not have a retail version of Visual Studio 2005, you can download the Express version that Microsoft has made available for free. If you want to use the Express version you need to download the C# one – Visual C# Express Edition from here: http://msdn.microsoft.com/vstudio/express

DirectX
Media Portal uses DirectX for drawing graphics on the screen. If you want to compile a program that uses DirectX (like Media Portal) then you need to download the DirectX Software Development Kit (DirectX SDK). You can get it from here: http://msdn.microsoft.com/directx/sdk/
(The April 2006 Release was current as of this writing. It is about 400 MB.)

When you download it you’ll end up with a file called dxsdk.exe. Run this and it will ask you where you want to unpack the files. This is not where the SDK will be installed; rather it is where the install files will be unpacked. After it is done unpacking, if it doesn’t start the install automatically, then go to the folder where it was unpacked and run setup.exe. It will walk you thru the install with the usual install wizard. When it is done installing, you can delete the files in the unpack directory if you want – they are only used during the install.


NUnit
Nunit is a unit testing framework for .Net. It allows developers to create tests that help ensure their programs are working properly. There are several options on the download page. Look for the one labeled “win .net 2.0†in the download section at: http://www.nunit.org/ (NUnit-2.2.8-net-2.0.msi was the latest version as of this writing.) Clicking this file will take you to a page asking you to choose a mirror. Pick one of the “Download†links and your download will begin. After the download finishes, you can install NUnit by right clicking on the file and selecting “Install.â€

You should now have everything you need to compile the MediaPortal source code.

Register.bat
In your source folder you will find a folder called “Setupâ€. In this folder is one called “postsetup.†In this folder there is a batch file called “register.batâ€. Run this batch file. It will install a needed dll into the Global Assembly Cache.

Compiling
• Start Visual Studio 2005. From the menu select “File-Open-Project/Solutionâ€. Navigate to the folder where you downloaded the source code.
• If you’re using a retail version of Visual Studio, select and open the “MediaPortal.sln†file.
• If you’re using the Visual C# Express Edition, select and open the “MediaPortal.VC#Express.sln†file.
• On the Build menu, select “Configuration Managerâ€
• Under “Active Solution Configuration†select “Release†and press the “Close†button
• Now, te big moment you’ve been waiting for: From the Build menu select “Rebuild Solutionâ€
• If all goes well, you’ll now have a MediaPortal.exe in the folder:
C:\mp-source\xbmc\bin\Release
 

Users who are viewing this thread

Top Bottom