mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 08:55:09 +08:00
Add url protocol support for msi, nsis, dmg and pkg installers
CURA-11288
This commit is contained in:
parent
28d44f6fe0
commit
1f9e0e2dee
@ -266,6 +266,10 @@ app = UMBUNDLE(
|
|||||||
'CFBundlePackageType': 'APPL',
|
'CFBundlePackageType': 'APPL',
|
||||||
'CFBundleVersionString': {{ version }},
|
'CFBundleVersionString': {{ version }},
|
||||||
'CFBundleShortVersionString': {{ short_version }},
|
'CFBundleShortVersionString': {{ short_version }},
|
||||||
|
'CFBundleURLTypes': [{
|
||||||
|
'CFBundleURLName': '{{ display_name }}',
|
||||||
|
'CFBundleURLSchemes': ['cura', 'slicer'],
|
||||||
|
}],
|
||||||
'CFBundleDocumentTypes': [{
|
'CFBundleDocumentTypes': [{
|
||||||
'CFBundleTypeRole': 'Viewer',
|
'CFBundleTypeRole': 'Viewer',
|
||||||
'CFBundleTypeExtensions': ['*'],
|
'CFBundleTypeExtensions': ['*'],
|
||||||
|
@ -192,3 +192,18 @@ DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
Section UrlProtocol
|
||||||
|
WriteRegStr HKCR "cura" "" "URL:cura"
|
||||||
|
WriteRegStr HKCR "cura" "URL Protocol" ""
|
||||||
|
WriteRegStr HKCR "cura\DefaultIcon" "" "$INSTDIR\${MAIN_APP_EXE},1"
|
||||||
|
WriteRegStr HKCR "cura\shell" "" "open"
|
||||||
|
WriteRegStr HKCR "cura\shell\open\command" "" '"$INSTDIR\${MAIN_APP_EXE}" "%1"'
|
||||||
|
|
||||||
|
WriteRegStr HKCR "slicer" "" "URL:slicer"
|
||||||
|
WriteRegStr HKCR "slicer" "URL Protocol" ""
|
||||||
|
WriteRegStr HKCR "slicer\DefaultIcon" "" "$INSTDIR\${MAIN_APP_EXE},1"
|
||||||
|
WriteRegStr HKCR "slicer\shell" "" "open"
|
||||||
|
WriteRegStr HKCR "slicer\shell\open\command" "" '"$INSTDIR\${MAIN_APP_EXE}" "%1"'
|
||||||
|
|
||||||
|
SectionEnd
|
@ -33,6 +33,21 @@
|
|||||||
/>
|
/>
|
||||||
</Upgrade>
|
</Upgrade>
|
||||||
|
|
||||||
|
<Property Id="ASSOCIATE_URL_PROTOCOLS">
|
||||||
|
<RegistrySearch Id="CheckCuraProtocolHandler"
|
||||||
|
Type="raw"
|
||||||
|
Root="HKCR"
|
||||||
|
Key="cura"
|
||||||
|
Name="URL Protocol"
|
||||||
|
/>
|
||||||
|
<RegistrySearch Id="CheckSlicerProtocolHandler"
|
||||||
|
Type="raw"
|
||||||
|
Root="HKCR"
|
||||||
|
Key="slicer"
|
||||||
|
Name="URL Protocol"
|
||||||
|
/>
|
||||||
|
</Property>
|
||||||
|
|
||||||
{% if "Enterprise" in app_name %}
|
{% if "Enterprise" in app_name %}
|
||||||
<Property Id="PREVIOUS_413_INSTALLED" Secure="yes" />
|
<Property Id="PREVIOUS_413_INSTALLED" Secure="yes" />
|
||||||
<Upgrade Id="53C603BB-2B17-4206-A609-29C2E0D0B0AE">
|
<Upgrade Id="53C603BB-2B17-4206-A609-29C2E0D0B0AE">
|
||||||
@ -144,11 +159,32 @@
|
|||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
|
|
||||||
|
<!--Url Scheme-->
|
||||||
|
<Component Id="CuraRegistration" Guid="*">
|
||||||
|
<RegistryKey Root="HKCR" Key="cura" Action="createAndRemoveOnUninstall">
|
||||||
|
<RegistryValue Type="string" Value="URL:Cura Protocol"/>
|
||||||
|
<RegistryValue Type="string" Name="URL Protocol" Value=""/>
|
||||||
|
<RegistryValue Type="string" Key="DefaultIcon" Value="[INSTALLFOLDER]\CuraEngine.exe,1"/>
|
||||||
|
<RegistryValue Type="string" Key="shell\open\command" Value=""[INSTALLFOLDER]\CuraEngine.exe" "%1""/>
|
||||||
|
</RegistryKey>
|
||||||
|
</Component>
|
||||||
|
|
||||||
|
<Component Id="SlicerRegistration" Guid="*">
|
||||||
|
<RegistryKey Root="HKCR" Key="slicer" Action="createAndRemoveOnUninstall">
|
||||||
|
<RegistryValue Type="string" Value="URL:Slicer Protocol"/>
|
||||||
|
<RegistryValue Type="string" Name="URL Protocol" Value=""/>
|
||||||
|
<RegistryValue Type="string" Key="DefaultIcon" Value="[INSTALLFOLDER]\CuraEngine.exe,1"/>
|
||||||
|
<RegistryValue Type="string" Key="shell\open\command" Value=""[INSTALLFOLDER]\CuraEngine.exe" "%1""/>
|
||||||
|
</RegistryKey>
|
||||||
|
</Component>
|
||||||
|
|
||||||
<Feature Id="ProductFeature" Title="{{ app_name }}" Level="1" ConfigurableDirectory="APPLICATIONFOLDER">
|
<Feature Id="ProductFeature" Title="{{ app_name }}" Level="1" ConfigurableDirectory="APPLICATIONFOLDER">
|
||||||
<ComponentRef Id="CMP_UltiMaker_Cura_exe" />
|
<ComponentRef Id="CMP_UltiMaker_Cura_exe" />
|
||||||
<ComponentRef Id="CMP_CuraEngine_exe" />
|
<ComponentRef Id="CMP_CuraEngine_exe" />
|
||||||
<ComponentGroupRef Id="NewFilesGroup" />
|
<ComponentGroupRef Id="NewFilesGroup" />
|
||||||
<ComponentRef Id="CMP_Shortcuts" />
|
<ComponentRef Id="CMP_Shortcuts" />
|
||||||
|
<ComponentRef Id="CuraRegistration"/>
|
||||||
|
<ComponentRef Id="SlicerRegistration"/>
|
||||||
</Feature>
|
</Feature>
|
||||||
<Feature Id="UninstallOlderVersionFeature" Title="Uninstall previous versions" Level="{{ 1 if "Enterprise" in app_name else 0 }}" Description="..."/>
|
<Feature Id="UninstallOlderVersionFeature" Title="Uninstall previous versions" Level="{{ 1 if "Enterprise" in app_name else 0 }}" Description="..."/>
|
||||||
</Product>
|
</Product>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user