Installing with custom MediaPortalDirs.xml (1 Viewer)

hkjensen

MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    Hi

    When using custom version of MediaPortalDirs.xml the installerscript fails to locate directory for skin, database etc.
    Adding the following to the script for plugin, skin and database, the installer finds the directories.
    Code:
     	#grab the plugins folder
    +	${xml::LoadFile} "$DOCUMENTS\Team MediaPortal\MediaPortalDirs.xml" $1
    +	IntCmp $1 0 specialdir
    +	SetShellVarContext current
    +	${xml::LoadFile} "$DOCUMENTS\Team MediaPortal\MediaPortalDirs.xml" $1
    +	IntCmp $1 0 specialdir
     	${xml::LoadFile} "$MEDIAPORTAL_DIR\MediaPortalDirs.xml" $1
    +	specialdir:
    +	SetShellVarContext all
         IntCmp $1 -1 fail

    First the installer checks in directory "Team MediaPortal" in documents for all users, if the file dosnt exists it check in "Team MediaPortal" for current user.

    Using a custom MediaPortalDirs.xml is useful when having a centralized database setup.

    attached patch file for svn version 1128

    King regards

    hkjensen
     

    Attachments

    • custom_MediaPortalDirs.patch
      1.5 KB

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    43
    Texas
    Home Country
    United States of America United States of America
    Hrmm, what version of Windows are you using? I thought we had gotten issues like this ironed out.
     

    hkjensen

    MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    Hi

    I'm using windows xp, but I also tested the functionality on windows 7 with the same result.

    In the MediaPortalDirs.xml I have changes path for database and skin
    dbpath -> D:\Documents\MediaPortal\Database
    skinpath -> D:\Documents\MediaPortal\Skin

    It is most a problem when installing.

    When using Moving Pictures the database is located in the correct directory.
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    43
    Texas
    Home Country
    United States of America United States of America
    I see what you're doing, sorry I did not look closer before. So you're checking the user's Documents folder for a copy of MediaPortalDirs.xml, but I am not sure I understand why. The official install location of this file is under Program Files along side mediaportal.exe and I can not find any information on the MediaPortal wiki referencing any supported alternate location. You have obviously been around here for a while though, am I missing something?
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    Hi fforde, according to documentation (with-in the file itself) it mentions the following:

    Code:
    "Don't change this file itself.
    Copy it to "MyDocuments\Team Mediaportal" and modify it there.
    If you made an error, the original copy in the MediaPortal Installation Path is used."

    So the MyDocuments\Team MediaPortal\MediaPortalDirs.xml file should take precedence if it exists, otherwise use the default one (which also might have modified paths).

    Damien
     

    Users who are viewing this thread

    Top Bottom