Question about Compiling (1 Viewer)

mattjcurry

Retired Team Member
  • Premium Supporter
  • October 24, 2011
    261
    207
    45
    Ok, so i went here, and followed instructions:
    Compiling - MediaPortal Wiki

    (I pulled the source from Git instead of svn)

    Code built clean in sharp develop after some work to clear out mshtml errors, which were occuring because I did not have office installed on my dev machine.
    Compiler Problem: The type or namespace name 'mshtml' could not be found - Media Browser Community Tracker

    However, my question is, What do I do after I get a clean compile? Do I need to compile the installer and do an install, or is there some better way to test media portal? Any advice you could offer would be greatly appreciated.

    Thanks,
    Matt C
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi Matt

    Presumably you've made a few code changes that you want to test? Usually I just replace the affected DLLs in my existing installation, although it takes a little time to learn which DLLs you need to replace. You could also debug MP (ie. run MP within sharp develop). The other way is to build an installer using the scripts in the build folder.

    mm
     

    mattjcurry

    Retired Team Member
  • Premium Supporter
  • October 24, 2011
    261
    207
    45
    I have not made any code changes yet.

    Right now my goal is to get the dev environment setup so that I can comile the latest source, make changes and easily test them.

    Please let me know if you have any recommendations on than what you have above.

    thanks for the info. Do you do a binary install first, and then copy all the DLL's over, or do you compile the installer and run an install from there, and then just copy dlls for incremental changes?

    Thanks,

    Matt
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi again

    I do an install of the latest trunk release (eg. MP 1.2.0), make my code changes, recompile, stop TV Server and close MP, replace DLLs and EXEs, then start TV Server and MP again. That works really well for me because the code that I work the most with is quite contained (in TVLibrary.dll). Maybe that would also work well for you if you're only interested in changing one area of the code. Otherwise possibly better to build the installer and run it - it shouldn't overwrite your configuration or anything. Another note: if you want to debug from within sharp develop or VS then you need to have MP installed so that the modified version that you're running in the debugger can find all the configuration files.

    mm
     

    mattjcurry

    Retired Team Member
  • Premium Supporter
  • October 24, 2011
    261
    207
    45
    Thanks for the feedback.

    I am now trying to compile the Filters solution and I am getting an error on the YASM.targets file.

    The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0". Could not load file or assembly 'Microsoft.Build.Tasks.v4.0' or one of its dependencies. The system cannot find the file specified. (MSB4175) - C:\Projects\MediaPortal-1\mediaportal\Core.cpp\mpc-hc_subs\src\YASM.targets:45,5

    I have .net 4.0 installed. I also have Yasm.exe in my path.

    Matt

    Then after that I get these, But I think that they would go away if I fixed the firest error.:

    "CL.exe" exited with code -1073741515. (MSB6006) - C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets:57,5
    <CL Condition="'%(ClCompile.PrecompiledHeader)' == 'Create' and '%(ClCompile.ExcludedFromBuild)'!='true'"

    "CL.exe" exited with code -1073741515. (MSB6006) - C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets:147,5
    <CL Condition="'%(ClCompile.PrecompiledHeader)' != 'Create' and '%(ClCompile.ExcludedFromBuild)'!='true'"

    OK, so I just decided to follow the MSBUILD instructions instead to at least try to get a working build of media portal. I figured I could then tackle individual projects as I need to make edits.

    However once I got everything built, I got an error that there was a version mismatch between mpconfig and tvplugin.

    MPconfig is reporting version 1.2.0.0 and tvplugin is reporting 1.2.0-42-gdae49a0.

    Is there somewhere where I can adjust the verion numbers and rebuild?

    Thanks in advance.

    Matt
     

    mattjcurry

    Retired Team Member
  • Premium Supporter
  • October 24, 2011
    261
    207
    45
    Ok guys,

    I grabbed the source fresh from git and everything worked. I think it is that I had just maually compiled some stuff in sharp develop before I tried to run MS BUILD.

    I am going to see if I can make any simple edits to the code and will let you all know how it goes.

    Thank you so much for the support.

    Matt C
     

    mattjcurry

    Retired Team Member
  • Premium Supporter
  • October 24, 2011
    261
    207
    45
    Just in case anyone is looking here for an answer, the MSBuild scripts mess with the version number, so you actually need to do a clean build from within sharpdevelop and then use NSIS to generate the installers. The NSIS scripts are in the setup directory under mediaportal and under TVLibrary.
     

    Users who are viewing this thread

    Top Bottom