mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 01:11:13 -06:00
ELECTRON-805: fix protocol handler uninstall issues on Windows (#510)
Currently, when we uninstall symphony on Windows, the protocol handler registry entry is left as is because it is created by Electron in the first place. To avoid such leftovers, we add logic to use Electron to register protocol handler only on Mac. On Windows, we use the installer to create a registry entry and manage it during installation as well.
This commit is contained in:
parent
0c8b322d63
commit
6d86071072
@ -105,6 +105,8 @@
|
||||
<ROW Component="Symphony" ComponentId="{A6B4BA2F-2403-4B8E-9303-BF8400A9B1C4}" Directory_="Symphony_Dir" Attributes="0"/>
|
||||
<ROW Component="Symphony.config" ComponentId="{644A231D-2C96-4D3D-ADB0-7820DA373499}" Directory_="config_Dir" Attributes="0" KeyPath="Symphony.config_1" Type="0"/>
|
||||
<ROW Component="Symphony.exe" ComponentId="{853053E4-D96C-42FE-9AF1-52FF1F449FFD}" Directory_="APPDIR" Attributes="256" KeyPath="Symphony.exe"/>
|
||||
<ROW Component="_" ComponentId="{D73FE3F2-2F6E-4911-85DA-0184A260329E}" Directory_="APPDIR" Attributes="260" KeyPath="_"/>
|
||||
<ROW Component="__1" ComponentId="{F70EA270-345A-4510-8428-0EF7B2EC44A3}" Directory_="APPDIR" Attributes="260" KeyPath="__1"/>
|
||||
<ROW Component="am.pak" ComponentId="{76F935B8-6077-4C7A-AD1B-77E2DBA856CC}" Directory_="locales_Dir" Attributes="0" KeyPath="am.pak" Type="0"/>
|
||||
<ROW Component="ambient.d.ts" ComponentId="{CAFDE1D9-C005-4ED5-A541-E08241C0EE3E}" Directory_="src_1_Dir" Attributes="0" KeyPath="index.ts" Type="0"/>
|
||||
<ROW Component="apimswincoreconsolel110.dll" ComponentId="{24C259E2-26D5-4B36-9029-C373504B0DDD}" Directory_="APPDIR" Attributes="256" KeyPath="apimswincoreconsolel110.dll"/>
|
||||
@ -169,7 +171,7 @@
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="3" Level="1" Attributes="0"/>
|
||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_DisableModify FreeDiskSpace.exe Jobber.exe PodUrl ProductInformation ScreenSnippet.exe ScreenSnippet.resources.dll ScreenSnippet.resources.dll_1 Symphony Symphony.config Symphony.exe am.pak ambient.d.ts apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll appupdate.yml blink_image_resources_200_percent.pak cld.node d3dcompiler_47.dll ffmpeg.dll index.d.ts index.js indexvalidatorx64.exe libEGL.dll libGLESv2.dll libsymphonysearchx64.dll lz4winx64.exe msvcp140.dll node.dll node_modules npmignore tarwin.exe ucrtbase.dll vcruntime140.dll"/>
|
||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_DisableModify FreeDiskSpace.exe Jobber.exe PodUrl ProductInformation ScreenSnippet.exe ScreenSnippet.resources.dll ScreenSnippet.resources.dll_1 Symphony Symphony.config Symphony.exe _ __1 am.pak ambient.d.ts apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll appupdate.yml blink_image_resources_200_percent.pak cld.node d3dcompiler_47.dll ffmpeg.dll index.d.ts index.js indexvalidatorx64.exe libEGL.dll libGLESv2.dll libsymphonysearchx64.dll lz4winx64.exe msvcp140.dll node.dll node_modules npmignore tarwin.exe ucrtbase.dll vcruntime140.dll"/>
|
||||
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||
@ -768,6 +770,8 @@
|
||||
<ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
|
||||
<ROW Registry="VersionMajor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMajor" Value="#1" Component_="AI_CustomARPName"/>
|
||||
<ROW Registry="VersionMinor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMinor" Value="#0" Component_="AI_CustomARPName"/>
|
||||
<ROW Registry="_" Root="0" Key="symphony" Value="URL:symphony" Component_="_"/>
|
||||
<ROW Registry="__1" Root="0" Key="symphony\shell\open\command" Value=""[APPDIR]Symphony.exe" "%1"" Component_="__1"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiShortsComponent">
|
||||
<ROW Shortcut="Symphony" Directory_="DesktopFolder" Name="SYMPHO~1|Symphony Shortcut" Component_="Symphony.exe" Target="[#Symphony.exe]" Description="Shortcut to Symphony Application" Hotkey="0" Icon_="icon.exe" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
|
||||
|
@ -104,6 +104,8 @@
|
||||
<ROW Component="Symphony" ComponentId="{A6B4BA2F-2403-4B8E-9303-BF8400A9B1C4}" Directory_="Symphony_Dir" Attributes="0"/>
|
||||
<ROW Component="Symphony.config" ComponentId="{DBC82D0C-B96E-4939-A950-53020CEB1B7F}" Directory_="config_Dir" Attributes="0" KeyPath="Symphony.config" Type="0"/>
|
||||
<ROW Component="Symphony.exe" ComponentId="{853053E4-D96C-42FE-9AF1-52FF1F449FFD}" Directory_="APPDIR" Attributes="256" KeyPath="Symphony.exe"/>
|
||||
<ROW Component="_" ComponentId="{0AFBD4A1-2A78-4B48-B9B0-2420C23E27DE}" Directory_="APPDIR" Attributes="4" KeyPath="_"/>
|
||||
<ROW Component="__1" ComponentId="{F0A351BB-C0E2-4551-862B-72ADAD9893D1}" Directory_="APPDIR" Attributes="4" KeyPath="__1"/>
|
||||
<ROW Component="am.pak" ComponentId="{7F9B88EC-7331-4801-A165-8E9789C8BF82}" Directory_="locales_Dir" Attributes="0" KeyPath="am.pak" Type="0"/>
|
||||
<ROW Component="ambient.d.ts" ComponentId="{DC14EDAA-627E-40E6-AF34-C84A429A6FCA}" Directory_="src_1_Dir" Attributes="0" KeyPath="index.ts" Type="0"/>
|
||||
<ROW Component="apimswincoreconsolel110.dll" ComponentId="{4F64C158-2223-42DE-8CB2-475108D765EC}" Directory_="APPDIR" Attributes="0" KeyPath="apimswincoreconsolel110.dll"/>
|
||||
@ -167,7 +169,7 @@
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="3" Level="1" Attributes="0"/>
|
||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_DisableModify FreeDiskSpace.exe Jobber.exe PodUrl ProductInformation ScreenSnippet.exe ScreenSnippet.resources.dll ScreenSnippet.resources.dll_1 Symphony Symphony.config Symphony.exe am.pak ambient.d.ts apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll appupdate.yml blink_image_resources_200_percent.pak cld.node d3dcompiler_47.dll ffmpeg.dll index.d.ts index.js indexvalidatorx86.exe libEGL.dll libGLESv2.dll libsymphonysearchx86.dll lz4winx86.exe msvcp140.dll node.dll npmignore tarwin.exe ucrtbase.dll vcruntime140.dll"/>
|
||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_DisableModify FreeDiskSpace.exe Jobber.exe PodUrl ProductInformation ScreenSnippet.exe ScreenSnippet.resources.dll ScreenSnippet.resources.dll_1 Symphony Symphony.config Symphony.exe _ __1 am.pak ambient.d.ts apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll appupdate.yml blink_image_resources_200_percent.pak cld.node d3dcompiler_47.dll ffmpeg.dll index.d.ts index.js indexvalidatorx86.exe libEGL.dll libGLESv2.dll libsymphonysearchx86.dll lz4winx86.exe msvcp140.dll node.dll npmignore tarwin.exe ucrtbase.dll vcruntime140.dll"/>
|
||||
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||
@ -746,6 +748,8 @@
|
||||
<ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
|
||||
<ROW Registry="VersionMajor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMajor" Value="#1" Component_="AI_CustomARPName"/>
|
||||
<ROW Registry="VersionMinor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMinor" Value="#0" Component_="AI_CustomARPName"/>
|
||||
<ROW Registry="_" Root="0" Key="symphony" Value="URL:symphony" Component_="_"/>
|
||||
<ROW Registry="__1" Root="0" Key="symphony\shell\open\command" Value=""[APPDIR]Symphony.exe" "%1"" Component_="__1"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiShortsComponent">
|
||||
<ROW Shortcut="Symphony" Directory_="DesktopFolder" Name="SYMPHO~1|Symphony Shortcut" Component_="Symphony.exe" Target="[#Symphony.exe]" Description="Shortcut to Symphony Application" Hotkey="0" Icon_="icon.exe" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
|
||||
|
11
js/main.js
11
js/main.js
@ -232,10 +232,13 @@ app.on('activate', function () {
|
||||
}
|
||||
});
|
||||
|
||||
// adds 'symphony' as a protocol
|
||||
// in the system. plist file in macOS
|
||||
// and registry keys in windows
|
||||
app.setAsDefaultProtocolClient('symphony');
|
||||
// adds 'symphony' as a protocol in the system. plist file in macOS
|
||||
|
||||
// on windows, we create the protocol handler via the installer
|
||||
// because electron leaves registry traces upon uninstallation
|
||||
if (isMac) {
|
||||
app.setAsDefaultProtocolClient('symphony');
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is emitted only on macOS
|
||||
|
Loading…
Reference in New Issue
Block a user