2010-10-28, 12:49
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.
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]
With that out of the way, we need to adjust the compilation options for [b]xbmc_mptv. Select properties for this project.
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:
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.
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.
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.
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:
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
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.
- 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:
- xbcm_hts.vcproj;
- xbmc_mptv.vcproj;
- xbmc_vdr.vcproj;
- AddonHelpers_Addon.cpp
- xbcm_hts.vcproj;
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]
With that out of the way, we need to adjust the compilation options for [b]xbmc_mptv. Select properties for this project.
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:
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.
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.
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:
- I really haven't done any thorough testing!
- There are link errors to the runtime checks in the buildlog. I will have to look into those.
- The XBMC project contains a lot of duplicate file entries. Haven't touched those.
- 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