mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-3257 Added symphony icons to auto update exe's, added auto update files to installer
This commit is contained in:
parent
c4db3a19e9
commit
4293b1e28e
34
auto_update/auto_update_helper.rc
Normal file
34
auto_update/auto_update_helper.rc
Normal file
@ -0,0 +1,34 @@
|
||||
#define IDR_ICON 101
|
||||
IDR_ICON ICON "icon.ico"
|
||||
|
||||
#define VER_MAJOR 1
|
||||
#define VER_MINOR 0
|
||||
#define VER_REVISION 0
|
||||
|
||||
|
||||
|
||||
#define INNER_TO_STR(x) #x
|
||||
#define TO_STR(x) INNER_TO_STR(x)
|
||||
#define VER_STRING TO_STR(VER_MAJOR) "." TO_STR(VER_MINOR) "." TO_STR(VER_REVISION) ".0"
|
||||
|
||||
#define VS_VERSION_INFO 0x1L
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_MAJOR,VER_MINOR,VER_REVISION
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "Symphony Auto Update Helper"
|
||||
VALUE "ProductName", "Symphony Auto Update Helper"
|
||||
VALUE "ProductVersion", VER_STRING
|
||||
VALUE "LegalCopyright", "Copyright 2021 Symphony OSS"
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
34
auto_update/auto_update_service.rc
Normal file
34
auto_update/auto_update_service.rc
Normal file
@ -0,0 +1,34 @@
|
||||
#define IDR_ICON 101
|
||||
IDR_ICON ICON "icon.ico"
|
||||
|
||||
#define VER_MAJOR 1
|
||||
#define VER_MINOR 0
|
||||
#define VER_REVISION 0
|
||||
|
||||
|
||||
|
||||
#define INNER_TO_STR(x) #x
|
||||
#define TO_STR(x) INNER_TO_STR(x)
|
||||
#define VER_STRING TO_STR(VER_MAJOR) "." TO_STR(VER_MINOR) "." TO_STR(VER_REVISION) ".0"
|
||||
|
||||
#define VS_VERSION_INFO 0x1L
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_MAJOR,VER_MINOR,VER_REVISION
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "Symphony Auto Update Service"
|
||||
VALUE "ProductName", "Symphony Auto Update Service"
|
||||
VALUE "ProductVersion", VER_STRING
|
||||
VALUE "LegalCopyright", "Copyright 2021 Symphony OSS"
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
BIN
auto_update/icon.ico
Normal file
BIN
auto_update/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 302 KiB |
@ -5,6 +5,6 @@
|
||||
"scripts": {
|
||||
"test": "cl tests.cpp /O2 /MTd /D_DEBUG /D_CRTDBG_MAP_ALLOC /nologo /link /SUBSYSTEM:CONSOLE && tests.exe",
|
||||
"preinstall": "npm run test && npm run build",
|
||||
"build": "cl auto_update_helper.c /O2 /MT /nologo /link /SUBSYSTEM:CONSOLE && cl auto_update_service.c /O2 /MT /nologo /link /SUBSYSTEM:CONSOLE"
|
||||
"build": "rc.exe /nologo auto_update_helper.rc & cl auto_update_helper.c auto_update_helper.res /O2 /MT /nologo /link /SUBSYSTEM:CONSOLE & rc.exe /nologo auto_update_service.rc & cl auto_update_service.c auto_update_service.res /O2 /MT /nologo /link /SUBSYSTEM:CONSOLE"
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,30 @@ class Script
|
||||
|
||||
var userDataPathArgument = "--userDataPath=\"[USER_DATA_PATH]\"";
|
||||
|
||||
|
||||
File updateService = new File(@"..\..\..\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
|
||||
@ -46,6 +69,8 @@ class Script
|
||||
Arguments = userDataPathArgument
|
||||
}
|
||||
),
|
||||
updateService,
|
||||
new File(@"..\..\..\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"),
|
||||
@ -427,16 +452,16 @@ public class CustomActions
|
||||
@"""" + name + @""":" + value.Trim());
|
||||
}
|
||||
|
||||
// When SDA is parsing the JSON config file, it will interpret backslash as an escape character,
|
||||
// and will throw an error for invalid escape codes. To make a path valid for parsing, we need
|
||||
// to replace each backslash with doubli backslash. After SDA have parsed the JSON, it will make
|
||||
// the double backslash become single backslash again.
|
||||
// When SDA is parsing the JSON config file, it will interpret backslash as an escape character,
|
||||
// and will throw an error for invalid escape codes. To make a path valid for parsing, we need
|
||||
// to replace each backslash with doubli backslash. After SDA have parsed the JSON, it will make
|
||||
// the double backslash become single backslash again.
|
||||
static string FixPathFormat( string path )
|
||||
{
|
||||
return path.Replace(@"\", @"\\");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// CleanRegistry custom action
|
||||
[CustomAction]
|
||||
public static ActionResult CleanRegistry(Session session)
|
||||
|
Loading…
Reference in New Issue
Block a user