Windows MSI: Add Upgrade Code and migration tool build options to NEXTCLOUD.cmake

The Upgrade Code is a GUID (specified without brackets) for the MSI package to allow Windows Installer identify existing installations.

New build options (default: OFF):
- BUILD_WIN_MSI: Build all MSI scripts and a required helper DLL (to uninstall NSIS legacy installations and remove Explorer Navigation Pane entries)
- BUILD_WIN_TOOLS: Build additional migration tools (currently NCNavRemove, a stand-alone tool for Explorer entries removal)

The helper DLL and migration tools are set to be statically linked and optimized for binary size.

Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
Michael Schuster 2020-09-05 04:25:49 +02:00
parent 58b88de936
commit fad9b2c969
No known key found for this signature in database
GPG key ID: 00819E3BF4177B28

View file

@ -37,15 +37,23 @@ option( APPLICATION_WIZARD_USE_CUSTOM_LOGO "Use the logo from ':/client/theme/co
# #
## Windows Shell Extensions - IMPORTANT: Generate new GUIDs for custom builds with "guidgen" or "uuidgen" ## Windows Shell Extensions & MSI - IMPORTANT: Generate new GUIDs for custom builds with "guidgen" or "uuidgen"
# #
if(WIN32)
# Context Menu
set( WIN_SHELLEXT_CONTEXT_MENU_GUID "{BC6988AB-ACE2-4B81-84DC-DC34F9B24401}" )
# Context Menu # Overlays
set( WIN_SHELLEXT_CONTEXT_MENU_GUID "{BC6988AB-ACE2-4B81-84DC-DC34F9B24401}" ) set( WIN_SHELLEXT_OVERLAY_GUID_ERROR "{E0342B74-7593-4C70-9D61-22F294AAFE05}" )
set( WIN_SHELLEXT_OVERLAY_GUID_OK "{E1094E94-BE93-4EA2-9639-8475C68F3886}" )
set( WIN_SHELLEXT_OVERLAY_GUID_OK_SHARED "{E243AD85-F71B-496B-B17E-B8091CBE93D2}" )
set( WIN_SHELLEXT_OVERLAY_GUID_SYNC "{E3D6DB20-1D83-4829-B5C9-941B31C0C35A}" )
set( WIN_SHELLEXT_OVERLAY_GUID_WARNING "{E4977F33-F93A-4A0A-9D3C-83DEA0EE8483}" )
# Overlays # MSI Upgrade Code (without brackets)
set( WIN_SHELLEXT_OVERLAY_GUID_ERROR "{E0342B74-7593-4C70-9D61-22F294AAFE05}" ) set( WIN_MSI_UPGRADE_CODE "FD2FCCA9-BB8F-4485-8F70-A0621B84A7F4" )
set( WIN_SHELLEXT_OVERLAY_GUID_OK "{E1094E94-BE93-4EA2-9639-8475C68F3886}" )
set( WIN_SHELLEXT_OVERLAY_GUID_OK_SHARED "{E243AD85-F71B-496B-B17E-B8091CBE93D2}" ) # Windows build options
set( WIN_SHELLEXT_OVERLAY_GUID_SYNC "{E3D6DB20-1D83-4829-B5C9-941B31C0C35A}" ) option( BUILD_WIN_MSI "Build MSI scripts and helper DLL" OFF )
set( WIN_SHELLEXT_OVERLAY_GUID_WARNING "{E4977F33-F93A-4A0A-9D3C-83DEA0EE8483}" ) option( BUILD_WIN_TOOLS "Build Win32 migration tools" OFF )
endif()