DevPartner 2018 Workshop : Maximize Your Traditional Synergy Development with Visual Studio

Exercise 2: UI Toolkit Window Library Project

Previous Exercise Home Next Exercise

This is the second of a series of exercises that demonstrate the abilities of developing Traditional Synergy inside Visual Studio.

If you have not completed the previous “Synergy/DE Repository Project creation” exercise you can find that here.

This exercise will use a standard Synergy/DE Windows Console application project to build window script files into a window library. It uses pre-build scripts to build the library.

To begin the exercise, follow these simple steps:

This will create a console application. We are going to use this project to build our UI Toolkit window library so we are not really concerned with the console application it also builds. After the project is created it will open up the program.dbl default program file. Close this window.

To ensure the correct version of the software is built:

We are going to add two window script files to the project. The files are called Maintenance.wsc and system.wsc. These window script files can be downloaded from here. Download (when prompted by the browser select “open”) and open the zip file and copy the window script files to the WindowLibrary project folder you have just created. This folder will be under the DevPartner2018 solution folder.

To add the window script files to the project follow these steps:

This will add the two script files to the project. We need to ensure that the files have been added with a Build Action of “Content”:

We now need to create the pre-build script. The script is quite complex so we have provided the contents for you. You can download the script file from here. Download (when prompted by the browser select “open”) and open the zip file and copy the script file to the WindowLibrary project folder you have just created. This folder will be under the DevPartner2018 solution folder.

We can now execute this script as part of the build process. To do this we will utilize a pre-build event. To define the pre-build event:

"$(ProjectDir)\PreBuildScript.bat" "$(SolutionDir)" "$(ProjectDir)" %TEMP%

Now define the project dependencies

You can check the window library has been correctly created by opening a new File Explorer window and navigate to the Documents\Visual Studio 2017\Projects\DevPartner2018\WinLib folder. This folder should contain theOnVinyl_winlib.is* files.