mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 05:55:59 +03:00
Move Windows shell extension DLLs to a root installation directory.
Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
parent
60515034c5
commit
7f6c2f946b
6 changed files with 32 additions and 20 deletions
|
@ -148,7 +148,7 @@
|
||||||
<Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
|
<Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
|
||||||
<Directory Id="INSTALLDIR" Name="$(var.AppName)">
|
<Directory Id="INSTALLDIR" Name="$(var.AppName)">
|
||||||
<!-- Shell Extensions -->
|
<!-- Shell Extensions -->
|
||||||
<Directory Id="ShellExtDir" Name="shellext" />
|
<Directory Id="ShellExtDir" />
|
||||||
</Directory>
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,10 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Exclude Shell Extensions -->
|
<!-- Exclude Shell Extensions -->
|
||||||
<xsl:key name="shellext-search" match="wix:Component[contains(wix:File/@Source, 'shellext')]" use="@Id" />
|
<xsl:key name="shellext-search" match="wix:Component[contains(wix:File/@Source, 'NCContextMenu.dll') or contains(wix:File/@Source, 'NCOverlays.dll')]" use="@Id" />
|
||||||
<xsl:template match="wix:Component[key('shellext-search', @Id)]" />
|
<xsl:template match="wix:Component[key('shellext-search', @Id)]" />
|
||||||
<xsl:template match="wix:ComponentRef[key('shellext-search', @Id)]" />
|
<xsl:template match="wix:ComponentRef[key('shellext-search', @Id)]" />
|
||||||
|
|
||||||
<xsl:key name="shellext-search" match="wix:Directory[contains(@Name, 'shellext')]" use="@Id" />
|
|
||||||
<xsl:template match="wix:Directory[key('shellext-search', @Id)]" />
|
|
||||||
|
|
||||||
<!-- Exclude VC Redist -->
|
<!-- Exclude VC Redist -->
|
||||||
<xsl:key name="vc-redist-32-search" match="wix:Component[contains(wix:File/@Source, 'vc_redist.x86.exe')]" use="@Id" />
|
<xsl:key name="vc-redist-32-search" match="wix:Component[contains(wix:File/@Source, 'vc_redist.x86.exe')]" use="@Id" />
|
||||||
<xsl:template match="wix:Component[key('vc-redist-32-search', @Id)]" />
|
<xsl:template match="wix:Component[key('vc-redist-32-search', @Id)]" />
|
||||||
|
|
|
@ -486,20 +486,19 @@ SectionEnd
|
||||||
File "${BUILD_PATH}\vcredist_x86.exe"
|
File "${BUILD_PATH}\vcredist_x86.exe"
|
||||||
File "${BUILD_PATH}\vcredist_x64.exe"
|
File "${BUILD_PATH}\vcredist_x64.exe"
|
||||||
Call InstallRedistributables
|
Call InstallRedistributables
|
||||||
CreateDirectory "$INSTDIR\shellext"
|
|
||||||
!define LIBRARY_COM
|
!define LIBRARY_COM
|
||||||
!define LIBRARY_SHELL_EXTENSION
|
!define LIBRARY_SHELL_EXTENSION
|
||||||
!define LIBRARY_IGNORE_VERSION
|
!define LIBRARY_IGNORE_VERSION
|
||||||
${If} ${RunningX64}
|
${If} ${RunningX64}
|
||||||
!define LIBRARY_X64
|
!define LIBRARY_X64
|
||||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCUtil_x64.dll" "$INSTDIR\shellext\OCUtil_x64.dll" "$INSTDIR\shellext"
|
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCUtil_x64.dll" "$INSTDIR\OCUtil_x64.dll" "$INSTDIR"
|
||||||
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCOverlays_x64.dll" "$INSTDIR\shellext\OCOverlays_x64.dll" "$INSTDIR\shellext"
|
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCOverlays_x64.dll" "$INSTDIR\OCOverlays_x64.dll" "$INSTDIR"
|
||||||
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCContextMenu_x64.dll" "$INSTDIR\shellext\OCContextMenu_x64.dll" "$INSTDIR\shellext"
|
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCContextMenu_x64.dll" "$INSTDIR\OCContextMenu_x64.dll" "$INSTDIR"
|
||||||
!undef LIBRARY_X64
|
!undef LIBRARY_X64
|
||||||
${Else}
|
${Else}
|
||||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCUtil_x86.dll" "$INSTDIR\shellext\OCUtil_x86.dll" "$INSTDIR\shellext"
|
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCUtil_x86.dll" "$INSTDIR\OCUtil_x86.dll" "$INSTDIR"
|
||||||
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCOverlays_x86.dll" "$INSTDIR\shellext\OCOverlays_x86.dll" "$INSTDIR\shellext"
|
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCOverlays_x86.dll" "$INSTDIR\OCOverlays_x86.dll" "$INSTDIR"
|
||||||
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCContextMenu_x86.dll" "$INSTDIR\shellext\OCContextMenu_x86.dll" "$INSTDIR\shellext"
|
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCContextMenu_x86.dll" "$INSTDIR\OCContextMenu_x86.dll" "$INSTDIR"
|
||||||
${Endif}
|
${Endif}
|
||||||
!undef LIBRARY_COM
|
!undef LIBRARY_COM
|
||||||
!undef LIBRARY_SHELL_EXTENSION
|
!undef LIBRARY_SHELL_EXTENSION
|
||||||
|
@ -664,14 +663,14 @@ Section Uninstall
|
||||||
${If} ${HasSection} SEC_SHELL_EXT
|
${If} ${HasSection} SEC_SHELL_EXT
|
||||||
DetailPrint "Uninstalling x64 overlay DLLs"
|
DetailPrint "Uninstalling x64 overlay DLLs"
|
||||||
!define LIBRARY_X64
|
!define LIBRARY_X64
|
||||||
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCContextMenu_x64.dll"
|
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCContextMenu_x64.dll"
|
||||||
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCOverlays_x64.dll"
|
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCOverlays_x64.dll"
|
||||||
!insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCUtil_x64.dll"
|
!insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCUtil_x64.dll"
|
||||||
!undef LIBRARY_X64
|
!undef LIBRARY_X64
|
||||||
DetailPrint "Uninstalling x86 overlay DLLs"
|
DetailPrint "Uninstalling x86 overlay DLLs"
|
||||||
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCContextMenu_x86.dll"
|
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCContextMenu_x86.dll"
|
||||||
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCOverlays_x86.dll"
|
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCOverlays_x86.dll"
|
||||||
!insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCUtil_x86.dll"
|
!insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCUtil_x86.dll"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
!undef LIBRARY_COM
|
!undef LIBRARY_COM
|
||||||
!undef LIBRARY_SHELL_EXTENSION
|
!undef LIBRARY_SHELL_EXTENSION
|
||||||
|
|
|
@ -11,6 +11,14 @@ add_library(NCContextMenu MODULE
|
||||||
target_link_libraries(NCContextMenu
|
target_link_libraries(NCContextMenu
|
||||||
NCUtil)
|
NCUtil)
|
||||||
|
|
||||||
|
set_target_properties(NCContextMenu
|
||||||
|
PROPERTIES
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY
|
||||||
|
${BIN_OUTPUT_DIRECTORY}
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
${BIN_OUTPUT_DIRECTORY}
|
||||||
|
)
|
||||||
|
|
||||||
install(TARGETS NCContextMenu
|
install(TARGETS NCContextMenu
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
|
|
@ -10,6 +10,14 @@ add_library(NCOverlays MODULE
|
||||||
target_link_libraries(NCOverlays
|
target_link_libraries(NCOverlays
|
||||||
NCUtil)
|
NCUtil)
|
||||||
|
|
||||||
|
set_target_properties(NCOverlays
|
||||||
|
PROPERTIES
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY
|
||||||
|
${BIN_OUTPUT_DIRECTORY}
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
${BIN_OUTPUT_DIRECTORY}
|
||||||
|
)
|
||||||
|
|
||||||
install(TARGETS NCOverlays
|
install(TARGETS NCOverlays
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
<DirectoryRef Id="ShellExtDir">
|
<DirectoryRef Id="ShellExtDir">
|
||||||
<Component Id="NCContextMenu" Guid="*" Win64="$(var.PlatformWin64)">
|
<Component Id="NCContextMenu" Guid="*" Win64="$(var.PlatformWin64)">
|
||||||
<File Id="NCContextMenu.dll" KeyPath="yes" Source="$(var.HarvestAppDir)\shellext\NCContextMenu.dll">
|
<File Id="NCContextMenu.dll" KeyPath="yes" Source="$(var.HarvestAppDir)\NCContextMenu.dll">
|
||||||
<Class Id="$(var.ContextMenuGuid)" Context="InprocServer32" Description="$(var.ContextMenuDescription)" ThreadingModel="apartment" />
|
<Class Id="$(var.ContextMenuGuid)" Context="InprocServer32" Description="$(var.ContextMenuDescription)" ThreadingModel="apartment" />
|
||||||
</File>
|
</File>
|
||||||
<RegistryValue Root="HKCR" Key="CLSID\$(var.ContextMenuGuid)" Name="ContextMenuOptIn" Value="" Type="string" Action="write" />
|
<RegistryValue Root="HKCR" Key="CLSID\$(var.ContextMenuGuid)" Name="ContextMenuOptIn" Value="" Type="string" Action="write" />
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Id="NCOverlays" Guid="*" Win64="$(var.PlatformWin64)">
|
<Component Id="NCOverlays" Guid="*" Win64="$(var.PlatformWin64)">
|
||||||
<File Id="NCOverlays.dll" KeyPath="yes" Source="$(var.HarvestAppDir)\shellext\NCOverlays.dll">
|
<File Id="NCOverlays.dll" KeyPath="yes" Source="$(var.HarvestAppDir)\NCOverlays.dll">
|
||||||
<Class Id="$(var.OverlayGuidError)" Context="InprocServer32" Description="$(var.OverlayDescription)" ThreadingModel="apartment" Version="1.0" />
|
<Class Id="$(var.OverlayGuidError)" Context="InprocServer32" Description="$(var.OverlayDescription)" ThreadingModel="apartment" Version="1.0" />
|
||||||
<Class Id="$(var.OverlayGuidOK)" Context="InprocServer32" Description="$(var.OverlayDescription)" ThreadingModel="apartment" Version="1.0" />
|
<Class Id="$(var.OverlayGuidOK)" Context="InprocServer32" Description="$(var.OverlayDescription)" ThreadingModel="apartment" Version="1.0" />
|
||||||
<Class Id="$(var.OverlayGuidOKShared)" Context="InprocServer32" Description="$(var.OverlayDescription)" ThreadingModel="apartment" Version="1.0" />
|
<Class Id="$(var.OverlayGuidOKShared)" Context="InprocServer32" Description="$(var.OverlayDescription)" ThreadingModel="apartment" Version="1.0" />
|
||||||
|
|
Loading…
Reference in a new issue