Pack updater

From Miranda NG
Plugin:PackUpdater/pl
Jump to navigation Jump to search
This page is a translated version of the page Pack updater and the translation is 43% complete.
Pack updater
Brak zdjęcia
Nazwa pliku PackUpdater.dll
Autorzy Mataes, ZERO_BiT
Pobierz
Wersja stabilna: 32-bit, 64-bit
Wersja rozwojowa: 32-bit, 64-bit

Prosty aktualizator dla paczek Mirandy NG. Wtyczka może być przydatna dla autorów paczek chcących zautomatyzować proces aktualizowania ich paczek.

Użycie

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.


Jak to działa

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.