Build from Source assistance

Jul 20, 2015 at 12:39 AM
Hi Team,

I'm hoping to get a little assistance with being able to build MC from source.
Currently I have Visual Studio 2015 Community and Visual Studio 2010 Express. I had issues with the C# YouTubeURLGrabber in 2010 express hence I switched to 2015 community and I can now view everything fine. Let me know what version I should be using, maybe I need to switch to professional?

At this stage all I want to be able to do is grab the source, and then build. I am hoping once I can do that, then I can make some tweaks and test (purely for my own learning).

Can someone give me a brief walk through, as to how to build MC successfully from source?

I did go through the developer documentation, but did not have any luck, and I am thinking it might be a little out of date?

Cheers
Coordinator
Jul 20, 2015 at 4:53 AM
Hi Paybac

Was on Visual Studio 2010, but now running Visual Studio 2013, just the free version. As for Visual Studio 2015, I haven't looked at it yet, but don't think you'd need to switch to Professional.

As for getting Media Companion code, see the Wiki Developer Information

Hope that is of some help.
Jul 20, 2015 at 6:42 AM
Edited Jul 20, 2015 at 6:44 AM
Thanks Vbat,

No issues grabbing the source and I can look through the code in VS no problems. I can ee how it is all laid out etc. I can see the parts I want to play around with.

The part I cannot figure out is how to actually build the application and to Start debugging.

My basic understanding from googling and looking through various tutorials etc is at a high level I
  1. Download the source, extract the folder.
  2. Open the solution in Visual Studio
  3. Build the solution (This is where I believe I am going wrong as I get a whole stack of errors)
  4. Start Debugging(Cant do this as build above is not successful)
Is this correct? or do I need to do some configuration prior to attempting to build.

Cheers
Coordinator
Jul 20, 2015 at 5:59 PM
Possibly from custom user controls.

Tools I use are TortoiseHG to download the source and for uploading changesets.

As for the error's, in Visual Studio once the code is loaded, go to Solutions Explorer
Right Click on Solution 'XBMC Media Companion' (16 Projects) and select Clean Solution
Then r-click and select Rebuild Solution

This will build the custom User Controls and debug code.

Then you should be able to F5 to start Debug build.
Coordinator
Jul 20, 2015 at 6:46 PM
Oh, and playing around with Designer can screw up the GUI something aweful, so beware.
And it's a good idea to let others know your working on GUI so don't have merge problems.

PS, just pushed a GUI change.

Rob
Jul 20, 2015 at 11:53 PM
I'm going to try out TortoiseHg and see if I can get it set up correctly.

In the meantime heres the output log, after running the "clean solution" and "rebuild solution" on VS2015
http://pastebin.com/WvDzH63v

and heres the list of the 36 errors I am gettting
http://pastebin.com/bnmbgq4m

I'm sure I am still doing somthing simple wrong :/ I'm taking lots of notes though :) So will re-write the developer wiki once I get the basics sorted

Cheers
Coordinator
Jul 21, 2015 at 12:38 AM
It seems your visual studio is being annoying.

Try find visual studio 2013 for desktop, visual basic version.

Maybe visual studio 2015 community isnt right for media companion.
Jul 21, 2015 at 2:01 AM
Visual "Studio Express 2013 for Desktop" works perfectly.

Got TortoiseHG set up, well the basic "Clone Repo" anyways.

Now I can start playing around

Thanks for your help Vbat
Coordinator
Jul 21, 2015 at 2:17 AM
Well, I downloaded and was installing VS2015 when your message popped up.

And your right, VS 2015 was having problems....that were in Media Companion. Grammatical errors that VS2013 didn't care about, but VS2015 did.

Fixed these and pushed the changeset up.

So if your still interested, and have VS2015, pull the latest commit and try VS 2015 again. It sure does look interesting.
Jul 21, 2015 at 2:42 AM
Nice MC is working as expected on VS 2015 for me as well
Jul 21, 2015 at 5:47 AM
Just stepping through the documented release process. most if not all the .PDB and .XML files can be stopped from being created during release by doing the following.

Open the properties for each project
go to compile tab
Ensure Configuration is set to Release
Uncheck "Generate XML Documentation file"
Go to "advanced compile options"
Change "generate debug info" to "none"

Do that for each project that is generating .pdb and .xml

Seems to work for everything except Mediainfo.NET
Coordinator
Jul 21, 2015 at 6:16 AM
When you compile as a release, you publish it, and the PDB, XML files are not created. These are usually only for Debugging else can't step through the code.
Jul 21, 2015 at 7:16 AM
AH right, that does the trick :)