Creation of the Pzl-Container: различия между версиями

Материал из wikiru.visual-prolog.com

 
Строка 124: Строка 124:
</vip>
</vip>


=Attributes related to the basic options =
==Attributes related to the basic options==
The last three positions in the form
The last three positions in the form
*Company
*Company

Текущая версия на 08:58, 7 февраля 2008

Автор: Виктор Юхтенко

The pzl-container is the place, where pzl-components are stored. In that sense the main application and the DLL are pzl-containers.

The pzl-technology supposes that the main executable application gets the features of the pzl-container, when it gets the features of the pzl-Port. Thus performing the operation of adding the pzlPort to the executable application, we create the pzl-container of the executable application.

That is why the Elementary PzlStudio has no operations to create the pzl-container at the main executable application. The operation creation of the pzl-container means the creation of the DLL, which is the pzl-container.

It is possible to create the project, which corresponds to the dll-container, may be created manually using the IDE. This is not recommended because of it needs the knowledge of the details of the pzl-container structure. Instead the Elementary PzlStudio proposes the very easy operation to create such a project.

After invoking the operation it needs to fill the form with the basic features of the pzl-container and by one clicking the button you get the pzl-container. This container you must open using the Visual Prolog IDE and build it.

Invoking the Operation

The form to perform the operation is invoked via the menu item File/New.../Container.

PzlNewContainerCreation.png

The list of features in the form is

The editing of the option is performed in the right side of the table. The Editing supposed to be done by the explicit editing or it may be done by the pressing the button on the right side of the active field. Double clicking makes the same as pressing the button.

The operation is performed by clicking the button Create.

The button may be inactive if there is not enough data entered.

After the operation completion you may create any other pzl-container.

The button Close closes the form.

Performing the Operation

While the performing the operation the Message Window gets the report regarding the changes made in the project.

PzlStudio ContainerCreatedMsg.png

The newly created the dll-container may be opened now by the IDE and you may build it.

The empty dll-container will look in the IDE like

PzlStudio EmptyContainerProjectView.png

Properties of the DLL-container

Containers Root Directory

This is the name of the directory, which was set in the Basic Options. If you have no reasons to change the directories organization, then you may leave this property with no changes.

You may change the Containers Root Directory. Just make a double click or press the button at the right side. This will invoke the file dialog to choose the name of the directory. If you set the name of the directory, which doesn’t exist, then Elementary PzlStudio will create it, if possible

If you have changed the Containers Root Directory compare to what was set in the basic options, then when the form will be closed you will get the question whether you wish to make changes in the Basic Options.

PzlChangeBaseContainersDirectory.png

If you agree, then the new value will be used each time, when it participates in any operation.

Containers SubDirectory

The Containers SubDirectory is exactly the directory, where all files of the pzl-container will be generated.

The Containers SubDirectory must be considered as the path (say Dir1/Dir2/Dir3 or just Dir1), which together with the base directory of the containers gives the final path to the directory, where all files of the container will be placed.

The property Containers SubDirectory is mandatory. It may not be empty.

If the final directory does not exist, then it will be created with no announcement.

If it is impossible to create the final directory, then the error dialog appeared with the error message.

Please notice: the name of the final directory of the dll-container project and the name of the dll-container may differ. It has some difference from the rule used in the IDE of the Visual Prolog system. In the Visual Prolog, the name of the project defines also the name of the directory.

Container Name

The container name defines the name of the project and the name of the project file <Container Name>.prj6. There is the limitation for the length of the container name – it must be longer, then 8 characters.

License Level

The Pzl-system uses the licensing principle.

There are license levels predefined:

  • Public
  • Commercial
  • Exclusive
  • SuperExclusive

The license level is defined:

  • for the main application – by the library pzlPort_X.lib
  • for the pzl-container – by the library pzlContainer_X.lib

Here X is the license level identifier.

The only pzl-container may have the license level Public. The main application may not have the license level Public.

The correspondence of the license level and the library’s identifier is shown below:

  • Commercial - pzlContainer_C.lib
  • Exclusive - pzlContainer_EY.lib (Y – the personal identifier)
  • SuperExclusive pzlContainer_SE.lib

So when you create the pzl-container, you must set the license level of the container. Choosing the license level defines exactly the name of the pzl-library, which will be included to the project. If you choose the license level Exclusive, then there may be many libraries of the license level Exclusive, so you must decide which variant of the library you wish to set for the application.

PzlStudio proposes the license level Commercial by default. This corresponds to the library PzlCommercial_C.lib.

When you choose the license level, then the Elemantary PzlStudio automatically assigns the name of the library to the property Container Library. This property is not editable. If the choice is Exclusive license level, then the dialog to choose the filename of the library appears and you see all available libraries. You must choose one of libraries of the Exclusive level. If the choice is wrong, then the error message appears

PzlContainerLicenseLevelErrorDlg.png

Container Library

This field is not editable. It shows the name of the library pzlContainer_X.lib, which corresponds to the appropriate license level of the dll-container.

Container Version

The pzl-container version is the string value, which has the meaning for the developer only. The Elementary PzlStudio only places the value of the property as the value of the constant pzlContainerVersion_C in the file PzlConfig.i, when it will be created.

interface iPzlConfig
constants
    pzlContainerVersion_C="1.0;001".
 
 % Container Configuration
constants
 
end interface iPzlConfig

Attributes related to the basic options

The last three positions in the form

  • Company
  • Author
  • Copyright

are taken from the Basic Options and they may be redefined here if there is need. If you modify these properties in the current form, they will not be changed in the Basic Options.

References