Difference between revisions of "opmjsonupdateeditor"

From Free Pascal wiki
Jump to navigationJump to search
(Initial Page about JsonEditor)
m (Typos etc.)
Line 10: Line 10:
 
* To make and maintain package information for Online Package Manager easily, accurately and quickly.
 
* To make and maintain package information for Online Package Manager easily, accurately and quickly.
 
===Installation===
 
===Installation===
* There are a Windows Installer and a Zipfile of Linux executables (see Download below) available.
+
* There is a Windows Installer and a Zipfile of Linux executables (see Download below) available.
 
* Source code is also available to compile with Lazarus v1.62+ and FPC v3.00+ (best with Laz1.7+/fpc3.11+)
 
* Source code is also available to compile with Lazarus v1.62+ and FPC v3.00+ (best with Laz1.7+/fpc3.11+)
 
====Directory Structure====
 
====Directory Structure====
* PackageEditor is designed to be deployed in the same folder as your component.
+
* JsonEditor is designed to be deployed in the same folder as your component.
** If you maintain multiple components, a copy of Package Editor should be deployed in the main folder of each one.
+
** If you maintain multiple components, a copy of JsonEditor should be deployed in the main folder of each one.
** Each copy of PacakageEditor will maintain its own distinct cfg file in the GetAppConfigDir location.
+
** Each copy of JsonEditor will maintain its own distinct cfg file in the GetAppConfigDir location.
* When first started up, PackageEditor will make the subfolders:
+
* When first started up, JsonEditor will make the subfolders:
 
  - \updates
 
  - \updates
 
  - \locale
 
  - \locale
 
<br>
 
<br>
 
* Suggested structure for your component:
 
* Suggested structure for your component:
  - componentfolder
+
  - \componentfolder
  - componentfolder\stable_version
+
  - \componentfolder\stable_version
  - componentfolder\stable_version\updates
+
  - \componentfolder\stable_version\updates
  - componentfolder\stable_version\locale
+
  - \componentfolder\stable_version\locale
* jsoneditor is located in the \stable_version folder, and the update_json and update Zipfile is in the \updates folder
+
* \componentfolder - contains the working version of your component code
 +
* \componentfolder\stable_version - contains the published version, and also a copy of JsonEditor(.exe)
 +
* \componentfolder\stable_version\updates - contains the update json and update Zipfile
 +
* \componentfolder\stable_version\locale - contains the language files for JsonEditor
 
** This works very well in practise, especially if your project is under version control (svn, github etc)
 
** This works very well in practise, especially if your project is under version control (svn, github etc)
===Making a new OPM update json===
+
===Making a new OnlinePackageManager update json===
 
* Fire up JsonEditor and fill in all the fields for your package.
 
* Fire up JsonEditor and fill in all the fields for your package.
 
** It is essential that the package lpk name exactly matches the one already installed in OPM, otherwise you can choose whatever filenames you like.
 
** It is essential that the package lpk name exactly matches the one already installed in OPM, otherwise you can choose whatever filenames you like.
* The first time you use JsonPackager, a pop-up hint window will show you what each field is for.
+
* The first time you use JsonEditor, a pop-up hint window will show you what each field is for.
 
* When you click [Save], if any field needs amending a dialog will tell you what is wrong, and problem fields will highlight.
 
* When you click [Save], if any field needs amending a dialog will tell you what is wrong, and problem fields will highlight.
 
** Only a validated json will be saved to disk.
 
** Only a validated json will be saved to disk.
Line 38: Line 41:
 
* 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 JsonEditor)
 
* 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 JsonEditor)
 
** Each can have its own version number and other characteristics
 
** Each can have its own version number and other characteristics
* Finally, upload the Zipfile and json file to a place where OPM can find it.
+
* Finally, upload the Zipfile and json file to a place where OnlinePackageManager can find it.
===Maintaining a package with OPM===
+
===Maintaining a package with OnlinePackageManager===
 
* Make a new update Zipfile and put it into the \updates folder
 
* Make a new update Zipfile and put it into the \updates folder
 
* Fire up JsonEditor and click File/Load
 
* Fire up JsonEditor and click File/Load

Revision as of 09:50, 17 December 2016

Online Package Manager External Update json Editor

Screenshots

jp mainwindow.jpg

jp filemenu.jpg

jp helpmenu.jpg

Purpose

  • To make and maintain package information for Online Package Manager easily, accurately and quickly.

Installation

  • There is a Windows Installer and a Zipfile of Linux executables (see Download below) available.
  • Source code is also available to compile with Lazarus v1.62+ and FPC v3.00+ (best with Laz1.7+/fpc3.11+)

Directory Structure

  • JsonEditor is designed to be deployed in the same folder as your component.
    • If you maintain multiple components, a copy of JsonEditor should be deployed in the main folder of each one.
    • Each copy of JsonEditor will maintain its own distinct cfg file in the GetAppConfigDir location.
  • When first started up, JsonEditor will make the subfolders:
- \updates
- \locale


  • Suggested structure for your component:
- \componentfolder
- \componentfolder\stable_version
- \componentfolder\stable_version\updates
- \componentfolder\stable_version\locale
  • \componentfolder - contains the working version of your component code
  • \componentfolder\stable_version - contains the published version, and also a copy of JsonEditor(.exe)
  • \componentfolder\stable_version\updates - contains the update json and update Zipfile
  • \componentfolder\stable_version\locale - contains the language files for JsonEditor
    • This works very well in practise, especially if your project is under version control (svn, github etc)

Making a new OnlinePackageManager update json

  • Fire up JsonEditor and fill in all the fields for your package.
    • It is essential that the package lpk name exactly matches the one already installed in OPM, otherwise you can choose whatever filenames you like.
  • The first time you use JsonEditor, a pop-up hint window will show you what each field is for.
  • When you click [Save], if any field needs amending a dialog will tell you what is wrong, and problem fields will highlight.
    • Only a validated json will be saved to disk.
    • By default the json is named update_<zipfilename>.json and saved to the \updates folder
    • JsonEditor will also offer to copy the Zipfile to the \updates folder if it was in a different folder
    • JsonEditor will offer to Auto-Load the same component info when it is next opened.
  • 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 JsonEditor)
    • Each can have its own version number and other characteristics
  • Finally, upload the Zipfile and json file to a place where OnlinePackageManager can find it.

Maintaining a package with OnlinePackageManager

  • Make a new update Zipfile and put it into the \updates folder
  • Fire up JsonEditor and click File/Load
    • If Auto-Load was chosen, it will already have loaded the last-saved package info
  • Update the version info for your package(s) and click [Save]
    • If your update doesn't involve a new version number, just click the "Force Notify" checkbox, and increment the "Internal Version"
  • Finally, upload the Zipfile and json file to a place where OPM can find it.

Licence

  • JsonEditor is published under a general GPL license.

Download