Difference between revisions of "Ide/Project Settings"
Boris Belov (talk | contribs) |
|||
(8 intermediate revisions by 4 users not shown) | |||
Line 11: | Line 11: | ||
[[Image:Ide_ApplicationExpert_General_Create.png]] | [[Image:Ide_ApplicationExpert_General_Create.png]] | ||
You need to specify a mandatory project name and other options. After the needed information is specified, press the '''OK''' button. The '''Project Settings''' utility will create the default files, define the | You need to specify a mandatory project name and other options. After the needed information is specified, press the '''OK''' button. The '''Project Settings''' utility will create the default files, define the {{ide|Make Facility#Build Script|build script}}, etc. | ||
=== Project Name === | === Project Name === | ||
The project name must be specified in the '''Project Name''' option while a project creation. '''Project Settings''' uses this project name to generate name for the project file: | The project name must be specified in the '''Project Name''' option while a project creation. '''Project Settings''' uses this project name to generate name for the project file: <vpbnf><ProjectName>.vipprj</vpbnf>. The specified project name is also used as the default name of '''Subdirectory''' in which the project is placed. | ||
=== Project Kind === | === Project Kind === | ||
Line 80: | Line 80: | ||
Here you can specify directories that will be used by the project. In '''Directories''' tab you can set up the project subdirectories to be used by the compiler, linker, resource generators, etc. | Here you can specify directories that will be used by the project. In '''Directories''' tab you can set up the project subdirectories to be used by the compiler, linker, resource generators, etc. | ||
Directory names refer to the | Directory names refer to the {{ide|Make Facility#Build Symbols|build script symbols}}. For example, when giving the name '''$(ProDir)''', it is automatically expanded to the actual path where the Visual Prolog system is installed. | ||
When all these project subdirectories are defined, then it is possible to move a project to another place and still be able to use it without need to redefine the | When all these project subdirectories are defined, then it is possible to move a project to another place and still be able to use it without need to redefine the {{ide|Make Facility#Build Script|project build scripts}} manually. This is possible because: | ||
* Usually these project subdirectories are defined relatively to the project root directory. Therefore, they are automatically redefined when the project is moved. | * Usually these project subdirectories are defined relatively to the project root directory. Therefore, they are automatically redefined when the project is moved. | ||
* Each of these subdirectories generates correspondent | * Each of these subdirectories generates correspondent {{ide|Make Facility#Build Symbols|build symbols}} and namely these built symbols are used to define file locations in the {{ide|Make Facility#Build Script|project build scripts}}. | ||
=== Intermediate === | === Intermediate === | ||
'''$(ObjDir)''' - This directory is used to place all intermediate (temporary) files of the project generated by the IDE. It defines the '''$(ObjDir)''' | '''$(ObjDir)''' - This directory is used to place all intermediate (temporary) files of the project generated by the IDE. It defines the '''$(ObjDir)''' {{ide|Make Facility#Build Symbols|build script symbols}}. The IDE automatically adds suffix '''64''' to the intermediate directory name. | ||
=== Final === | === Final === | ||
'''$(ExeDir)''' - This directory is the place for the generated target module (executable or DLL). It defines the '''$(ExeDir)''' | '''$(ExeDir)''' - This directory is the place for the generated target module (executable or DLL). It defines the '''$(ExeDir)''' {{ide|Make Facility#Build Symbols|build script symbols}}. The IDE automatically adds suffix '''64''' to the final directory name. | ||
=== Import Library === | === Import Library === | ||
'''$(LibDir)''' - This directory is used for DLL projects to place the generated import library. It defines the '''$(LibDir)''' | '''$(LibDir)''' - This directory is used for DLL projects to place the generated import library. It defines the '''$(LibDir)''' {{ide|Make Facility#Build Symbols|build script symbols}}. | ||
=== Prolog Root === | === Prolog Root === | ||
'''$(ProDir)''' - It is the root directory of the used Visual Prolog version. This directory defines the '''$(ProDir)''' | '''$(ProDir)''' - It is the root directory of the used Visual Prolog version. This directory defines the '''$(ProDir)''' {{ide|Make Facility#Build Symbols|build script symbols}}. | ||
=== Include Directories === | === Include Directories === | ||
Line 111: | Line 111: | ||
You can add a new directory to the list of the project include directories using the '''Browse''' button. The '''Browse''' button activates the '''Set New Directory''' dialog. Also you can use the '''Edit''' button, which activates the '''Edit Include Directory''' dialog. In this dialog you can directly type in a path. Using '''Up''' and '''Down''' buttons you can change the order in which the compiler will search in the specified include directories. | You can add a new directory to the list of the project include directories using the '''Browse''' button. The '''Browse''' button activates the '''Set New Directory''' dialog. Also you can use the '''Edit''' button, which activates the '''Edit Include Directory''' dialog. In this dialog you can directly type in a path. Using '''Up''' and '''Down''' buttons you can change the order in which the compiler will search in the specified include directories. | ||
This directory defines the '''$(IncDir)''' | This directory defines the '''$(IncDir)''' {{ide|Make Facility#Build Symbols|build script symbols}}. | ||
== Build Options Tab == | == Build Options Tab == | ||
Here you can edit the project | Here you can edit the project {{ide|Make Facility#Make Rules|build script '''Rules'''}} and the project {{ide|Make Facility#Build Script|'''Build Script'''}}, specify the '''Type Library File''', etc. | ||
=== Rules === | === Rules === | ||
Line 122: | Line 122: | ||
<vipbnf>pack->obj:$(Compiler) /L:R /L:I /L:STAT $(IncDir) /MAXE:200 /MAXW:1000 | <vipbnf>pack->obj:$(Compiler) /L:R /L:I /L:STAT $(IncDir) /MAXE:200 /MAXW:1000 | ||
"$**.pack" /OBJECTFILE:"$(ObjDir)$*.obj" /DEBUGFILE:"$(ObjDir)$*.deb" /debug:full</vipbnf> | |||
For more information about | For more information about {{ide|Make Facility#Make Rules|Rules}} syntax see the {{ide|Make Facility|Make Facility}}. | ||
=== Build Script === | === Build Script === | ||
Line 133: | Line 133: | ||
-M"$(ObjDir)$*.map" $(PROJECT_OBJ) "$(ObjDir)$*.res" $(PROJECT_LIB)<<</vipbnf> | -M"$(ObjDir)$*.map" $(PROJECT_OBJ) "$(ObjDir)$*.res" $(PROJECT_LIB)<<</vipbnf> | ||
For more information about | For more information about {{ide|Make Facility#Build Script|Build Scripts}} see the '''Make Facility''', the {{ide|Command Line Tools#Command Line Compiler|Command Line Compiler}}, and the {{ide|Command Line Tools#Command Line Linker|Command Line Linker}}. | ||
=== Definition (.def) File === | === Definition (.def) File === | ||
'''[$(DEF_FILE)]''': A | '''[$(DEF_FILE)]''': A {{ide|Command Line Tools#Definition Files|module-definition}} ('''.DEF''') file provides additional input for the linker. The module-definition files describe the essential characteristics of a target application or library. | ||
Ordinary module-definition files should be used when the project target is a DLL or when the target file should use DLLs. | Ordinary module-definition files should be used when the project target is a DLL or when the target file should use DLLs. | ||
When the project target is a DLL, then names of all predicates exported from the DLL have to be added to the | When the project target is a DLL, then names of all predicates exported from the DLL have to be added to the {{ide|Command Line Tools#Definition Files|EXPORT}} section of the module-definition file, which is used to build the DLL. | ||
When an import library is included into the project modules, then the correspondent DLL is linked statically to the application (load-time linking). Such projects must have module-definition files, whose | When an import library is included into the project modules, then the correspondent DLL is linked statically to the application (load-time linking). Such projects must have module-definition files, whose {{ide|Command Line Tools#Definition Files|IMPORTS}} sections should specify names of all predicates imported from the DLL. | ||
See | See {{ide|Command Line Tools#Definition Files|Definition Files}} in the {{ide|Command Line Tools#Command Line Linker|Command Line Linker}} for more information. | ||
=== Type Library File === | === Type Library File === | ||
Line 168: | Line 168: | ||
*:Contains a short description. | *:Contains a short description. | ||
*'''File Version''' | *'''File Version''' | ||
*:Is written in the <span style="color: | *:Is written in the <span style="color:Blue">A.B.C.D</span> format, where <span style="color:Blue">A</span>, <span style="color:Blue">B</span>, <span style="color:Blue">C</span>, <span style="color:Blue">D</span> are integers. <span style="color:Blue">A</span> means major version. | ||
*'''Product Version''' | *'''Product Version''' | ||
*:Is written in format <span style="color: | *:Is written in format <span style="color:Blue">A.B.C.D</span>, where <span style="color:Blue">A</span>, <span style="color:Blue">B</span>, <span style="color:Blue">C</span>, <span style="color:Blue">D</span> are integers. <span style="color:Blue">A</span> means major version. | ||
*'''Trademarks:''' | *'''Trademarks:''' | ||
*:Represents the project Trademarks information. | *:Represents the project Trademarks information. | ||
Line 185: | Line 185: | ||
*#'''Private Build''' | *#'''Private Build''' | ||
*#:This flag means that the target file was built for private purpose. | *#:This flag means that the target file was built for private purpose. | ||
== Run Options Tab == | == Run Options Tab == | ||
Line 201: | Line 190: | ||
*'''Run Arguments''' | *'''Run Arguments''' | ||
*:Here it is possible to specify command line parameters that will be passed to the target application when it starts from the IDE. | *:Here it is possible to specify command line parameters that will be passed to the target application when it starts from the IDE. | ||
*'''Executable for Debugger''' | *'''Executable for Run/Debugger''' | ||
*:Here you can specify an executable filename that will be loaded by the IDE for debugging. | *:Here you can specify an executable filename that will be loaded by the IDE for debugging. | ||
*'''External Project for Debugger''' | *'''External Project for Debugger''' |
Latest revision as of 15:13, 9 September 2019
IDE |
---|
The Project Settings utility is used to create new Visual Prolog Projects and to change some settings of existing projects.
To activate the Project Settings dialog, select the Project | Settings menu item. Project Settings is also activated when you create a new project (with the Project | New command).
General Tab
When creating a new project the sheet looks like:
You need to specify a mandatory project name and other options. After the needed information is specified, press the OK button. The Project Settings utility will create the default files, define the build script, etc.
Project Name
The project name must be specified in the Project Name option while a project creation. Project Settings uses this project name to generate name for the project file: ProjectName.vipprj. The specified project name is also used as the default name of Subdirectory in which the project is placed.
Project Kind
Sets which type the application will have.
The IDE automatically generates different default sets of files (and codes) for each application type.
Note. DLL option is available for the Visual Prolog Commercial Edition only.
MDI Mode/SDI Mode
Specifies whether the IDE creates a multi document interface- or single document interface- project template respectively.
Note. This option is available for the Visual Prolog Commercial Edition only. Otherwise the MDI Mode is assumed by the default.
Base Directory and Subdirectory
The name of the directory, in which the project is placed, is generated from the path specified in Base Directory that is concatenated with the folder name specified in Subdirectory.
- Base Directory
- Specifies the base directory for the project being created.With the Browse button, you can open up a directory browser to find a proper Base Directory.
- Subdirectory
- Specifies the subdirectory (relative to the Base Directory), which should be the root directory for the project being created.By default the Subdirectory name is equal to the specified Project Name, but it can be changed while the project creation.
Note. That if you choose a directory that already contains some project as the directory in which to place the project being created, then the Project Settings utility displays the These files will be overwritten warning dialog. It displays names of already existing files which will be overwritten after you push the Create button. Therefore, it is a good idea to store each project in its own directory.
Platform
Specifies the project target platform as one of the following:
- 32bit
- 64bit
- 32bit+64bit
When the two 32bit 64bit platforms are specified as the project target, the active platform can be choosen through the Build menu.
Note. This option is available for the Visual Prolog Commercial Edition only. Otherwise the 32bit is assumed by the default.
Manifest File
When it is checked ON, then the Manifest file is generated for the project.
A Win32 side-by-side assembly contains a collection of resources—a group of DLLs, windows classes, COM servers, type libraries, or interfaces—that are always provided together with applications. These are described in the assembly Manifest files. For more details about Manifest files see descriptions in MSDN.
Require commctrl v.6
Specifies that the generated manifest file contains a statement to require the system commctrl.dll version 6 for the application.
Require Administrative Rights
Specifies that the generated manifest file contains a statement to require the administrative privileges for the application.
To open the Project Settings dialog for the existing project, use the Project | Settings menu item.
The General tab will look, in this case, as foolows:
Directories Tab
Here you can specify directories that will be used by the project. In Directories tab you can set up the project subdirectories to be used by the compiler, linker, resource generators, etc.
Directory names refer to the build script symbols. For example, when giving the name $(ProDir), it is automatically expanded to the actual path where the Visual Prolog system is installed.
When all these project subdirectories are defined, then it is possible to move a project to another place and still be able to use it without need to redefine the project build scripts manually. This is possible because:
- Usually these project subdirectories are defined relatively to the project root directory. Therefore, they are automatically redefined when the project is moved.
- Each of these subdirectories generates correspondent build symbols and namely these built symbols are used to define file locations in the project build scripts.
Intermediate
$(ObjDir) - This directory is used to place all intermediate (temporary) files of the project generated by the IDE. It defines the $(ObjDir) build script symbols. The IDE automatically adds suffix 64 to the intermediate directory name.
Final
$(ExeDir) - This directory is the place for the generated target module (executable or DLL). It defines the $(ExeDir) build script symbols. The IDE automatically adds suffix 64 to the final directory name.
Import Library
$(LibDir) - This directory is used for DLL projects to place the generated import library. It defines the $(LibDir) build script symbols.
Prolog Root
$(ProDir) - It is the root directory of the used Visual Prolog version. This directory defines the $(ProDir) build script symbols.
Include Directories
$(IncDir) - This list box displays the list of the project include directories.
Each line contains one directory. In these directories the compiler will search for included files (specified in #include or #bininclude compiler directives), if the specified filename does not contain an absolute path. A single dot indicates the current directory, which is always the project directory. Two dots indicate the parent directory of the current directory.
You can add a new directory to the list of the project include directories using the Browse button. The Browse button activates the Set New Directory dialog. Also you can use the Edit button, which activates the Edit Include Directory dialog. In this dialog you can directly type in a path. Using Up and Down buttons you can change the order in which the compiler will search in the specified include directories.
This directory defines the $(IncDir) build script symbols.
Build Options Tab
Here you can edit the project build script Rules and the project Build Script, specify the Type Library File, etc.
Rules
Determine how to compile files with given extensions. An example is the following:
pack->obj:$(Compiler) /L:R /L:I /L:STAT $(IncDir) /MAXE:200 /MAXW:1000 "$**.pack" /OBJECTFILE:"$(ObjDir)$*.obj" /DEBUGFILE:"$(ObjDir)$*.deb" /debug:full
For more information about Rules syntax see the Make Facility.
Build Script
Describes how to build the final target. An example is the following,
"$(ProDir)Bin\VIP6Link.exe" -F<< -E_VIPStartUp@0 -d -TPE -SGUI -o"$(ExeDir)$*.exe" -M"$(ObjDir)$*.map" $(PROJECT_OBJ) "$(ObjDir)$*.res" $(PROJECT_LIB)<<
For more information about Build Scripts see the Make Facility, the Command Line Compiler, and the Command Line Linker.
Definition (.def) File
[$(DEF_FILE)]: A module-definition (.DEF) file provides additional input for the linker. The module-definition files describe the essential characteristics of a target application or library.
Ordinary module-definition files should be used when the project target is a DLL or when the target file should use DLLs.
When the project target is a DLL, then names of all predicates exported from the DLL have to be added to the EXPORT section of the module-definition file, which is used to build the DLL.
When an import library is included into the project modules, then the correspondent DLL is linked statically to the application (load-time linking). Such projects must have module-definition files, whose IMPORTS sections should specify names of all predicates imported from the DLL.
See Definition Files in the Command Line Linker for more information.
Type Library File
Here you can use the Browse button to specify a Type Library, which should be used in your project. Usually, you need this when creating COM objects.
Version Information Tab
Here you specify some information about the project: Company, Author, Copyright, File Version, Trademarks, etc.
Some of version information attributes can be shown by the operation system File Properties dialog and can be used to validate version of DLL or EXE, before loading them.
Version information contains the following fields:
- Company
- Usually is the name of the company that is the Copyright owner to the project.
- Author
- Represents information about the author of the project.
- Copyright
- Represents the Copyright information, which is visible in the File Properties dialog.
- Description
- Contains a short description.
- File Version
- Is written in the A.B.C.D format, where A, B, C, D are integers. A means major version.
- Product Version
- Is written in format A.B.C.D, where A, B, C, D are integers. A means major version.
- Trademarks:
- Represents the project Trademarks information.
- File Flags:
- These are flags that describe the target file of the project:
- Debug
- This flag means that the project is built with debugging information.
- Prerelease
- This flag means that the target file is an intermediate version.
- Patched
- This flag means that the target file has been modified comparing with the original file, which has the same version number.
- Special Build
- This flag means that the target file was built using standard release procedures but for special purpose.
- Private Build
- This flag means that the target file was built for private purpose.
Run Options Tab
- Run Arguments
- Here it is possible to specify command line parameters that will be passed to the target application when it starts from the IDE.
- Executable for Run/Debugger
- Here you can specify an executable filename that will be loaded by the IDE for debugging.
- External Project for Debugger
- Here you can specify a project with the debug information that should be used by the IDE while debugging.
- Working Directory for Run/Debug
- If this option is set, a user application will use this directory as a working directory for Run/Debug comands, otherwise the final directory will be used. If the relative path is defined then the path is calculated from the project directory.