From fad9b2c96910d04d8756e7ef47161830b032e4a2 Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Sat, 5 Sep 2020 04:25:49 +0200 Subject: [PATCH] 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 --- NEXTCLOUD.cmake | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/NEXTCLOUD.cmake b/NEXTCLOUD.cmake index 15b4eb46f..a497b8674 100644 --- a/NEXTCLOUD.cmake +++ b/NEXTCLOUD.cmake @@ -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" # - -# Context Menu -set( WIN_SHELLEXT_CONTEXT_MENU_GUID "{BC6988AB-ACE2-4B81-84DC-DC34F9B24401}" ) - -# Overlays -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}" ) +if(WIN32) + # Context Menu + set( WIN_SHELLEXT_CONTEXT_MENU_GUID "{BC6988AB-ACE2-4B81-84DC-DC34F9B24401}" ) + + # Overlays + 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}" ) + + # MSI Upgrade Code (without brackets) + set( WIN_MSI_UPGRADE_CODE "FD2FCCA9-BB8F-4485-8F70-A0621B84A7F4" ) + + # Windows build options + option( BUILD_WIN_MSI "Build MSI scripts and helper DLL" OFF ) + option( BUILD_WIN_TOOLS "Build Win32 migration tools" OFF ) +endif() -- 2.30.2