- Home
- My Page
- Recent changes
- Reports
-
- Watched Pages
- Contributions
- My Preferences
- Userlist
- RSS feeds
- Templates
- Sitemap
- Save as PDF
- Popular pages
-
- Wiki Help
Compiling
Table of contents
Prerequisites
Note that these prerequisites are applicable to all methods of compiling MediaPortal.
- You will need a .NET compiler, for example Visual Studio 2010 / 2012, Visual C# Express Edition, or the MSBuild compiler. (Does SharpDevelop also work?)
- Get the latest MediaPortal 2 source from Git (see Git) for more detailed instructions).
- Install the latest .NET framework SDK (if not already installed with Visual Studio or Visual C# Express).
- Install the Dokan driver version 0.53 (0.6 is unstable) (necessary to use virtual directories e.g. for archive or remote access).
- Install the latest MS DirectX SDK (necessary for the MP2 client).
- Install the latest SlimDX End User Runtime (necessary for the MP2 client).
- Install the latest WiX Toolset (necessary for compiling the MP2-Setup)
Compiling with Visual C# 2010 / 2012
Compiling a 'Release' version
The Release build configuration is used for productive builds. During development and for debug builds, use the Debug build configuration. To compile MediaPortal 2 in the Release build configuration, do the following steps:
- Start Visual Studio 2010 / 2012
- Open the solution file
- Source\MP2-Client.sln or
- Source\MP2-Server.sln or
- Source\MP2-ServiceMonitor.sln or
- Setup\MP2-Setup.sln
- Set the active build configuration to 'Release'
- Set the active platform to 'x86' *
- Select Build->Rebuild solution
The output will be located in
- Bin\MP2-Client\bin\x86\Release\ for the client
- Bin\MP2-Server\bin\x86\Release\ for the server
- Bin\MP2-ServiceMonitor\bin\x86\Release\ for the service monitor
- Bin\MP2-Setup\Release\en-us\ for the setup
Compiling a 'Debug' version
The Debug build configuration is used during development. To compile MediaPortal 2 in the Debug build configuration, do the following steps:
- Start Visual Studio 2010 / 2012
- Open the solution file
- Source\MP2-Client.sln or
- Source\MP2-Server.sln or
- Source\MP2-ServiceMonitor.sln or
- Setup\MP2-Setup.sln
- Set the active build configuration to 'Debug'
- Set the active platform to 'x86' *
- Select Build->Rebuild solution
The output will be located in
- Bin\MP2-Client\bin\x86\Debug\ for the client
- Bin\MP2-Server\bin\x86\Debug\ for the server
- Bin\MP2-ServiceMonitor\bin\x86\Debug\ for the service monitor
- Bin\MP2-Setup\Debug\en-us\ for the setup
| * Important Note: MediaPortal 2 does not work in 'Any CPU' configuration. All projects have been disabled from compiling in the 'Any CPU' configuration. |
Compiling with MSBuild
MSBuild comes with the .NET SDK and is a command line tool to build software by using the project files that Visual Studio creates.
The following batch files for compiling with MSBuild are already included in the repository:
- Build\MSBUILD_Rebuild_Release_Client.bat for the client
- Build\MSBUILD_Rebuild_Release_Server.bat for the server
- Build\MSBUILD_Rebuild_Release_ServiceMonitor.bat for the service monitor
- Build\MSBUILD_Rebuild_Release_Setup.bat for the setup
You have to run each batch file, one by one. Do not run more than one at the same time.
After the builds are successfully completed, your freshly compiled MediaPortal is available in:
- Bin\MP2-Client\bin\x86\Release\ for the client
- Bin\MP2-Server\bin\x86\Release\ for the server
- Bin\MP2-ServiceMonitor\bin\x86\Release\ for the service monitor
- Bin\MP2-Setup\Release\en-us\ for the setup
