mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-02 17:03:26 +00:00
build/windows: Set timeout for Restore Point creation
See: #13874 The process is managed by WMI so we need to prevent stuckness that can happen in rare scenarios.
This commit is contained in:
parent
1d5c3cbd43
commit
63d2e1f871
2 changed files with 2 additions and 2 deletions
|
@ -1173,7 +1173,7 @@ var
|
|||
ResultCode: Integer;
|
||||
begin
|
||||
StatusLabel(CustomMessage('CreatingRestorePoint'),'');
|
||||
if not ShellExec('RunAs', 'powershell', ExpandConstant('Checkpoint-Computer -Description "GIMP_{#CUSTOM_GIMP_VERSION}_install" -RestorePointType APPLICATION_INSTALL'),
|
||||
if not ShellExec('RunAs', 'powershell', '-Command "$job = Start-Job -ScriptBlock { Checkpoint-Computer -Description "GIMP_' + ExpandConstant('{#CUSTOM_GIMP_VERSION}') + '_install" -RestorePointType APPLICATION_INSTALL }; Wait-Job $job -Timeout 24; if ($job.State -eq \"Running\") { Stop-Job $job -Confirm:$false }; Receive-Job $job"',
|
||||
'', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
||||
begin
|
||||
DebugMsg('RestorePoint','Failed to create restore point. Error code: ' + IntToStr(ResultCode));
|
||||
|
|
|
@ -266,7 +266,7 @@ var
|
|||
ResultCode: Integer;
|
||||
begin
|
||||
UninstallProgressForm.StatusLabel.Caption := CustomMessage('CreatingRestorePoint');
|
||||
if not ShellExec('RunAs', 'powershell', ExpandConstant('Checkpoint-Computer -Description "GIMP_{#CUSTOM_GIMP_VERSION}_uninstall" -RestorePointType APPLICATION_UNINSTALL'),
|
||||
if not ShellExec('RunAs', 'powershell', '-Command "$job = Start-Job -ScriptBlock { Checkpoint-Computer -Description "GIMP_' + ExpandConstant('{#CUSTOM_GIMP_VERSION}') + '_uninstall" -RestorePointType APPLICATION_UNINSTALL }; Wait-Job $job -Timeout 24; if ($job.State -eq \"Running\") { Stop-Job $job -Confirm:$false }; Receive-Job $job"',
|
||||
'', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
||||
begin
|
||||
DebugMsg('RestorePointU','Failed to create restore point. Error code: ' + IntToStr(ResultCode));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue