Make an EZ-Builder Behavior Control
7. Test Plugin
As you may recall from the beginning of this tutorial, your code is generating a DLL file and not an EXE executable. This means that testing your program can only by done within the EZ-Builder application. We've made this very easy and these instructions will direct you how to do it.
1) Right click on the project and select Properties.
2) Select the BUILD tab and configure the Platform Target for x86.
3) Scroll down through the BUILD tab options and locate the Output Path setting.
4) This is where you will configure the output files to be copied when the project is compiled. Press the BROWSE button. The output path for your project will be located in the EZ-Builder Plugins folder in a folder created with the name of the GUID of your plugin. The plugin GUID can be found in the Plugin.XML file.
EZ-Builder Plugins must be located in the following folder, or where your Public Documents are stored:
The (GUID) is replaced with your Plugin's application GUID from the Plugin.XML file. For example, your output folder path would look like this:
*Note: Your public documents folder may be in a different location than this example. The best way to tell where the public documents folder is on your computer is to locate it using the file explorer by typing %PUBLIC% in the address bar. Select Public Documents within that folder that opens. If the public documents folder does not list an EZ-Builder folder, that means you have not loaded EZ-Builder at least once. The folders will be automatically created when you load EZ-Builder the first time. Load EZ-Builder and see that the folders will be created in the %PUBLIC% documents folder.
5) Navigate to the DEBUG tab in the properties window.
6) Select the Start Action to be set for an External Program. The program which we will specify is the EZ-Builder installed on your PC. The file will be C:\Program Files (x86)\Synthiam Inc\EZ-Builder\EZ-Builder.exe
7) Compile and debug your project by pressing F5. This will compile the project if there are no errors, and EZ-Builder will be launched. This allows debugging of the plugin to occur while EZ-Builder is running. How cool is that?
8) To stop debugging, there are a few methods. Either close EZ-Builder or press SHIFT-F5 from the Visual Studio window. Pressing SHIFT-F5 from the Visual Studio window will terminate EZ-Builder and therefore no saving prompts, etc will be presented.
9) To access your plugin from EZBuilder during DEBUG, press PROJECT->ADD CONTROL to open the list of controls which you can add to the project. Navigate to the BETA tab and your plugin should be listed.
10) Select your plugin and it will be added to the EZ-Builder Workspace.
11) Connect to your EZ-B and press the buttons on your new plugin. The servo connected to port D0 will move! Voila
Congratulations on creating your first plugin! There are many more advanced features which you will learn by examining other open-source plugins. In the next step, there will be additional information for publishing plugins and where to get more advanced source-code examples.
Additional Compiling Information
This screenshot demonstrates that the DLL and Plugin.XML file have been copied to the EZ-Builder plugin folder after compiling. When the compiling and debugging is selected with pressing F5 in Visual Studio, all required files must be copied by Visual Studio to the output folder. The output folder, of course is the GUID named folder in the Public Documents. The required files are the plugin DLL, Plugin.XML and all dependencies. If your plugin has an icon, that file is Title.JPG or Title.PNG and should also be copied to the output folder. If your files are not copied, this means a step has been missed during this tutorial. Simply retrace the tutorial steps and everything will come together.