Creation of a new plugin under Visual Studio » History » Version 1
ModularMix, 10/14/2011 03:49 PM
| 1 | 1 | ModularMix | h1. Creation of a new plugin under Visual Studio |
|---|---|---|---|
| 2 | |||
| 3 | The purpose of this article is to explain step-by-step how to create and step up a new DLL project under Visual Studio 2008, so that it can be used as a new Scol plugin. |
||
| 4 | |||
| 5 | h2. Prerequisites |
||
| 6 | |||
| 7 | First of all, the Scol SDK, allowing development for Scol-based applications, must be installed. If not, go into the Scol Subversion to *trunk\tools\plugin sdk\release* and run *setup.exe* to install the SDK. |
||
| 8 | |||
| 9 | h2. Creation of the project |
||
| 10 | |||
| 11 | Under Visual Studio 2008, go to *File > New > Project* (*Fichier > Nouveau > Projet*). In the assistant window, select Win32 project using *Visual C++ > Win32 > Win32 Project* (*Visual C++ > Win32 > Projet Win32*). |
||
| 12 | Then validate the creation of the project by clicking on *OK*. |
||
| 13 | |||
| 14 | !http://intranet.i-maginer.org/images/1/16/VS2008_New_project.png! |
||
| 15 | |||
| 16 | In the advanced properties of the project, tick *DLL* for the application type and choose *Empty Project* (*Projet vide*) to create a new Dynamic Link Library without any source file. |
||
| 17 | |||
| 18 | !http://intranet.i-maginer.org/images/2/2f/VS2008_Project_settings.png! |
||
| 19 | |||
| 20 | Then validate the creation of the project. We can now go on with the configuration of the project itself. |
||
| 21 | |||
| 22 | h2. Configuration of the project |
||
| 23 | |||
| 24 | The first step is to add the template source file for the development of the plugin. In the project folder, create a new directory called *src* which will contain all the sources. |
||
| 25 | Then, go the Subversion repository and copy/paste the file named *template.cpp* available in *trunk\plugins\template\sources* into the *src* folder of the Visual Studio solution. |
||
| 26 | Finally, all we need to do is add this existing source file in our project by right clicking in the project tree on the folder *Source files* (*Fichiers sources*), and choosing *Add > Existing file* (*Ajouter > Elément existant*). |
||
| 27 | |||
| 28 | !http://intranet.i-maginer.org/images/e/e0/VS2008_Add_sources.png! |
||
| 29 | |||
| 30 | h2. Compilation of the project |
||
| 31 | |||
| 32 | The final part consists in adding the environment variable pointing to Scol SDK include folder. To do that, we just need to go (in the project properties) to *Configuration properties > C++ > General* (*Propriétés de configuration > C++ > Général*) and add *$(SCOL_SDK)* in *Other Include folders* (*Autres répertoires Include*). |