Plugin:PackUpdater/en: Difference between revisions

From Miranda NG
Plugin:PackUpdater/en
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:




== How it works ==
== Usage ==
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.
You can find sample configuration files [http://trac.miranda-ng.org/browser/trunk/plugins/PackUpdater/Docs/Templates here].
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:
1. Import settings from <tt>Autoexec_PackUpdater.ini</tt> to profile. Add strings needed for plugin (e.g. descriptions of update components) to your <tt>langpack_*.txt</tt>.
* 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.


; Variables in <tt>Autoexec_PackUpdater.ini</tt>
* <tt>AutoUpdate</tt> – check updates automatically on Miranda startup. Can be configured in ''Events → Pack updates''.
* <tt>File_VersionURL</tt> – URL where file with information about versions for all files (<tt>file1.ini</tt>) is stored.
* <tt>FileCount</tt> – number of files to check updates for. Plugin supports checking for several files, but in most cases it is enough to check only pack setup file.
* <tt>File_x_</tt> where <tt>х</tt> is a serial number of file beginning with <tt>1</tt>
** <tt>CurrentVersion</tt> – set it to 1.0.0 (or any other you like) and don't change it any more.
** <tt>LastVersion</tt> – the same.


== Usage ==
2. Create file with information about versions (<tt>file1.ini</tt>), one for all files to check.
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>.


Variables in <tt>Autoexec_PackUpdater.ini</tt>:
;Options of <tt>file1.ini</tt>
* <tt>AutoUpdate</tt> – check updates automatically with Miranda startup. configured in Events->Pack updates
* Handle <tt>[FileInfo_х]</tt> where <tt>х</tt> is a serial number of file beginning with <tt>1</tt>. Must match the number in profile.
* <tt>File_VersionURL</tt> – URL where saved file with information about versions of all files (file1.ini)
* <tt>FileVersion</tt> – current version of file (i.e. version of file in new pack).
* <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>Message</tt> – description that user will see when plugin finds new version.
* <tt>[File_x_]</tt> where <tt>х</tt> is a serial number of file begining from <tt>1</tt>
* <tt>DownloadURL</tt> – URL of update file.
** <tt>CurrentVersion</tt> – sets 1.0.0 (or another what you wants) and don't change any more
** <tt>LastVersion</tt> – the same
 
: 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>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>InfoURL</tt> (optional) – sets the URL to be opened by click on ''See information'' button in update message box.
Line 39: Line 33:
* <tt>Force</tt> (optional) – to update non-existent files, i.e. add files which are not present in current Miranda installation.
* <tt>Force</tt> (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.
3. Upload file with information and updates on server.
 
 
== 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 (<tt>File_x_CurrentVersion</tt> from profile) with the "remote" one (<tt>FileVersion</tt>). If they differ, then:
* 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.


{{PluginGroups}}
{{PluginGroups}}

Revision as of 23:25, 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.


Usage

You can find sample configuration files here. 1. Import settings from Autoexec_PackUpdater.ini to profile. Add strings needed for plugin (e.g. descriptions of update components) to your langpack_*.txt.

Variables in Autoexec_PackUpdater.ini
  • AutoUpdate – check updates automatically on Miranda startup. Can be configured in Events → Pack updates.
  • File_VersionURL – URL where file with information about versions for all files (file1.ini) is stored.
  • FileCount – number of files to check updates for. Plugin supports checking for several files, but in most cases it is enough to check only pack setup file.
  • File_x_ where х is a serial number of file beginning with 1
    • CurrentVersion – set it to 1.0.0 (or any other you like) and don't change it 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 beginning with 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.


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, then:

  • 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.