the Fiddler's picture

[OpenTK] Create project templates for Visual Studio and MonoDevelop (help wanted)

Project:The Open Toolkit library
Version:0.9.x-dev
Component:Miscellaneous
Category:task
Priority:normal
Assigned:Unassigned
Status:open
Description

Both Visual Studio and MonoDevelop support the addition of custom project templates. It would be beneficial to provide such templates that automate the setup of new OpenTK projects.

In their simplest form, the templates should perform the following actions:

  1. Add OpenTK.dll and System.Drawing to the project references.
  2. Add OpenTK.dll.config to the project items and set it to be copied to the output directory.
  3. Create a simple Program.cs file that constructs and runs a GameWindow.

In addition to the above, we could also add templates for GUI applications (WinForms GLControl or GTK# GLWidget), as well as code templates for VB.Net and other .Net languages.

Is there anyone familiar with VS or MD extensibility that could provide some pointers on how to implement this?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
flopoloco's picture

#1

With a simple file search in
C:\Program Files\MonoDevelop\AddIns\BackendBindings\MonoDevelop.CBinding.dll
I found that code templates are bundled in .dll files which makes things difficult.

On the other hand, things are better for SharpDevelop 3.1.0
You simply create an xpt text file (OpenTKApplication.xpt) in:
C:\Program Files\SharpDevelop\3.0\data\templates\project\CSharp

I have made such a template as an attached file and tested it successfully. :) Only you have to remove the OpenTK assembly (because it's not in GAC) and include it as a file from your disk.

P.S. Actually, I remember some one made a VS project template for OpenTK and posted a message in forums.

AttachmentSize
OpenTKApplication.txt4.42 KB
charles's picture

#2

Hi flopoloco,
I'm currently working on getting an installer setup and the good news is that it supports GAC which should make creating the templates a little easier. Anyway I'll have a look at integrating the template you've provided when I can.

bader51's picture

#3

i know this is a lil old lol but i converted the quick start project to vb.net and exported as a template a while ago 2 make it easier 2 start up projects.
Heres a link to the template if any1 wants it :)
just copy it into C:\Users\**USER**\Documents\Visual Studio **VERSION**\Templates\ProjectTemplates
:D

Tal's picture

#4

You can use in File -> Export Template in both VS 2005 and VS 2008.