Sign in Join
Wiki copytemporary

Online Package Manager: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## About
22
33Online Package Manager(OPM) is a tool that automates the process of installing, upgrading, configuring Lazarus packages. The packages are stored in the main repository(see repository column) as zip files, along with a [[JSON]] file. The JSON contains all necessary information about the packages. On request the packages are downloaded/extracted/compiled/installed into the IDE. If available, it's also possible to update a previously installed package from the maintainer webpage(see update column). There's also a web version of the Lazarus Packages Repository available here: <http://packages.lazarus-ide.org/>.
44
5-<span style="color:red">**Please note:**</span>
5+**Please note:**
66
77OPM reads the package description from the lpk file. I can understand that the description of many packages is very minimalistic or even non-existent, but there is nothing I can do about it. It's not OK to modify package description or any other property for that matter, without the consent of the package developer. More over testing each and every package, then write a detailed description is not realistic.
88
99### Screenshot
1010
11-<figure>
12-<img src="OPM6.png" title="OPM6.png" />
13-<figcaption>OPM6.png</figcaption>
14-</figure>
11+![](/wiki-images/6/6e/OPM6.png)
1512
16-<figure>
17-<img src="OPM7.png" title="OPM7.png" />
18-<figcaption>OPM7.png</figcaption>
19-</figure>
13+![](/wiki-images/b/b7/OPM7.png)
2014
2115### License
2216
2317[GNU General Public License](https://opensource.org/licenses/gpl-license)
2418
2519### Download
2620
2721Online package manager is part of Lazarus sources, in directory (\$LazarusDir)/components/onlinepackagemanager.
2822
2923### System Requirements / Dependencies
3024
3125- FPC 3.0.0 or newer
3226- Lazarus 1.8 or newer
3327- You can download an older version for the 1.6 series: [OPM 1.6](https://drive.google.com/open?id=0B9Me_c5onmWobVZOdVlXSlZRRmc)
3428- These versions were available at the time of writing this update.
3529- Tested on the following widgeset: win32/64, gtk2, carbon, qt(win)
3630- The package manager does not depend on any external package
3731
3832### Installation
3933
4034In Lazarus "Install/Uninstall Packages" window select "OnlinePackageManager" from the available packages, click "Install selection" and then rebuild the IDE.
4135
4236### Support page
4337
4438<http://forum.lazarus.freepascal.org/index.php/topic,34297.0.html>
4539
4640## Using the package manager
4741
4842### Getting started
4943
50-Go to Lazarus Menu--\>Package--\>Online Package Manager(Shortcut key: <span class="kbd">Ctrl</span>+<span class="kbd">Alt</span>+<span class="kbd">Shift</span>+<span class="kbd">O</span>). On startup the package manager will automatically download a list with available repository packages, the list is displayed in a tree(see screenshots above).
44+Go to Lazarus Menu--\>Package--\>Online Package Manager(Shortcut key: `Ctrl`+`Alt`+`Shift`+`O`). On startup the package manager will automatically download a list with available repository packages, the list is displayed in a tree(see screenshots above).
5145
5246### Filter the tree/Locate a package
5347
54-<figure>
55-<img src="OPM3.png" title="OPM3.png" />
56-<figcaption>OPM3.png</figcaption>
57-</figure>
48+![](/wiki-images/b/b3/OPM3.png)
5849
5950You can filter the package list by:
6051
6152- Packagename
6253- Package file(.lpk)--\>a repository package can contain multiple lpk files
6354- Package category
6455- Package status
6556- Version
6657- Description
6758- Author
6859- Lazarus compatibility
6960- FPC compatibility
7061- Supported widget sets
7162- Packagetype
7263- Dependencies
7364- License
7465
7566### Operation with packages
7667
77-<figure>
78-<img src="OPM4.png" title="OPM4.png" />
79-<figcaption>OPM4.png</figcaption>
80-</figure>
68+![](/wiki-images/a/a5/OPM4.png)
8169
8270#### Refresh package list
8371
8472Press the "Refresh" button to update the package list.
8573
8674#### Download package
8775
8876Check one or more package then press the "Download" button. This will download/extract the packages to a preselected directory. Nothing gets installed. Useful when you want to install the packages manually or study their sources without installing.
8977
9078#### Install a package
9179
9280Check one or more package then press the "Install" button. The package manager will automatically download/extract/compile/install the selected packages(from the main repository), then rebuild the IDE if necessary(Designtime/Designtime_and_runtime packages). Confirm the rebuild by clicking the "Yes" button. Please note: The compile feature is only available in Lazarus 1.7+.
9381
9482#### Update a package
9583
96-Check one or more package then press the "Update" button. The package manager will update the selected packages from the maintainer's homepage(if available). The package must be installed first, a direct update although is possible, it's not allowed to prevent unresolved dependency error. <span style="color:red">**Please note:**</span> downloading/installing packages from external link is not without a risk. Only update the package if you trust the package maintainer.
84+Check one or more package then press the "Update" button. The package manager will update the selected packages from the maintainer's homepage(if available). The package must be installed first, a direct update although is possible, it's not allowed to prevent unresolved dependency error. **Please note:** downloading/installing packages from external link is not without a risk. Only update the package if you trust the package maintainer.
9785
9886#### Difference between download/install/update
9987
10088Download/Install --\> Operations between you and the main repository.
10189
10290Update --\> Operations between you and the package maintainers.
10391
104-<figure>
105-<img src="OPM10.png" title="OPM10.png" />
106-<figcaption>OPM10.png</figcaption>
107-</figure>
92+![](/wiki-images/6/61/OPM10.png)
10893
10994Video link: [Difference between download/install/update](https://www.youtube.com/watch?v=wiN2GoCvgjc)
11095
11196#### Cleanup local repository
11297
11398This operation will delete all non-installed packages/archives from the local repository. To cleanup the local repository press the "Cleanup" button.
11499
115100#### Create
116101
117102*This section is for package maintainers. First you must go to Options--\>Profiles and select package maintainer.*
118103
119104##### Create repository package
120105
121106To create a repository package press "Create repository package" menu item, then:
122107
123108- select the package main directory(package manager will recursively search for all package files inside the folder)
124109- select the repository package(root node)
125110 - choose category(obligatory)
126111 - type display name(optional)
127112 - home page(optional)
128113 - update link(optional, for more details see "Create JSON for updates"[1](http://wiki.freepascal.org/Online_Package_Manager#Create_JSON_for_updates)" below)
129114 - create JSON for updates(optional), has the same functionality as "Create JSON for updates"[2](http://wiki.freepascal.org/Online_Package_Manager#Create_JSON_for_updates)" dialog. It was also added here to speed up the process.
130115
131-<figure>
132-<img src="OPM15.png" title="OPM15.png" />
133-<figcaption>OPM15.png</figcaption>
134-</figure>
116+![](/wiki-images/6/6c/OPM15.png)
135117
136118- check each package you wish to include, adjust package info if necessary(lazarus/fpc compatibility, supported widgetset, etc)
137119
138-<figure>
139-<img src="OPM16.png" title="OPM16.png" />
140-<figcaption>OPM16.png</figcaption>
141-</figure>
120+![](/wiki-images/6/6d/OPM16.png)
142121
143122- press the create button, if all goes well you should get a zip and a json file. Upload somewhere the files and send the link to opm@lazarus-ide.org or
144123- press the submit button, the files are directly uploaded to a remote server.
145124
146125Every package will be accepted after a short check(malware, license, etc). Multiple versions of the same package is also allowed.
147126
148127##### Create JSON for updates
149128
150129To allow the user to update the package directly form your webpage, follow this steps:
151130
152131- Make sure your package is already in the main repository(see previous section)
153132- You can download and use the [[OPM External Update json Editor|Online Package Manager External Update json Editor]]
154133 - or via OnlinePackageManager:
155134
156135- Check the package, press the "Create JSON for upates" menu item then create the JSON.
157136
158-<figure>
159-<img src="OPM11.png" title="OPM11.png" />
160-<figcaption>OPM11.png</figcaption>
161-</figure>
137+![](/wiki-images/d/d1/OPM11.png)
162138
163139- Edit the JSON, upload to your webpage, then send me the link.
164140
165141The JSON will look like this:
166142
167-<figure>
168-<img src="OPM12.png" title="OPM12.png" />
169-<figcaption>OPM12.png</figcaption>
170-</figure>
143+![](/wiki-images/0/09/OPM12.png)
171144
172145Editable items in the JSON:
173146
174147**"DownloadZipURL"** --\> Link to your new, updated package
175148
176149**"DisableInOPM"** --\> If you want to temporary disable your package, set this boolean to true. It's useful for maintenance, the package will be grayed out in the tree. The user cannot download/install/update the package.
177150
178151**"Version"/"ForceNotify"/"InternalVersion"** --\> To trigger an update message on the users computer, you can either:
179152
180153- Increase the **"Version"** number. Useful when you want to release a new version of the package.
181154- Set **"ForceNotify"** to true. Useful after a minor change in your source, that does not require a version change or in case of trunk version. To prevent continous error messages, **"ForceNotify"** must be used in combination with **"InternalVersion"**. After the user updates the package, OPM locally stores the **"InternalVersion"** value. If you want to trigger a new message, increase **"InternalVersion"** with one. If **"ForceNotify"** is true, **"Version"** is always ignored.
182155
183156The most common scenario is this:
184157
185158- Generate the JSON
186159- Modify **"DownloadZipURL"**
187160- Increase version number when necessary.
188161
189162Please note: After you edited the JSON the changes are not immediately visible in the tree. Usually it takes 1-2 min. It also depends on the users setting(Options--\>General--\>Check for package updates).
190163
191164#### Options
192165
193166To display the options dialog press the "Options" button.
194167
195168### Create a private repository
196169
197170In order to create a private repository please do the following:
198171
1991721\. First make sure profile "Package maintainer" is enabled in Options--\>Profiles, then open the private repository form(see screenshot below)
200173
201-<figure>
202-<img src="OPM17.png" title="OPM17.png" />
203-<figcaption>OPM17.png</figcaption>
204-</figure>
174+![](/wiki-images/b/b0/OPM17.png)
205175
2061762\. Press the "Create" button. Enter repository Name, Address(optional), Description(optional). Save the repository to an empty folder
207177
208-<figure>
209-<img src="OPM18.png" title="OPM18.png" />
210-<figcaption>OPM18.png</figcaption>
211-</figure>
178+![](/wiki-images/c/c7/OPM18.png)
212179
213180- If filled, the repository address(in this case <http://localhost/packages/>) is automatically added to available repository list(Options form)
214181
215-<figure>
216-<img src="OPM19.png" title="OPM19.png" />
217-<figcaption>OPM19.png</figcaption>
218-</figure>
182+![](/wiki-images/8/8e/OPM19.png)
219183
2201843\. Start to add/delete packages. You have two choices:
221185
222186a\. Create a new package via <http://wiki.freepascal.org/Online_Package_Manager#Create_repository_package>
223187
224188b\. Add a previously saved package
225189
226-<figure>
227-<img src="OPM20.png" title="OPM20.png" />
228-<figcaption>OPM20.png</figcaption>
229-</figure>
190+![](/wiki-images/5/5b/OPM20.png)
230191
2311924.You can also open a previously saved repository. The last repository is automatically opened on startup.
232193
2331945.Upload the files(packagelist.json, *.zip) to your local or remote server.
234195
2351966.Make sure the server is running, the change "Remote repository" in Options--\>General
236197
237198## see also
238199
239200- [OPM video about the install process](https://www.youtube.com/watch?v=IRJkyiOn3AA)
240201
241202---
242203*From the Free Pascal wiki, page "Online Package Manager", as it stood on 2020-04-28 after a change by GetMem, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history