[WINDOWS] Compiling the pvrtesting2 branch on Windows
#1
Being a new poster I'm hesitant to post this as my first post....

Yesterday I really wanted to compile the pvrtesting2 branch on my clean windows environment and guess what? Failure! There was an excellent post on building on windows from the sources, but looking wherever I might, I couldn't find a post in the forum on how to compile the current revision of the pvrtesting2 branch.

Now my father always said to me (Dutch) "Gaat niet, bestaat niet" (~nothing is impossible). So I ventured onwards and this is how I created a runnable XBMC from the current pvrtesting2 branch on my windows machine.
  • Get the 'trunk' revision eg. into \path\to\trunk and build it, see HOW-TO compile XBMC for Windows from source code for instructions on how to do this. Although I use Visual Studio 2010 Ultimate daily, I opted to create a 'clean' windows environment with Visual Studio 2008 Express (VS2008) for building. The Visual Studio 2010 solution didn't look as mature as the 2008 version after a quick glance. And I just wanted to focus on 'real' problems instead of solving solution/project related ones.
  • Get the 'pvrtesting2' head revision eg. in \path\to\pvr.
My coding top directory looks like this:

Image
  • Run DownloadBuildDeps.bat in \path\to\pvr\project\BuildDependencies. This will get a bunch of dynamic link libraries that the prv branch needs and are not present in the trunk.
  • Do not, I repeat DO NOT change the directories in VS2008, leave them pointing to those that are present in the trunk revision. Just as you set them up to compile the trunk revision as specified in the HOW-TO.
  • Now we need to make changes to 3 projects and 1 source file:
    1. xbcm_hts.vcproj;
    2. xbmc_mptv.vcproj;
    3. xbmc_vdr.vcproj;
    4. AddonHelpers_Addon.cpp

For the xbmc_htc and xbmc_vdr projects, the location of the 'dlfcn-win32.cpp' source file is wrong. Just delete them and use 'Add/Existing item...' on the Source Files node of the projects to add them again, the file is in \path\to\pvr\addons\library.xbmc.addon[\b]

Image

With that out of the way, we need to adjust the compilation options for [b]xbmc_mptv
. Select properties for this project.

Image

Change the dropdown for configurations to "All Configurations", open the settings for "Configuration properties - C/C++ - General" and select to edit the additional include directories:

Image

The top two include directories are incorrect. The correct locations are '..\..\..\..\..\addons\library.xbmc.addon' and '..\..\..\..\..\addons\library.xbmc.pvr' without the quotes of course.

Image

One final change left, the AddonHelpers_Addon.cpp file in the XBMC project is trying to use the protected method 'LoadSettings' in line 139. I'm under the impression the public method 'HasSettings' is 100% identical, so update the file accordingly.

Image

Do a File/Save All (Ctrl+Shift+s) and we're ready to build!

Just do a 'Build/Rebuild Solution' (Ctrl+Alt+F7) this will result in: "========== Rebuild All: 66 succeeded, 2 failed, 0 skipped ==========", but more important one line above that: "68>XBMC - 0 error(s), 373 warning(s)". Hurray!

To run your compiled XBMC follow the same steps as mentioned in the HOW-TO.
  • Copy all dynamic link libraries (*.dll) from \path\to\pvr\project\Win32BuildSetup\dependencies to the build result directory, which in my case was 'D:\Coding\xbmc\pvr\project\VS2008Express\XBMC\Debug (DirectX)'
  • Open the properties for the XBMC project once more (see above) and go to Configuration Properties\Debugging. Enter for the environment property 'XBMC_HOME=\path\to\pvr', in my case 'XBMC_HOME=D:\Coding\xbmc\pvr'

Press F5 and enjoy!

Sadly I'm out of allowed images here, so you have to visit imageshack for the snapshot of the running result: http://img257.imageshack.us/img257/9137/xbmcpvr08.png.

Notice:
  1. I really haven't done any thorough testing!
  2. There are link errors to the runtime checks in the buildlog. I will have to look into those.
  3. The XBMC project contains a lot of duplicate file entries. Haven't touched those.
  4. This is the result of checkouts of trunk and branches/pvrtesting2 done on October 27th 2010 around 14:30 CET.

Apologies for the length of this post and any 'Dutch English'. I hope this is useful to anyone. Let me know your results.

Regards,
Fred
Reply
#2
So this is interesting. Have you had any luck getting the pvr stuff to work with you custom windows build? I noticed MediaPortal had a plug-in. Is that what you will be trying to use?

Steve
Reply
#3
mathmansteve Wrote:So this is interesting. Have you had any luck getting the pvr stuff to work with you custom windows build? I noticed MediaPortal had a plug-in. Is that what you will be trying to use?

Steve

Actually I'm planning to (very slowly) start playing with the code to see how complex it will be to add support for the 'For The Record' backend.

See: http://www.4therecord.eu/.

I have found that to be a *very* robust, service based backend. It has gotten a new RESTful api in version 1.5.0.2 (although with some quirks, like using only the POST verb.....).

Before even starting with this, I just needed the branch to compile and ran into some problems as described. But it will be a true 'hobby' project. No timeframes, no due dates etc. etc Wink. As it has to fit in the Family Schedule with teenage kids, wife and 2 cats. And of course the much needed Time AFK in RL Big Grin.

First thing on my list to do now is to peruse the xbmc internals, to see if/where others parts are using RESTful api's to learn (borrow/steal) their code.

Fred
Reply
#4
RedF: check out the sources in my github repos (in my sig). it's more up to date and you can just follow the normal instructions from the wiki to get it compiled on windows.

didn't fix the vs2010 project files yet after the merge, but that's planned for tonight.

btw: nice and clear post Smile

edit: one more thing. I noticed that the project file of the mptv plugin may not have been fixed yet in my sources (but if you want to fix the project files, be my guest and post back the patches ;-))
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#5
Red_F Wrote:Actually I'm planning to (very slowly) start playing with the code to see how complex it will be to add support for the 'For The Record' backend.

See: http://www.4therecord.eu/.

I have found that to be a *very* robust, service based backend. It has gotten a new RESTful api in version 1.5.0.2 (although with some quirks, like using only the POST verb.....).

Before even starting with this, I just needed the branch to compile and ran into some problems as described. But it will be a true 'hobby' project. No timeframes, no due dates etc. etc Wink. As it has to fit in the Family Schedule with teenage kids, wife and 2 cats. And of course the much needed Time AFK in RL Big Grin.

First thing on my list to do now is to peruse the xbmc internals, to see if/where others parts are using RESTful api's to learn (borrow/steal) their code.

Fred

Fred,
Just a quick note that I am also preparing a ForTheRecord PVR client, based on my MediaPortal PVR client code. My plan was to provide a basic addon which only provides the channels and can start/stop a live-tv stream. Others can then extend this code to a complete PVR client.

Maybe we can cooperate... Lack of time is also for me one of the show stoppers Wink

Grt,
Marcel
Developer of the MediaPortal PVR addon and retired developer of the Argus-TV PVR-addon.
http://www.scintilla.utwente.nl/~marcelg/xbmc
Reply

Logout Mark Read Team Forum Stats Members Help
[WINDOWS] Compiling the pvrtesting2 branch on Windows0