1
0
forked from BRT/arc
arc/services/update/ApplyUpdate.h

15 lines
1.0 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
// Режим установки обновления. Запускается из свежераспакованной копии ARC.exe
// (в ней есть все Qt-DLL), ДО создания QApplication в main(). Ждёт выхода
// родительского процесса, копирует новые файлы поверх install-папки (сохраняя
// database/), перезапускает установленный ARC.exe и самоудаляет временную папку.
// true, если среди аргументов есть "--apply-update". Дёшево, без Qt — можно
// звать в самом начале main() до QApplication.
bool isApplyUpdateMode(int argc, char **argv);
// Выполняет установку. Создаёт собственный headless QCoreApplication. Возвращает
// код возврата процесса (0 — успех). На не-Windows — no-op, возвращает 0.
int runApplyUpdate(int argc, char **argv);