Pack updater

From Miranda NG
Jump to navigation Jump to search
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.


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_CurrentVersion and File_x_LastVersion where
      • x 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 – the message that user will see when plugin finds new version.
    • DownloadURL – URL of update file (pack setup).
    • DiskFileName – name of file saved on user's PC.
    • 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
    • Descr – description to show in update list.
    • InfoURL (optional) – sets the URL to be opened by click on See information button in update message box.
    • AdvFolder (optional) – sets subfolder in the folder defined by FileType.
    • Force (optional) – to update a non-existent file, i.e. add file which is not present in current Miranda installation.
  3. Upload your updates and file with information 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:

  • 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.
  • in normal mode plugin shows the message in any case. If a user downloaded an update but decided not to install it, the update is still considered to be installed.