[MonoDevelop] Add-in questions & Assembly questions

Michael Hutchinson m.j.hutchinson at gmail.com
Mon May 18 14:49:08 EDT 2009


On Mon, May 18, 2009 at 5:36 AM, Lluis Sanchez Gual <lluis at novell.com> wrote:
> El ds 16 de 05 de 2009 a les 17:10 +0530, en/na Andy va escriure:
>> Hi,
>>
>> I'm writing an add-in for MonoDevelop as my GSoC project, after an
>> evening of hacking and trying to get it to work, I've not been able
>> to. Michael Hutchinson is my mentor and he's help me set it up. I just
>> wanted to ask a few questions I have, and ask people if there's
>> anything I'm doing wrong.
>>
>> Build settings:
>> I'm starting off using the DateInserter example on the MD Wiki. I use
>> a near-trunk build for regular usage, but write the code on the trunk
>> tree.
>> here's what I've done so far:
>> * Built MD with ./configure --profile=select, with main and
>> addinauthoring selected
>> * opened the main.mdw workspace with extras and main solutions.
>> * added a new project to the Main/Addins
>> * Wrote the code exactly as it's mentioned on the wiki.
>> * Built only the single addin's solution using F7 which happens quite
>> quickly, and that's nice
>> * The addin compiles to the DLL and I added the path to the dll to
>> local-config/main.addins
>
> Don't do that. Just change the build output path to Main/build/Addins.
>
>> * I set the PKG_CONFIGURE_PATH in my .bashrc to point to the
>> local-config of my trunk tree.
>
> You don't need to do that.

Although your answers are 100% correct for addins in main, my original
advice was for setting up an addin as a separate solution in extras.

In the case of having the addin in extras/YourAddinName, it is necessary to:

1) configure your projects to output assemblies to extras/YourAddinName/build
2) set PKG_CONFIG_PATH to point to the local-config directory so MD
will allow you to reference the local MD's assemblies as packages, and
hence build and get code completion against the local MD
-then, either-
3a) add a makefile and configure script to the extras/YourAddinName so
that it can be built with the top-level configure script and
makefiles. This makefile must use the PKG_CONFIG_PATH passed to it by
the configure script. MonoDevelop.AspNet.Mvc is an example of a such a
makefile that invokes mdtool. Also add your addin to prpfiles/all,
then run configure --select, and make sure the addin is selected as
part of the build.
-or-
3b) if not using a makefile, add a YourAddinName.addins file to
local-config, pointing at the extras/YourAddinName/build directory, to
make the local MD load the addin

We should really have a page on the wiki for this. It would also be
convenient if we could eliminate step 2 by having the workspace handle
pkgconfig resolution in some way.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list