mohangk.org/blog

Thoughts, somewhat explained

Tomboy Addin – Developing with MonoDevelop

| 1 Comment

Introduction

The following guide is meant to be an addendum to Tomboy guide to creating addins on the Tomboy wiki. It shows how to create and compile the addin using MonoDevlop. Although written based on MonoDevelop for the Mac, I believe the steps should be the same for any other platform running MonoDevelop. I also assume that you have already downloaded the Tomboy source from its git repository.

Step 1: Load the tomboy solution into MonoDevelop. When checking out from git, in the root folder there will be a file called Tomboy.sln (On the Mac use Tomboy-mac.sln). Open this up in MonoDevelop. Upon doing that your navigator will have the list of projects that come with Tomboy.
step1_started_monodevelop

Step 2: Adding the addin as a new prpject to the Tomboy solution. Right click on the Tomboy solution and select the “Add > Add New Project”.

step2_add_project.jpg

Step 3: Select to create a C# Library project. Insert the name of the addin as the name of the project and the loacation of the parent folder of the project.

step3_project_settings.jpg

Step 4: You should be able to see your new addin project within the navigator window. There will be some files auto generated that you can remove.

step4_delete_unnecessary_files.jpg

Step 5: Create the two files InsertDateTimeAddin.cs and InsertDateTime.addin.xml as instructed by the tutorial and make sure they are contained within our newly created InsertDateTime project. You can either do this by right clicking the InsertDateTime project and selecting “Add > New Files” or by copying the files into the project directory and then adding them to the project via “Add > Add Files”.

step5_add_or_new_files_into_project.jpg

Step 6: Add the required references (dependencies) for the addin project. To do this, right click the “Reerences” folder in the project and select “Edit References”.

step6_edit_references.jpg

Step 7: When the dialog box pops up makes ure the relevant packages, project and assemblies are added as references. You can see the list of references I have added by looking at the screenshot below. I based the list of the other addin projects.

step7_add_references.jpg

Step 8: Once added all the references should be visible as children to the references folder in the navigator.

step8_references_list.jpg

Step 9: Modify the options of the addin project by bringing up its “Options” dialog box by right clicking on the project and selecting “Options”.

step9_set_project_options.jpg

Step 10: When the “Options” dialog box appears, under “Build > General” ensure that the “Compile Target” is set to “Library” and that the “Runtime version” is set to “Mono/ .NET 2.0.”

step10_options_setting.jpg

Step 11: Under “Build > Output” of the ”Options” dialog box make sure that the output path is set to the appropriate path. To determine the right path I would suggest looking at the other addins setting as a guide of what this value should be.

step11_options_setting2.jpg

Step 12: The final configuration step is to ensuret that MonoDevelop know that the InsertDateTime.addin.xml is to be added as a resource with the built dll. To do this right click on InsertDateTime.addin.xml and select “Build Action > Embed as resource”.

step12_set_xml_as_resource.jpg

Step 13: Finally – build the complete project via the main menu option “Build > Build All”.

step13_build.jpg

 

One Comment

  1. Pingback: Tomboy No Spell check when Chinese | From 0 To 1

Leave a Reply

Required fields are marked *.

*