HowTo: Building MediaPortal with NAnt (1 Viewer)

nicoparis

New Member
January 4, 2005
1
0
For me it works perfectly, i was trying to make Sharpdevelop working but as i'm a beginner in .net stuff (used to work in java, ant, maven and so on) it was impossible for me.

Thanks ! Nico.
 

Flipit

Portal Pro
February 19, 2005
100
0
DriectShowHelperLib

Hi,

Tried your How To but Nant fails to build with the following error:

Build Failed - 0 Non Fatal Errors, 2 Warings

Couldn't find type libary "DirectShowHelperLib" (TYPELIB\{Blah Blah}\1.0\0\win32, referenced by project "MediaPortal.Configuration"

Any ideas what I've done wrong ??

Thanks

Flipit
 

Mr.Mitchell

Retired Team Member
  • Premium Supporter
  • May 13, 2004
    227
    0
    the Netherlands
    I had this problem in the past and fixed it then, but I don't remember how. I can also not reproduce this problem with a clean checkout so I can't really help with this one :-(
     
    A

    Anonymous

    Guest
    Compile fail

    I seem to have run into the same problem. I think I've done everything right, but I als get the "Couldn't find type library DirectShowHelperLib". When looking in cvs, I see that the DirectShowHelper can be found in the mediaportal source code. Could it be that the mediaportal.build file assumes that the mediaportal source is in c:/MediaPortal? I have it in x:/work/mediaportal. Should I change the build file in that case?

    Ernie
     
    A

    Anonymous

    Guest
    One step further...

    Yesterday, I got a bit further in actually building my own version of MediaPortal. When looking at the XML build file in this topic, I noticed the path:

    C:/Program Files/Team Mediaportal/MediaPortal

    in the includes. I figured that might actually mean that I need to *install* MediaPortal first on the computer I want to build it on. I tried that. I installed MediaPortal in c:/MediaPortal and tried to use the mediaportal.build file in cvs. Now I actually saw some compiling going on, but it still didn't finish.

    Can someone *please* give me a *complete* recipe with *all* the steps I need to take to build my own MediaPortal from source. Leave nothing out:

    1. Install windows XP
    2. Install dotnet version .....
    3. Run windows update to get critital updates for dotnet
    4. Install dotnet SDK
    5. Install DirectX SDK
    6. Install nAnt
    7. Install WinCVS
    8. Get MediaPortal source from CVS
    .....
    .....

    Please complete the list for me..... :)

    Thanks,

    Ernie
     

    Flipit

    Portal Pro
    February 19, 2005
    100
    0
    DirectShowHelperLib

    Ernie,

    Looks as though Nant doesn't need the reference to the DirectShowHelperLib in the "MediaPortal.Configuration.csproj" file to compile properly.

    I removed the reference from the file and recompiled. Works fine now.

    Just remember to copy the Release files over the Debug ones, once complied, or your get an error on opening Configuration.exe.... drove me nuts for a while as I didn't read the instructions in this post properly the first time!

    My set-up seems to be pretty similar to yours, so you should be ok, but drop me a note if not, and I can try to share my build and csproj files with you to see if that makes difference.

    Flipit
     

    Mr.Mitchell

    Retired Team Member
  • Premium Supporter
  • May 13, 2004
    227
    0
    the Netherlands
    Re: Compile fail

    eavdmeer said:
    I seem to have run into the same problem. I think I've done everything right, but I als get the "Couldn't find type library DirectShowHelperLib". When looking in cvs, I see that the DirectShowHelper can be found in the mediaportal source code.
    As a workaround for the DirectShowHelper issue you can first run Postbuild.bat from the commandprompt. Postbuild.bat can be found in xmbc/bin/release or debug and should be started from that folder. This will copy the DirectShowHelper.dll file from "Core\DirectShowHelper\DirectShowHelper\Release" and register the dll.

    Now compiling with Nant will work. Note that you only need to do this once.
     
    A

    Anonymous

    Guest
    Re: Compile fail

    Thanks guys. I'll try to look into this tonight. In the mean time, I have a suggestion :) What about adding *all* steps necessary for the build into the nant makefile? That's what makefiles are for, right? Personally, I am a big fan of the good old GNU make. Little chance of that being accepted in a windows environment, though ;-) I'm not sure if nant can handle things like file copies, but if it can, how about adding a couple of targets? I think we really need a target that can be used to build a complete release.

    I really would like to get in on the development of MP, because I think it is a great project. However, it is pretty hard to get started without hidden knowledge like the 'known' DirectShowHelperLib problem. I've been developing software for at least ten years in C, C++, Java and a couple of more obscure languages, but I couldn't get a working setup by just carefully following the instructions in the original post in this thread. I'd like to ask Mr.Mitchell to modify his original post to include the full list of steps required to get a working setup that I put in my previous request for help. I'd like to volunteer to test the new instructions.

    Ernie
     

    mchang

    New Member
    June 7, 2005
    2
    0
    Hi Ernie,

    excellent suggestion!
    I see that Nant supports the copy command (http://nant.sourceforge.net/release/latest/help/tasks/copy.html) and many other commands you would use in a batch file (http://nant.sourceforge.net/release/latest/help/tasks/).
    So it should be possible to eliminate Postbuild.bat and put everything in the Nant file.

    On another note: is it really necessary to have absolute path references in the Nant file
    (like C:/Program Files/Team Mediaportal/MediaPortal)?
    Some people (like me) have a strict separation between Windows (on C), applications (on D) and other stuff like source code (on E).
    Please remove such absolute path references.

    Mr.Mitchell: are there more .bat files like Postbuild.bat we should know about?
     

    Mr.Mitchell

    Retired Team Member
  • Premium Supporter
  • May 13, 2004
    227
    0
    the Netherlands
    The idea is that Nant uses the exact same build files as used by Visual Studio, this makes it so that the Nant buildfile never needs updating. This works quite well, except if some invalid references sneak into the VS.NET build files. VS.NET seems to ignore invalid references, so they are not detected by the main devs. This does not happen often, but sometimes (like now) it screws up the Nant build. I will ask one of the devs to fix this reference and then the Nant buildfile will work again.

    So it should be possible to eliminate Postbuild.bat and put everything in the Nant file.
    Postbuild.bat is called automatically at the end of a succesfull Nant build through the postbuild step in the VS.NET buildfiles, so no need to put all that stuff in the Nant buildfile.

    Running Postbuild.bat manually is ONLY needed as a workaround to copy and register the DirectShowHelper.dll.

    On another note: is it really necessary to have absolute path references in the Nant file (like C:/Program Files/Team Mediaportal/MediaPortal)?
    Nope these are not needed. When I wrote this guide I had to add them, but that was related to a bad SDK install I found out later. The targets in my current buildfile look like this:
    Code:
      <target name="release">
        <solution configuration="release" solutionfile="MediaPortal.sln"></solution>
      </target>
    So no paths needed anywhere.

    I have had the idea to update the guide, cause some stuff is obsoleter and can be easier, but I wanted to wait for the Nant final version, but that is taking such a long time :-(. Might be a good idea to update the guide anyway with the latest Nant release candidate. An list with the exact steps will be added to the guide, any other requests?
     

    Users who are viewing this thread

    Top Bottom