2020-04-21 15:30:12 +08:00
|
|
|
#pragma once
|
|
|
|
|
2021-06-14 17:55:59 +08:00
|
|
|
#include <common/updating/updating.h>
|
2020-04-21 15:30:12 +08:00
|
|
|
|
2021-06-14 17:55:59 +08:00
|
|
|
void PeriodicUpdateWorker();
|
|
|
|
void CheckForUpdatesCallback();
|
2020-04-21 15:30:12 +08:00
|
|
|
|
2021-05-21 18:32:34 +08:00
|
|
|
namespace cmdArg
|
|
|
|
{
|
|
|
|
// Starts first stage of the PowerToys auto-update process, which involves copying action runner to a temp path and
|
|
|
|
// restarting it from there, so it doesn't interfere with the installation process.
|
|
|
|
const inline wchar_t* UPDATE_NOW_LAUNCH_STAGE1 = L"-update_now";
|
|
|
|
// Stage 2 consists of starting the installer and optionally launching newly installed PowerToys binary.
|
|
|
|
// That's indicated by the following 2 flags.
|
|
|
|
const inline wchar_t* UPDATE_NOW_LAUNCH_STAGE2 = L"-update_now_stage_2";
|
|
|
|
const inline wchar_t* UPDATE_STAGE2_RESTART_PT = L"restart";
|
|
|
|
const inline wchar_t* UPDATE_STAGE2_DONT_START_PT = L"dont_start";
|
2020-04-21 15:30:12 +08:00
|
|
|
|
2021-05-21 18:32:34 +08:00
|
|
|
const inline wchar_t* UPDATE_REPORT_SUCCESS = L"-report_update_success";
|
|
|
|
}
|
2021-06-14 17:55:59 +08:00
|
|
|
|
|
|
|
SHELLEXECUTEINFOW LaunchPowerToysUpdate(const wchar_t* cmdline);
|