Difference between revisions of "IDE Window: Package Editor"

From Free Pascal wiki
Jump to navigationJump to search
(31 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 
{{IDE Window: Package Editor}}
 
{{IDE Window: Package Editor}}
 +
[[File:IDE Window - Package Editor.png|frame|none|Package Editor]]
  
 
== Save ==
 
== Save ==
 +
Save changes to disk. (.lpk file)
 +
 +
== Compile ==
 +
Compiles the package and all dependencies.
  
Save changes to disk. (.lpk file)
+
== Use ==
 +
This opens a drop-down list when clicked.
 +
* '''Add to Project''' - Add this package as a dependency to the current project.
 +
* '''Install''' - Compiles the package and all dependencies, adds it to the list of install packages of the IDE and rebuilds the IDE. Should be used only when the package registers components or functions to the IDE.
 +
* '''Uninstall''' - Remove this package and all dependent packages from the list of installed IDE packages. You will be asked if you want then to rebuild the IDE. Rebuilding completes the removal.
  
 
== Add ==
 
== Add ==
 +
This opens a drop-down list when clicked.
 +
* '''Add Files from File System''' - Shows a standard FileOpen dialog which allows to choose files to add. Multi-selection is allowed.
 +
* '''Add Files in Directory''' - Opens a dialog for selecting a directory and file name filters. The matching files from that directory are then added to the package. ToDo: explain better.
 +
* '''New File''' - A new file of chosen type is created and added to the package.
 +
* '''New Component''' -  A new registered component is created. A dialog asks for an ancestor type, class name and other relevant information. ToDo: screenshot of the dialog.
 +
* '''New Requirement''' - Now required packages and their Minimum/Maximum versions can be added one by one using the dialog that shows up. ToDo: this must be implemented better. There should be a way to add many requirements at one go.
  
Opens the dialog [[IDE Window: Add to Package|Add to Package]] to add a new item (unit, file, dependency, ...) to the package.
+
History: The earlier combined dialog [[IDE Window: Add to Package|Add to Package]] to add a new item (unit, file, dependency, ...) to the package.
 +
 
 +
== Remove ==
 +
Remove the currently selected item (e.g. file or dependency) from the package. A dialog will open to confirm.
  
 
== Options ==
 
== Options ==
 
 
Opens the dialog [[IDE Window: Package Options|Package Options]] to setup the Usage options, version information, author and other general information of the package.
 
Opens the dialog [[IDE Window: Package Options|Package Options]] to setup the Usage options, version information, author and other general information of the package.
  
== Install ==
+
[[IDE Window: Compiler Options|Compiler Options]] of the package can be found in the same options dialog.
 
 
Compiles the package and all dependencies, adds it to the list of install packages of the IDE and rebuilds the IDE.
 
  
 
== Help ==
 
== Help ==
 
 
Show this help.
 
Show this help.
  
== Compile ==
+
== More ==
 
+
This opens a drop-down list when clicked.
Compiles the package and all dependencies.
+
* '''Find in Files''' - open a search dialog with the package's directory preset.
 
+
* '''Sort Files Permanently''' - The package's files are sorted alphabetically and the new order is stored in the package. This is different from the "Sort files alphabetically" ToolButton which only sorts the view temporarily.
== Remove ==
+
* '''Fix Files Case''' - ToDo: Explain.
 +
* '''Show Missing Files''' - Shows a list of package's files which do not exist in file-system and lets you remove them.
 +
* '''Save Package''' - Save changes to the .lpk file.
 +
* '''Save Package As''' - Opens a dialog in which you can choose a new filename for the .lpk file. The package (.lpk) will be renamed. The files referenced by the package are not moved or renamed. If you save the renamed package (.lpk) in a new directory, check the paths in the [[IDE Window: Compiler Options|compiler options]].
 +
* '''Revert Package''' - Discard any changes you have made, and reload the original package (.lpk) from disk.
 +
* '''Publish Package''' - Opens [[IDE Window: Publish Project Package|Publish Project / Package]] to copy the package and its files to another directory. This is useful for creating a package without compiled files or version files (svn, cvs, ...) as a preliminary to creating a zipped file of the package to send to another computer.
 +
* '''Compile''' - Compile this package. If any required package needs compiling, that package will be rebuilt first.
 +
* '''Recompile clean''' - Normally the compiler checks each unit in case it needs to be rebuilt. This option prevents such compiler checks, causing it to compile every unit in the package. If any required package needs compiling, it will be rebuilt first.
 +
* '''Recompile all required''' - Same as ''Recompile Clean'', but all required packages are also recompiled. Keep in mind that some base packages like the FCL and LCL are set to never compile automatically and thus are never recompiled by this call. ToDo: Check the validity of the statement.
 +
* '''Create fpmake.pp''' - Creates a fpmake.pp for this package, which can be used to compile the package without the IDE. ToDo: Explain more.
 +
* '''Create Makefile''' - Creates a Makefile.fpc and a Makefile for this package, which can be used to compile the package without the IDE. Be aware that the Makefile is simple, and requires that all needed packages are at the same place. This means that if you copy the Makefile to another computer, it will need exactly the same paths for all packages (including Lazarus). So usually you will need to adapt such a copied Makefile yourself to allow it to run successfully on another computer (which is almost certain to have different path configurations).
 +
* '''View Package Source''' - Opens the main source file of the package. This unit is automatically created by the IDE on each compile. So don't waste time editing it manually, since all your changes will be lost.
 +
* '''View ToDo List''' - Opens the ToDo list viewer, restricted just to ToDo items from inside this package. Note, this shows up only if the TodoListLaz IDE package is installed.
  
Remove the currently selected item (e.g. file or dependency) from the package. A dialog will open to confirm.
+
== File properties ==
 +
The lower pane shows these properties when a file is selected.
 +
;Register unit: Check this if the selected unit contains a procedure '''Register''' in the interface which should be called at designtime by the IDE. This is for example needed when the unit registers a new component for the IDE component palette.
 +
;Use unit: Check this if the selected unit should automatically be compiled when the package is compiled. This is enabled by default for Pascal units and unchecked for all others. Uncheck this if the unit is only usable under some platforms.
 +
; Registered plugins: For register units a list of components with icon and component page as provided by the register-unit is shown.
  
== Compiler Options ==
+
== Dependency properties ==
 
+
The lower pane shows these properties when a dependent package is selected.
Opens the [[IDE Window: Compiler Options|Compiler Options]] of the package.
+
;Minimum Version: Version number of the dependent package must be equal or higher than this value.
 
+
;Maximum Version: Version number of the dependent package must be equal or lower than this value.
== More ==
 
  
* '''Add to project''' -
+
== See also ==
* '''Install''' - Compiles the package and all dependencies, adds it to the list of install packages of the IDE and rebuilds the IDE.
+
* [[Lazarus Packages]]
* '''Uninstall''' - Remove this package and all dependend packages from hte list of IDE install packages. It will ask to rebuild the IDE. To uninstall a static packages, the IDE must be rebuild and restarted. (At the moment all IDE packages are static).
+
* [[How To Write Lazarus Component]] - a tutorial about creating a new component.
* '''Save''' - Save changes to the .lpk file.
+
* [[Install IDE packages without the IDE]]
* '''Save As''' - Opens a dialog and to choose a new filename for the .lpk file. The package will be renamed. The package files are not moved/renamed. If you save it in a new directory check the paths in the [[IDE Window: Compiler Options|compiler options]].
 
* '''Revert''' - Discard changes and load the package (.lpk) from disk.
 
* '''Publish Package''' - Opens [[IDE Window: Publish Project Package|Publish Project / Package]] to copy the package and its files to another directory. This is useful to create a package without compiled, version files (svn, cvs, ...) and create a zip.
 
* '''Compile''' - Compile this package. If any required package needs compiling, they will be rebuilt first.
 
* '''Recompile clean''' - Normally the compiler checks for each unit, if it needs to be rebuild. With this, the compiler does not check, but compiles every unit of the package. And if any required package needs compiling, they will be rebuilt first.
 
* '''Recompile all requires''' - Same as ''Recompile Clean'', but for this and any required package. Keep in mind that some base packages like the FCL and LCL are set to never compile automatically and thus are never recompiled by this call.
 
* '''Create Makefile''' - Creates a Makefile.fpc and a Makefile for this package, which can be used to compile the package without the IDE. Beware, that the Makefile is simple and requires, that all needed packages are at the same places. That means, that copying this Makefile to another computer needs exactly the same paths of all packages, including lazarus, or you must adapt the Makefile yourself.
 
* '''Add''' - Opens [[IDE Window: Add to Package|Add to Package]] to add a new item (unit, file, dependency, ...) to the package.
 
* '''Remove''' - Remove the currently selected item (e.g. file or dependency) from the package. A dialog will open to confirm.
 
* '''General Options''' - Opens the dialog [[IDE Window: Package Options|Package Options]] to setup the Usage options, version information, author and other general information of the package.
 
* '''Compiler Options''' - Opens the [[IDE Window: Compiler Options|Compiler Options]] of the package.
 
* '''View Package Source''' - Opens the main source file of the package. This unit is automatically created by the IDE on each compile. So, do not edit it manually, as all your changes will be lost.
 

Revision as of 14:34, 15 January 2017

Deutsch (de) English (en) suomi (fi) français (fr) 日本語 (ja) português (pt)

Package Editor

Save

Save changes to disk. (.lpk file)

Compile

Compiles the package and all dependencies.

Use

This opens a drop-down list when clicked.

  • Add to Project - Add this package as a dependency to the current project.
  • Install - Compiles the package and all dependencies, adds it to the list of install packages of the IDE and rebuilds the IDE. Should be used only when the package registers components or functions to the IDE.
  • Uninstall - Remove this package and all dependent packages from the list of installed IDE packages. You will be asked if you want then to rebuild the IDE. Rebuilding completes the removal.

Add

This opens a drop-down list when clicked.

  • Add Files from File System - Shows a standard FileOpen dialog which allows to choose files to add. Multi-selection is allowed.
  • Add Files in Directory - Opens a dialog for selecting a directory and file name filters. The matching files from that directory are then added to the package. ToDo: explain better.
  • New File - A new file of chosen type is created and added to the package.
  • New Component - A new registered component is created. A dialog asks for an ancestor type, class name and other relevant information. ToDo: screenshot of the dialog.
  • New Requirement - Now required packages and their Minimum/Maximum versions can be added one by one using the dialog that shows up. ToDo: this must be implemented better. There should be a way to add many requirements at one go.

History: The earlier combined dialog Add to Package to add a new item (unit, file, dependency, ...) to the package.

Remove

Remove the currently selected item (e.g. file or dependency) from the package. A dialog will open to confirm.

Options

Opens the dialog Package Options to setup the Usage options, version information, author and other general information of the package.

Compiler Options of the package can be found in the same options dialog.

Help

Show this help.

More

This opens a drop-down list when clicked.

  • Find in Files - open a search dialog with the package's directory preset.
  • Sort Files Permanently - The package's files are sorted alphabetically and the new order is stored in the package. This is different from the "Sort files alphabetically" ToolButton which only sorts the view temporarily.
  • Fix Files Case - ToDo: Explain.
  • Show Missing Files - Shows a list of package's files which do not exist in file-system and lets you remove them.
  • Save Package - Save changes to the .lpk file.
  • Save Package As - Opens a dialog in which you can choose a new filename for the .lpk file. The package (.lpk) will be renamed. The files referenced by the package are not moved or renamed. If you save the renamed package (.lpk) in a new directory, check the paths in the compiler options.
  • Revert Package - Discard any changes you have made, and reload the original package (.lpk) from disk.
  • Publish Package - Opens Publish Project / Package to copy the package and its files to another directory. This is useful for creating a package without compiled files or version files (svn, cvs, ...) as a preliminary to creating a zipped file of the package to send to another computer.
  • Compile - Compile this package. If any required package needs compiling, that package will be rebuilt first.
  • Recompile clean - Normally the compiler checks each unit in case it needs to be rebuilt. This option prevents such compiler checks, causing it to compile every unit in the package. If any required package needs compiling, it will be rebuilt first.
  • Recompile all required - Same as Recompile Clean, but all required packages are also recompiled. Keep in mind that some base packages like the FCL and LCL are set to never compile automatically and thus are never recompiled by this call. ToDo: Check the validity of the statement.
  • Create fpmake.pp - Creates a fpmake.pp for this package, which can be used to compile the package without the IDE. ToDo: Explain more.
  • Create Makefile - Creates a Makefile.fpc and a Makefile for this package, which can be used to compile the package without the IDE. Be aware that the Makefile is simple, and requires that all needed packages are at the same place. This means that if you copy the Makefile to another computer, it will need exactly the same paths for all packages (including Lazarus). So usually you will need to adapt such a copied Makefile yourself to allow it to run successfully on another computer (which is almost certain to have different path configurations).
  • View Package Source - Opens the main source file of the package. This unit is automatically created by the IDE on each compile. So don't waste time editing it manually, since all your changes will be lost.
  • View ToDo List - Opens the ToDo list viewer, restricted just to ToDo items from inside this package. Note, this shows up only if the TodoListLaz IDE package is installed.

File properties

The lower pane shows these properties when a file is selected.

Register unit
Check this if the selected unit contains a procedure Register in the interface which should be called at designtime by the IDE. This is for example needed when the unit registers a new component for the IDE component palette.
Use unit
Check this if the selected unit should automatically be compiled when the package is compiled. This is enabled by default for Pascal units and unchecked for all others. Uncheck this if the unit is only usable under some platforms.
Registered plugins
For register units a list of components with icon and component page as provided by the register-unit is shown.

Dependency properties

The lower pane shows these properties when a dependent package is selected.

Minimum Version
Version number of the dependent package must be equal or higher than this value.
Maximum Version
Version number of the dependent package must be equal or lower than this value.

See also