Plugin:PackUpdater/ru: Difference between revisions

From Miranda NG
Plugin:PackUpdater/ru
Jump to navigation Jump to search
No edit summary
(Updating to match new version of source page)
Line 1: Line 1:
{{PluginCard}}
<languages/>{{PluginCard}}
Простой плагин для обновлений сборок Miranda NG. Плагин рассчитан, в первую очередь, на создателей сборок, которые хотят автоматизировать процесс обновления своих сборок.
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 [https://github.com/miranda-ng/miranda-ng/tree/master/plugins/PackUpdater/Docs/Templates here].
Шаблоны всех файлов лежат в папке [https://github.com/miranda-ng/miranda-ng/tree/master/plugins/PackUpdater/Docs/Templates Templates].


# Импортируйте настройки из <tt>Autoexec_PackUpdater.ini</tt> в профиль и добавьте в {{GlossLink|Языковой пакет|лангпак}} блок с переводом (например, описания компонентов обновления).
# 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>.
#; Опции <tt>Autoexec_PackUpdater.ini</tt>
#; Variables in <tt>Autoexec_PackUpdater.ini</tt>
#* <tt>AutoUpdate</tt> — проверять обновления при запуске Миранды. Настраивается в опциях, в разделе {{Menu|События|Обновление сборки}}.
#* <tt>AutoUpdate</tt> – check updates automatically on Miranda startup. Can be configured in {{Menu|Events|Pack updates}}.
#* <tt>File_VersionURL</tt> URL, по которому лежит файл <tt>File1.ini</tt> с информацией о версиях для всех файлов.
#* <tt>File_VersionURL</tt> URL where file with information about versions for all files (<tt>File1.ini</tt>) is stored.
#* <tt>FileCount</tt> — количество файлов, для которых нужно проверять обновления. Плагин поддерживает проверку нескольких файлов, однако чаще всего бывает достаточно одного (установщика сборки).
#* <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_CurrentVersion</tt> и <tt>File_x_LastVersion</tt>, где
#* <tt>File_x_CurrentVersion</tt> and <tt>File_x_LastVersion</tt> where
#** <tt>x</tt> — порядковый номер файла, начиная с <tt>1</tt>
#** <tt>x</tt> is a serial number of file beginning with <tt>1</tt>
#** <tt>CurrentVersion</tt> — выставьте 1.0.0 (или любое другое значение) и больше не меняйте
#** <tt>CurrentVersion</tt> – set it to 1.0.0 (or any other you like) and don't change it any more
#** <tt>LastVersion</tt> — то же самое.
#** <tt>LastVersion</tt> – the same.
# Создайте файл с информацией о версиях (<tt>File1.ini</tt>), один для всех проверяемых файлов.
# Create file with information about versions (<tt>File1.ini</tt>), one for all files to check.
#; Опции <tt>File1.ini</tt>
#; Options of <tt>File1.ini</tt>
#* Заголовок <tt>[FileInfo_х]</tt>, где <tt>х</tt> — номер файла, начиная с <tt>1</tt>. Должен совпадать с номером, импортированным в профиль.
#* 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>FileVersion</tt> — текущая версия файла (т. е. та, на которую обновляемся).
#* <tt>FileVersion</tt> – current version of file (i.e. version of file in new pack).
#* <tt>Message</tt> — сообщение, которое выводит плагин при нахождении этого обновления.
#* <tt>Message</tt> – the message that user will see when plugin finds new version.
#* <tt>DownloadURL</tt> URL, по которому лежит файл обновления (установщик сборки).
#* <tt>DownloadURL</tt> URL of update file (pack setup).
#* <tt>DiskFileName</tt> — имя файла на диске.
#* <tt>DiskFileName</tt> – name of file saved on user's PC.
#* <tt>FileType</tt> — тип файла. Определяет конечное его расположение:
#* <tt>FileType</tt> – type of file. Defines final destination of file:
#** 1 — сборка
#** 1 – pack
#** 2 — плагин (будет установлен в папку <tt>Plugins</tt>)
#** 2 – plugin (will be installed into <tt>Plugins</tt> folder)
#** 3 — набор значков (будет установлен в папку <tt>Icons</tt>)
#** 3 – icon set (will be installed into <tt>Icons</tt> folder)
#** 4 — файлы в корне Миранды
#** 4 – files in Miranda root folder
#* <tt>Descr</tt> — описание, которое будет выводиться в окне обновления.
#* <tt>Descr</tt> – description to show in update list.
#* <tt>InfoURL</tt> (опционально) — в окошке уведомления появляется кнопка {{Button|Смотреть инфо}}, при нажатии на которую в новом окне откроется указанная страница.
#* <tt>InfoURL</tt> (optional) – sets the URL to be opened by click on ''See information'' button in update message box.
#* <tt>AdvFolder</tt> (опционально) — задает подпапку в папке, определяемой типом файла <tt>FileType</tt>.
#* <tt>AdvFolder</tt> (optional) – sets subfolder in the folder defined by <tt>FileType</tt>.
#* <tt>Force</tt> (опционально) — файл будет предложен для обновления, даже если он отсутствует.
#* <tt>Force</tt> (optional) – to update a non-existent file, i.e. add file which is not present in current Miranda installation.
# Загрузите обновления и файл с информацией о версиях на сервер.
# Upload your updates and file with information on server.




== Как это работает ==
== How it works ==
У плагина есть два режима работы: тихий и обычный. Тихий используется при проверке обновлений при запуске, обычный — при выборе пункта меню.


Сначала плагин скачивает файл с информацией о версиях и сравнивает «локальную» версию (<tt>File_x_CurrentVersion</tt> from profile) с «удалённой» (<tt>FileVersion</tt>). Если они отличаются, то:
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.
* a) в тихом режиме плагин проверяет значение <tt>LastVersion</tt> и, если оно отличается от <tt>FileVersion</tt>, выдаёт сообщение об обновлении, если нет — сообщений об отсутствии обновлений не будет.
 
* b) в обычном режиме плагин выдаёт сообщение в любом случае. Если пользователь скачал обновление, но решил сразу его не устанавливать, обновление всё равно считается установленным.
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:
* 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.
* 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.


{{PluginGroups}}
{{PluginGroups}}

Revision as of 14:08, 31 December 2017

Other languages:
Pack updater
Нет изображения
Имя файла PackUpdater.dll
Авторы Mataes, ZERO_BiT
Скачать
Стабильная версия: 32-bit, 64-bit
Версия в разработке: 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_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.