Plugin:PackUpdater/en: Difference between revisions

From Miranda NG
Plugin:PackUpdater/en
Jump to navigation Jump to search
(from readme, 1st approach)
No edit summary
Line 6: Line 6:
Plugin has two modes: silent and normal. Silent mode is used to check for updates on startup, normal mode is used when menu item is clicked.
Plugin has two modes: silent and normal. Silent mode is used to check for updates on startup, normal mode is used when menu item is clicked.
First, plugin downloads the version information file and compares the "local" version (<tt>File_x_CurrentVersion</tt> from profile) with the "remote" one (<tt>FileVersion</tt>). If they differ, than:
First, plugin downloads the version information file and compares the "local" version (<tt>File_x_CurrentVersion</tt> from profile) with the "remote" one (<tt>FileVersion</tt>). If they differ, than:
* a) in silent mode plugin checks the value <tt>LastVersion</tt> and if it differs from <tt>FileVersion</tt>, shows the message about the update. If not, there are no messages.
* a) in silent mode plugin checks the value of <tt>LastVersion</tt> and if it differs from <tt>FileVersion</tt>, shows the message about the update. If not, there are no messages.
* b) in normal mode plugin displays a message in any case. If a user downloaded an update but decided not to install it, the update is still considered to be installed.
* b) in normal mode plugin displays a message in any case. If a user downloaded an update but decided not to install it, the update is still considered to be installed.




== Usage ==
== Usage ==
Import settings from Autoexec_PackUpdater.ini to profile and for server (file1.ini) are in Tamplates folder. Probably full langpack in this folder too.
You can find sample configuration files [http://trac.miranda-ng.org/browser/trunk/plugins/PackUpdater/Docs/Tamplates here].
: 1. Import settings from <tt>Autoexec_PackUpdater.ini</tt> to profile. The <tt>file1.ini</tt> is for your updates server. Add strings needed for plugin (e.g. update components descriptions) to your <tt>langpack_*.txt</tt>.


1. Add in your langpack_*.txt strings needed for plugin.
Variables in <tt>Autoexec_PackUpdater.ini</tt>:
* <tt>AutoUpdate</tt> – check updates automatically with Miranda startup. configured in Events->Pack updates
* <tt>File_VersionURL</tt> – URL where saved file with information about versions of all files (file1.ini)
* <tt>FileCount</tt> – number of files to check updates for. Plugin supports checking for several files, but most time is only one (Pack setup file)
* <tt>[File_x_]</tt> where <tt>х</tt> is a serial number of file begining from <tt>1</tt>
** <tt>CurrentVersion</tt> – sets 1.0.0 (or another what you wants) and don't change any more
** <tt>LastVersion</tt> – the same


Variables in Autoexec_PackUpdater.ini:
: 2. Create file with information about versions (<tt>file1.ini</tt>). One for all files to check.
Options of <tt>file1.ini</tt>:
* Handle <tt>[FileInfo_х]</tt> where <tt>х</tt> is a serial number of file begining from <tt>1</tt> (must match the number in profile)
* <tt>FileVersion</tt> – current version of file (i.e. version of file in new pack)
* <tt>Message</tt> – description that user will see when plugin finds new version
* <tt>DownloadURL</tt> – URL of Update file
* <tt>DiskFileName</tt> – name of file saved on user's PC.
* <tt>InfoURL</tt> (optional) – sets the URL to be opened by click on ''See information'' button in update message box.
* <tt>Descr</tt> – description to show in update list.
* <tt>FileType</tt> – type of file. Defines final destination of file:
** 1 – pack
** 2 – plugin (will be installed into <tt>Plugins</tt> folder
** 3 – icon set (will be installed into <tt>Icons</tt> folder)
** 4 – files in Miranda root folder
* <tt>AdvFolder</tt> (optional) – sets subfolder in the folder defined by <tt>FileType</tt>.
* <tt>Force</tt> (optional) – to update non-existent files, i.e. add files which are not present in current Miranda installation.


FileCount - number of files for witch needs to check updates. Plugin supports checking for several files, but most time is only one (Pack setup file)
: 3. Upload file with information and updates on server.
AutoUpdate - Check updates automatically with Miranda startup. configured in Events->Pack updates
 
File_VersionURL - URL where saved file with infirmation about versions of all files (file1.ini)
 
[File_x_] (where x - serial number file, begining from 1)
CurrentVersion - sets 1.0.0 (or another what you wants) and don't change any more
LastVersion - the same
 
 
3. Create file with infirmation about versions (file1.ini). One for all checked files
 
 
Options of file1.ini:
 
Handle [FileInfo_х], where х - serial number file, begining from 1 (must be equal with number in profile)
 
 
FileVersion - Current file version (Version of new pack file)
 
Message - Description that user see when plugin found new version
 
DownloadURL - URL of Update file
 
DiskFileName - Name of file saved on user computer.
 
FileType - type of file. Defines final destination of file. (1 - pack, 2 - plugin (will be installed into Plugins), 3 - icon (will be installed into Icons), 4 - files in miranda root (e.g. langpack, dbtool))
 
Descr - description witch shows in update list.
 
InfoURL - Optional. If it writed, message box that user see have button "See information", click on it open this URL.
 
AdvFolder - Optional. If it writed, set subfolder in folder defined FileType.
 
Force - Optional. If it writed, the file will be offered for renewal, even if you do not installed.
 
4. Download file with infirmation and updates on server.


{{PluginGroups}}
{{PluginGroups}}

Revision as of 22:57, 9 August 2015

Pack updater
No image
Filename PackUpdater.dll
Authors Mataes, ZERO_BiT
Download links
Stable version: 32-bit, 64-bit
Development version: 32-bit, 64-bit

Simple updater for Miranda NG premodified packs. Plugin may be interesting for pack authors who want to automate the process of updating of their packs.


How it works

Plugin has two modes: silent and normal. Silent mode is used to check for updates on startup, normal mode is used when menu item is clicked. First, plugin downloads the version information file and compares the "local" version (File_x_CurrentVersion from profile) with the "remote" one (FileVersion). If they differ, than:

  • a) in silent mode plugin checks the value of LastVersion and if it differs from FileVersion, shows the message about the update. If not, there are no messages.
  • b) in normal mode plugin displays a message in any case. If a user downloaded an update but decided not to install it, the update is still considered to be installed.


Usage

You can find sample configuration files here.

1. Import settings from Autoexec_PackUpdater.ini to profile. The file1.ini is for your updates server. Add strings needed for plugin (e.g. update components descriptions) to your langpack_*.txt.

Variables in Autoexec_PackUpdater.ini:

  • AutoUpdate – check updates automatically with Miranda startup. configured in Events->Pack updates
  • File_VersionURL – URL where saved file with information about versions of all files (file1.ini)
  • FileCount – number of files to check updates for. Plugin supports checking for several files, but most time is only one (Pack setup file)
  • [File_x_] where х is a serial number of file begining from 1
    • CurrentVersion – sets 1.0.0 (or another what you wants) and don't change any more
    • LastVersion – the same
2. Create file with information about versions (file1.ini). One for all files to check.

Options of file1.ini:

  • Handle [FileInfo_х] where х is a serial number of file begining from 1 (must match the number in profile)
  • FileVersion – current version of file (i.e. version of file in new pack)
  • Message – description that user will see when plugin finds new version
  • DownloadURL – URL of Update file
  • DiskFileName – name of file saved on user's PC.
  • InfoURL (optional) – sets the URL to be opened by click on See information button in update message box.
  • Descr – description to show in update list.
  • FileType – type of file. Defines final destination of file:
    • 1 – pack
    • 2 – plugin (will be installed into Plugins folder
    • 3 – icon set (will be installed into Icons folder)
    • 4 – files in Miranda root folder
  • AdvFolder (optional) – sets subfolder in the folder defined by FileType.
  • Force (optional) – to update non-existent files, i.e. add files which are not present in current Miranda installation.
3. Upload file with information and updates on server.