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

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

м
Строка 53: Строка 53:
== Containers Root Directory ==
== Containers Root Directory ==
This is the name of the directory, which was set in the [[Setting Basic Options#User PzlConteiners Location|Basic Options]]. If you have no reasons to change the directories organization, then you may leave this property with no changes.
This is the name of the directory, which was set in the [[Setting Basic Options#User PzlConteiners Location|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
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
Строка 63: Строка 62:
If you agree, then the new value will be used each time, when it participates in any operation.
If you agree, then the new value will be used each time, when it participates in any operation.


== Containers SubDirectory ==
==Containers SubDirectory==
Директория Dll-Контейнера - это именно та директория, в которую будут помещены все файлы контейнера.
The Containers SubDirectory is exactly the directory, where all files of the pzl-container will be generated.


Директорию Dll-Контейнера следует рассматривать как маршрут (например, в форме Дир1/Дир2/Дир3 или просто Дир1), который в совокупности с Базовой директорией контейнеров даст окончательный маршрут к директории, где будут создаваться файлы контейнера.
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.


Поле '''Директория Dll-Контейнера''' не может быть пустым.
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.


Если '''Директория Dll-Контейнера''' по каким-либо причинам не может быть создана, то появится диалог с сообщением об ошибке.
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.
'''''Обращаем внимание на то, что имя конечной директории Dll-Контейнера и имя контейнера (проекта) могут различаться, хотя первоначально они будет предложены одинаковыми.''''' Это несколько отличается от правила, действующего в IDE системы Visual Prolog. Там, задав имя проекту, Вы однозначно определяете и имя директории, в которую будут сгенерированы файлы проекта.


==Container Name==
==Container Name==
Имя контейнера определяет имя файла проекта <Имя Контейнера>.prj6. Должно быть не менее 8 символов.
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==
== License Level==
Pzl-Система использует принцип лицензирования.  
The Pzl-system uses the licensing principle.  


Лицензии различаются по уровням:
There are license levels predefined:
*Public - публичная
*Public
*Commercial - коммерческая
*Commercial
*Exclusive - эксклюзивная (исключительная)
*Exclusive
*SuperExclusive  
*SuperExclusive  


Уровень лицензии устанавливается:
The license level is defined:
*для главного приложения - библиотекой pzlPort_X.lib  
*for the main application – by the library pzlPort_X.lib  
*для pzl-Контейнера - библиотекой pzlContainer_X.lib
*for the pzl-container – by the library pzlContainer_X.lib
где X - идентификатор уровня лицензии.
Here X is the license level identifier.


Dll-Контейнер не может иметь уровень SuperExclusive. Этот уровень может иметь только PzlPort, причем, созданный компанией-разработчиком Pzl-Технологии.  
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:
*Public - pzlContainer_P.lib
*Commercial - pzlContainer_C.lib
*Commercial - pzlContainer_C.lib
*Exclusive - pzlContainer_EX.lib  (X - персонифицирующий идентификатор)
*Exclusive - pzlContainer_EY.lib  (Y – the personal identifier)
*SuperExclusive pzlContainer_SE.lib


Поэтому при создании нового контейнера Вы должны установить уровень лицензии, которым должно обладать Ваш контейнер. Выбор уровня лицензии однозначно определяет выбор имени pzl-библиотеки, которая будет включена в проект. В случае, если выбирается уровень лицензии Exclusive, то этому уровню может соответствовать множество библиотек уровня Exclusive.
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 предлагает значение по умолчанию - Public, которому соответствует библиотека pzlContainer_P.lib.
PzlStudio proposes the license level Commercial by default. This corresponds to the library PzlCommercial_C.lib.


При выборе уровня лицензии, Elemantary PzlStudio автоматически установливает имя библиотеки в поле '''''Container Library''''' (это поле не редактируется, а является справочным). Если выбирается уровень лицензии Exclusive, то Вам предлагается файловый диалог со списком имеющихся в Вашем распоряжении библиотек. Вы должны выбрать одну из библиотек, относящися к библиотекам уровня Exclusive. Если выбрана библиотека, не относящаяся к уровню Exclusive, то появляется сообщение
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]]
[[Image:PzlContainerLicenseLevelErrorDlg.png]]


== Container Library ==
=Container Library=
Это поле не редактируется и является справочным. Отражает имя библиотеки pzlContainer_X.lib, соответствующее уровню [[#Уровень лицензии|лицензии]] главного приложения.
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 ==
== Container Version ==
Версия Pzl-Конейнера является строкой, контролируемой только пользователем. Все, что делает Elementary PzlStudio с этой информацией - помещает ее в качестве значения константы pzlContainerVersion_C в файле PzlConfig.i после его создания.
= Pzl-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.


<vip>
<vip>
Строка 126: Строка 125:
</vip>
</vip>


== Attributes from Base Options ==
=Attributes related to the basic options =
Последние три позиции в форме
The last three positions in the form
*Company
*Company
*Author
*Author
*Copyright
*Copyright
устанавливаются в [[Setting Basic Options#Company|Basic Options]] и здесь могут быть переопределены в случае, отличном от типового. Если Вы их здесь изменили, то значения этих параметров в [[Setting Basic Options#Company|Basic Options]] не изменяются.
are taken from the [[Setting of the Basic Options#Company|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  [[Settings of the Basic Options #Company|Basic Options]].
 
=References=
=References=
[[Category:VpPuZzleEn]]
[[Category:VpPuZzleEn]]

Версия 15:45, 4 февраля 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

Pzl-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