Untergeordnete Seiten
  • Custom Installation

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.32
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download


Table of Contents

Overview

This page describes how to change Installation Directories and Data Directories.

The Installation Directory is the directory in which the executable files (in particular .exe and .dll files) of the respective application are located. The Data Directory is the directory in which the respective application stores its data (such as settings, fan art or the MP2 Server's database).

Default Directories

The default Installation Directories on a Windows x86 system are:

Application

Default Installation Directory (x86)

MP2 Server

[SystemDrive]:\Program Files\Team MediaPortal\MP2-Server

MP2 Client

[SystemDrive]:\Program Files\Team MediaPortal\MP2-Client

MP2 Service Monitor

[SystemDrive]:\Program Files\Team MediaPortal\MP2-ServiceMonitor


The default Installation Directories on a Windows x64 system are:

Application

Default Installation Directory (x64)

MP2 Server

[SystemDrive]:\Program Files (x86)\Team MediaPortal\MP2-Server

MP2 Client

[SystemDrive]:\Program Files (x86)\Team MediaPortal\MP2-Client

MP2 Service Monitor

[SystemDrive]:\Program Files (x86)\Team MediaPortal\MP2-ServiceMonitor


The default Data Directories of these applications on both Windows x64 and x86 systems, are

Application

Default Data Directory

MP2 Server

[SystemDrive]:\ProgramData\Team MediaPortal\MP2-Server

MP2 Client

[SystemDrive]:\ProgramData\Team MediaPortal\MP2-Client

MP2 Service Monitor

[SystemDrive]:\ProgramData\Team MediaPortal\MP2-ServiceMonitor

Please note that the [SystemDrive]:\ProgramData directory is a hidden folder and doesn't display by default. To access it through Windows Explorer you either have to enable displaying hidden files and folders or you have to enter the respective path blindly into the Windows Explorer path box.

Changing the Installation Directories

You can change the Installation Directories during the install process by selecting Custom.

There you can change the Installation Directory of each MediaPortal 2 component separately: MediaPortal 2 Client, MediaPortal 2 Server and MediaPortal 2 ServiceMonitor

Changing the Data Directories

You can also change the Data Directory of each of the three applications separately. However, currently this has to be done manually after the installation process. Changing the Data Directories may make sense if e.g. your system drive is too small for the MediaPortal 2 Server's database or if you want to have your MediaPortal 2 Server's database file on a drive which is faster than your system drive, such as a SSD.

Before you change the Data Directory of one of the applications, make sure you quit the respective application. I.e., if you want to change the Data Directory of your MediaPortal 2 Client, quit the MediaPortal 2 Client. If you want to change the Data Directory of your MediaPortal 2 ServiceMonitor, quit the MediaPortal 2 Service Monitor. If you want to change the Data Directory of your MediaPortal 2 Server, stop the MediaPortal 2 Server service.

Then go to the Installation Directory of the respective application. You will find a subdirectory called "Defaults" containing a file called "Paths.xml". When you open e.g. the Paths.xml of your MediaPortal 2 Server it should look like this:

<?xml version="1.0" encoding="utf-8"?>
<Paths>
  <!-- Default paths can be overridden here -->
  <Path name="DATA" value="&lt;COMMON_APPLICATION_DATA&gt;\Team MediaPortal\MP2-Server" />
  <Path name="CONFIG" value="&lt;DATA&gt;\Config" />
  <Path name="LOG" value="&lt;DATA&gt;\Log" />
  <Path name="PLUGINS" value="&lt;APPLICATION_ROOT&gt;\Plugins" />
  <Path name="DATABASE" value="&lt;DATA&gt;" />
</Paths>

When reading this, please note that < stands for the lower than character '<' and > represents the greater than character '>'. The reason for this is that e.g. in the fifth line what we want to do is setting the value="<DATA>\Config". But we cannot do so because all this is within an XML file and there '<' and '>' are reserved characters. So we have to write value="<DATA>\Config" to achieve what we want.

Simple Changes

Usually, you only want to change where the respective MediaPortal 2 Application - in this case MediaPortal 2 Server - stores all its data. This can be achieved by changing only a single line in the Paths.xml file. Let's assume you want your MediaPortal 2 Server store all its data - including settings, the database file and the log files - on F:\MP2Data\MP2-Server. You can do so by changing line 4 from

<Path name="DATA" value="<COMMON_APPLICATION_DATA>\Team MediaPortal\MP2-Server" />

to

<Path name="DATA" value="F:\MP2Data\MP2-Server" />

No need to change the paths for the settings, the log files and the database file separately. These definitions in lines 5, 6 and 8 of the file are relative to the path called "DATA", which we just changed. So the settings will automatically be stored to F:\MP2Data\MP2-Server\Config, the log files to F:\MP2Data\MP2-Server\Log and the database file directly in F:\MP2Data\MP2-Server without any further changes. Just save your changed Paths.xml file and you are (nearly) done.

Important Note: When you have already started the respective application before and used it - in particular when you already attached a MediaPortal 2 Client to the MediaPortal 2 Server or even added a Share to be imported, there is already data contained in the default Data Directory. If you want to keep this data, copy it to the new location before you restart the respective application. If you don't do so, MediaPortal 2 Server, MediaPortal 2 Client or MediaPortal 2 ServiceMonitor, respectively, will assume that they have just been started for the first time and create the respective data files with default values. This means in particular that you have to re-attach your MediaPortal 2 Client(s) and reimport your Media Source(s). If you did so by mistake, end the respective application again, delete the newly generated default files in the new Data Directory, now copy your old Data Directory's content to the new Data Directory and then start the application again.

The Path.xml file in detail

Now what do all these lines in Path.xml do exactly? The important lines here are lines 4 to 8. In line 4 we define a path called "DATA" located at "<COMMON_APPLICATION_DATA>\Team MediaPortal\MP2-Server". "<COMMON_APPLICATION_DATA>" is a system defined path which usually points to "[SystemDrive]:\ProgramData", so what we really define is a path called DATA pointing to [SystemDrive]:\ProgramData\Team MediaPortal\MP2-Server. Does that ring a bell? Yes, that's the default Data Directory of MP2 Server as explained above.

In line 5 we define a directory called "CONFIG" pointing to "<DATA>\Config", i.e. to a subdirectory named "Config" located in the Data Directory we defined above. The MP2 Server stores all its settings there. In line 6 we define a directory called "LOG" located in a subdirectory named "Log" under the Data Directory. Guess what MP2 Server stores there: its log files. Line 8 defines where MP2 Server stores its database file (assuming you are using an embedded database like the default SQLCEDatabase or SQLiteDatabase). It is stored directly in the Data Directory.

Line 7 is somewhat different as it tells MediaPortal 2 Server where to look for its plugins. So this does not affect "data", but program files. "<APPLICATION_ROOT>" is nothing more than the Installation Directory you chose during install for your MediaPortal 2 Server. So as a default, MediaPortal 2 Server looks for plugins in a subdirectory of the Installation Directory named "plugins".

Related

   

 

This page has no comments.