Plugin:PackUpdater/en: Difference between revisions

From Miranda NG
Plugin:PackUpdater/en
Jump to navigation Jump to search
(PluginGroups added)
(from readme, 1st approach)
Line 1: Line 1:
{{PluginCard}}
{{PluginCard}}
Simple updater for Miranda NG premodified packs.
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 (<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.
* 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 ==
Import settings from Autoexec_PackUpdater.ini to profile and for server (file1.ini) are in Tamplates folder. Probably full langpack in this folder too.
 
1. Add in your langpack_*.txt strings needed for plugin.
 
Variables in Autoexec_PackUpdater.ini:
 
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)
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 21:51, 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 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

Import settings from Autoexec_PackUpdater.ini to profile and for server (file1.ini) are in Tamplates folder. Probably full langpack in this folder too.

1. Add in your langpack_*.txt strings needed for plugin.

Variables in Autoexec_PackUpdater.ini:

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)

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.