OPM External Update json Editor: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: OPM External Update json Editor
| Old | New | Line | |
|---|---|---|---|
| 1 | + | ## Information and Downloads | |
| 2 | + | ||
| 3 | + | ### Screenshots | |
| 4 | + | ||
| 5 | + | <figure> | |
| 6 | + | <img src="jp_mainwindow.jpg" title="jp_mainwindow.jpg" /> | |
| 7 | + | <figcaption>jp_mainwindow.jpg</figcaption> | |
| 8 | + | </figure> | |
| 9 | + | ||
| 10 | + | <figure> | |
| 11 | + | <img src="jp_filemenu.jpg" title="jp_filemenu.jpg" /> | |
| 12 | + | <figcaption>jp_filemenu.jpg</figcaption> | |
| 13 | + | </figure> | |
| 14 | + | ||
| 15 | + | <figure> | |
| 16 | + | <img src="jp_helpmenu.jpg" title="jp_helpmenu.jpg" /> | |
| 17 | + | <figcaption>jp_helpmenu.jpg</figcaption> | |
| 18 | + | </figure> | |
| 19 | + | ||
| 20 | + | ------------------------------------------------------------------------ | |
| 21 | + | ||
| 22 | + | ### Purpose | |
| 23 | + | ||
| 24 | + | - To make and maintain package update information for [[Online Package Manager]] easily, accurately and quickly. | |
| 25 | + | ||
| 26 | + | ### Installation | |
| 27 | + | ||
| 28 | + | - There is a Windows Installer and a Zipfile of Linux executables (see #Download below) available. | |
| 29 | + | - Source code is also available to compile with Lazarus v1.62+ and FPC v3.00+ (best with Laz1.7+/fpc3.11+) | |
| 30 | + | ||
| 31 | + | #### Directory Structure | |
| 32 | + | ||
| 33 | + | - OPM External Update json Editor is designed to be deployed in the same folder as your component. | |
| 34 | + | - If you maintain multiple components in separate folders, a copy of OPM External Update json Editor should be deployed in the main folder of each one. | |
| 35 | + | - Each copy of OPM External Update json Editor will maintain its own distinct cfg file in the GetAppConfigDir location. | |
| 36 | + | - When first started up, OPM External Update json Editor will make the subfolders: | |
| 37 | + | ||
| 38 | + | `- \updates`\ | |
| 39 | + | `- \locale` | |
| 40 | + | ||
| 41 | + | \ | |
| 42 | + | * Suggested structure for your component: | |
| 43 | + | ||
| 44 | + | `- \componentfolder`\ | |
| 45 | + | `- \componentfolder\stable_version`\ | |
| 46 | + | `- \componentfolder\stable_version\updates`\ | |
| 47 | + | `- \componentfolder\stable_version\locale` | |
| 48 | + | ||
| 49 | + | - \componentfolder - contains the working version of your component code (development source, libs, backups, resources, executables and so on) | |
| 50 | + | - \componentfolder\stable_version - contains the published version (stable source code only), and also a copy of JsonEditor(.exe) | |
| 51 | + | - \componentfolder\stable_version\updates - contains the update json and update Zipfile | |
| 52 | + | - \componentfolder\stable_version\locale - contains the language files for OPM External Update json Editor | |
| 53 | + | - This works very well in practise, especially if your project is under version control (svn, github etc) | |
| 54 | + | ||
| 55 | + | ### Making a new OnlinePackageManager update json | |
| 56 | + | ||
| 57 | + | - Fire up OPM External Update json Editor (jsoneditor\[.exe\]) and fill in all the fields for your package. | |
| 58 | + | - If you use the ellipsis button \[...\] to locate your Zipfile, OPM External Update json Editor will offer to copy the Zipfile to the \updates folder if it was in a different folder | |
| 59 | + | - **It is essential that the package lpk name exactly matches the one already installed in [[Online Package Manager]]**, otherwise you can choose whatever filenames you like. | |
| 60 | + | - The first time you use OPM External Update json Editor, a pop-up hint window will show you what each field is for. | |
| 61 | + | - When you click \[Save\], if any field needs amending a dialog will tell you what is wrong, and problem fields will highlight. | |
| 62 | + | - Only a validated json will be saved to disk. | |
| 63 | + | - By default the json is named update_\<zipfilename\>.json and saved to the \updates folder | |
| 64 | + | - OPM External Update json Editor will offer to Auto-Load the same component info when it is next opened. | |
| 65 | + | - If you have a multiple components entry in OPM (e.g. Designtime and Runtime), you can make an update_json file for them all (Click \[Add\] in OPM External Update json Editor) | |
| 66 | + | - Each can have its own version number and other characteristics | |
| 67 | + | - Finally, upload the Zipfile and json file to a place where [[Online Package Manager]] can find it. | |
| 68 | + | - Please note: After you uploaded the JSON the changes are not immediately visible in the tree. Usually it takes 1-2 min. or less. | |
| 69 | + | ||
| 70 | + | ### Maintaining a package with OnlinePackageManager and OPM External Update json Editor | |
| 71 | + | ||
| 72 | + | - Make a new update Zipfile and put it into the \updates folder | |
| 73 | + | - Pay attention to embedded paths in the zip | |
| 74 | + | - You can include example/demo source code in the Zip | |
| 75 | + | - Be sure to prune out anything not needed, like /backup /lib folders and executables etc. | |
| 76 | + | - Fire up JsonEditor and click File/Load | |
| 77 | + | - If Auto-Load was chosen, it will already have loaded the last-saved package info | |
| 78 | + | - Update the version info for your package(s) thus: | |
| 79 | + | ||
| 80 | + | **"DownloadZipURL"** --\> Link to your new, updated package | |
| 81 | + | ||
| 82 | + | **"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. | |
| 83 | + | ||
| 84 | + | **"Version"/"ForceNotify"/"InternalVersion"** --\> To trigger an update message on the users computer, you can either: | |
| 85 | + | ||
| 86 | + | - Increase the **"Version"** number. Useful when you want to release a new version of the package. | |
| 87 | + | - 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. | |
| 88 | + | ||
| 89 | + | The most common scenario is this: | |
| 90 | + | ||
| 91 | + | - Modify **"DownloadZipURL"** | |
| 92 | + | - Increase version number when necessary. | |
| 93 | + | ||
| 94 | + | - Click \[Save\] in OPM External Update json Editor | |
| 95 | + | - Finally, upload the Zipfile and json file to a place where OPM can find it. | |
| 96 | + | - Please note: After you uploaded the JSON the changes are not immediately visible in the tree. Usually it takes 1-2 min. or less. | |
| 97 | + | ||
| 98 | + | ### Licence | |
| 99 | + | ||
| 100 | + | - OPM External Update json Editor is published under a general GPL license. | |
| 101 | + | ||
| 102 | + | ### Languages | |
| 103 | + | ||
| 104 | + | - OPM External Update json Editor is available in English or Español. Help/Languages | |
| 105 | + | ||
| 106 | + | ## Download | |
| 107 | + | ||
| 108 | + | - Windows installer: <https://sourceforge.net/projects/lazautoupdate/files/otherpackages/setup_jsoneditor.exe> | |
| 109 | + | - Linux Zipfile: <https://sourceforge.net/projects/lazautoupdate/files/otherpackages/linux_jsonpackager.zip> | |
| 110 | + | - Source code: <https://svn.code.sf.net/p/lazarus-ccr/svn/applications/json_packager/> | |
| 111 | + | ||
| 112 | + | ------------------------------------------------------------------------ | |
| 113 | + | ||
| 114 | + | ### Links | |
| 115 | + | ||
| 116 | + | [[Online Package Manager]] | |
| 117 | + | ||
| 118 | + | Minesadorada | |
| 119 | + | ||
| 120 | + | --- | |
| 121 | + | *From the Free Pascal wiki, page "OPM External Update json Editor", as it stood on 2017-10-20 after a change by Mai, 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).* | |
| 122 | + | Category: Applications created with Lazarus | |
| 123 | + | Category: Components | |
| 124 | + | Category: Help | |
| 125 | + | Category: Install | |
| 126 | + | Category: Online Package Manager | |
| 127 | + | Category: Packages | |
| 128 | + | Category: Utilities |
