Disabling auto-update service and helper (#1342)

This commit is contained in:
Salah Benmoussati 2022-02-08 13:18:34 +01:00 committed by GitHub
parent 2c3a7c21d5
commit 52ca40cec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 63 additions and 62 deletions

View File

@ -29,30 +29,32 @@ class Script
var userDataPathArgument = "--userDataPath=\"[USER_DATA_PATH]\"";
File updateService = new File(@"..\..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\auto-update\auto_update_service.exe");
updateService.ServiceInstaller = new ServiceInstaller
{
Name = "auto_update_service",
DisplayName = "SDA Auto Update Service",
Description = "Symphony Desktop Application Auto Update Service",
FirstFailureActionType = FailureActionType.restart,
SecondFailureActionType = FailureActionType.restart,
ThirdFailureActionType = FailureActionType.restart,
RestartServiceDelayInSeconds = 60,
ResetPeriodInDays = 1,
ServiceSid = ServiceSid.none,
ConfigureServiceTrigger = ConfigureServiceTrigger.Install,
Type = SvcType.ownProcess,
Vital = true,
ErrorControl = SvcErrorControl.normal,
Start = SvcStartType.auto,
EraseDescription = false,
Interactive = false,
StartOn = SvcEvent.Install,
StopOn = SvcEvent.InstallUninstall_Wait,
RemoveOn = SvcEvent.Uninstall_Wait,
};
//Disabling auto-update service
// File updateService = new File(@"..\..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\auto-update\auto_update_service.exe");
// updateService.ServiceInstaller = new ServiceInstaller
// {
// Name = "auto_update_service",
// DisplayName = "SDA Auto Update Service",
// Description = "Symphony Desktop Application Auto Update Service",
// FirstFailureActionType = FailureActionType.restart,
// SecondFailureActionType = FailureActionType.restart,
// ThirdFailureActionType = FailureActionType.restart,
// RestartServiceDelayInSeconds = 60,
// ResetPeriodInDays = 1,
// ServiceSid = ServiceSid.none,
// ConfigureServiceTrigger = ConfigureServiceTrigger.Install,
// Type = SvcType.ownProcess,
// Vital = true,
// ErrorControl = SvcErrorControl.normal,
// Start = SvcStartType.auto,
// EraseDescription = false,
// Interactive = false,
// StartOn = SvcEvent.Install,
// StopOn = SvcEvent.InstallUninstall_Wait,
// RemoveOn = SvcEvent.Uninstall_Wait,
// };
// Create a wixsharp project instance and assign the project name to it, and a hierarchy of all files to include
// Files are taken from multiple locations, and not all files in each location should be included, which is why
// the file list is rather long and explicit. At some point we might make the `dist` folder match exactly the
@ -72,8 +74,8 @@ class Script
Arguments = userDataPathArgument
}
),
updateService,
new File(@"..\..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\auto-update\auto_update_helper.exe"),
// updateService,
// new File(@"..\..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\auto-update\auto_update_helper.exe"),
new File(@"..\..\..\dist\win-unpacked\chrome_100_percent.pak"),
new File(@"..\..\..\dist\win-unpacked\chrome_200_percent.pak"),
new File(@"..\..\..\dist\win-unpacked\d3dcompiler_47.dll"),

View File

@ -124,17 +124,17 @@ IF %errorlevel% neq 0 (
exit /b -1
)
call %SIGNING_FILE_PATH% ..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\auto-update\auto_update_service.exe
IF %errorlevel% neq 0 (
echo "Signing failed"
exit /b -1
)
@REM call %SIGNING_FILE_PATH% ..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\auto-update\auto_update_service.exe
@REM IF %errorlevel% neq 0 (
@REM echo "Signing failed"
@REM exit /b -1
@REM )
call %SIGNING_FILE_PATH% ..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\auto-update\auto_update_helper.exe
IF %errorlevel% neq 0 (
echo "Signing failed"
exit /b -1
)
@REM call %SIGNING_FILE_PATH% ..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\auto-update\auto_update_helper.exe
@REM IF %errorlevel% neq 0 (
@REM echo "Signing failed"
@REM exit /b -1
@REM )
call %SIGNING_FILE_PATH% ..\..\dist\win-unpacked\Symphony.exe
IF %errorlevel% neq 0 (

View File

@ -17,7 +17,6 @@ import { logger } from '../common/logger';
import { activityDetection } from './activity-detection';
import { analytics } from './analytics-handler';
import appStateHandler from './app-state-handler';
import { autoUpdate } from './auto-update-handler';
import { getCitrixMediaRedirectionStatus } from './citrix-handler';
import { CloudConfigDataTypes, config, ICloudConfig } from './config-handler';
import { downloadHandler } from './download-handler';
@ -326,9 +325,9 @@ ipcMain.on(
}
}
break;
case apiCmds.autoUpdate:
autoUpdate.update(arg.filename);
break;
// case apiCmds.autoUpdate:
// autoUpdate.update(arg.filename);
// break;
case apiCmds.aboutAppClipBoardData:
if (arg.clipboard && arg.clipboardType) {
clipboard.write(

View File

@ -47,7 +47,7 @@ export enum apiCmds {
showNotification = 'show-notification',
closeAllWrapperWindows = 'close-all-windows',
setZoomLevel = 'set-zoom-level',
autoUpdate = 'auto-update',
// autoUpdate = 'auto-update',
aboutAppClipBoardData = 'about-app-clip-board-data',
closeMainWindow = 'close-main-window',
minimizeMainWindow = 'minimize-main-window',

View File

@ -271,11 +271,11 @@
</table>
<input type="button" id="restart-app" value="Restart App" />
<hr />
<!-- <hr />
<h1>Auto-update Test</h1>
Full path to MSI <input type="text" id="update-file" />
<br />
<button id="run-update">Update</button>
<button id="run-update">Update</button> -->
<hr />
<p>Native Window Handle:</p>
@ -334,7 +334,7 @@
getCPUUsage: 'get-cpu-usage',
checkMediaPermission: 'check-media-permission',
restartApp: 'restart-app',
autoUpdate: 'auto-update',
// autoUpdate: 'auto-update',
getNativeWindowHandle: 'get-native-window-handle',
getCitrixMediaRedirectionStatus: 'get-citrix-media-redirection-status',
};
@ -502,16 +502,16 @@
}
});
const runUpdateButton = document.getElementById('run-update');
runUpdateButton.addEventListener('click', () => {
const filename = document.getElementById('update-file').value;
if (window.ssf) {
const autoUpdate = new window.ssf.AutoUpdate();
autoUpdate.update(filename);
} else {
postMessage(apiCmds.autoUpdate, { filename: filename });
}
});
// const runUpdateButton = document.getElementById('run-update');
// runUpdateButton.addEventListener('click', () => {
// const filename = document.getElementById('update-file').value;
// if (window.ssf) {
// const autoUpdate = new window.ssf.AutoUpdate();
// autoUpdate.update(filename);
// } else {
// postMessage(apiCmds.autoUpdate, { filename: filename });
// }
// });
let win;

View File

@ -244,9 +244,9 @@ export class AppBridge {
response: mediaPermission,
});
break;
case apiCmds.autoUpdate:
ssf.autoUpdate(data.filename);
break;
// case apiCmds.autoUpdate:
// ssf.autoUpdate(data.filename);
// break;
}
}

View File

@ -441,12 +441,12 @@ export class SSFApi {
/**
* Auto update
*/
public autoUpdate(filename: string): void {
local.ipcRenderer.send(apiName.symphonyApi, {
cmd: apiCmds.autoUpdate,
filename,
});
}
// public autoUpdate(filename: string): void {
// local.ipcRenderer.send(apiName.symphonyApi, {
// cmd: apiCmds.autoUpdate,
// filename,
// });
// }
/**
* Sets the count on the tray icon to the given number.