Skip to content

Commit 35593b4

Browse files
authored
Merge pull request #8315 from nextcloud/backport/8178/stable-3.16
[stable-3.16] Bugfix/version windows integration improve install
2 parents 0ada4be + 54653f6 commit 35593b4

7 files changed

Lines changed: 90 additions & 8 deletions

File tree

VERSION.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set(MIRALL_VERSION_PATCH 4)
77
set(MIRALL_VERSION_YEAR 2025)
88
set(MIRALL_SOVERSION 0)
99
set(MIRALL_PREVERSION_HUMAN "3.16.4") # For preversions where PATCH>=50. Use version + alpha, rc1, rc2, etc.
10+
set(NCEXT_BUILD_NUM 47)
11+
set(NCEXT_VERSION 3,0,0,${NCEXT_BUILD_NUM})
1012

1113
# ------------------------------------
1214
# Minimum supported server versions

admin/win/msi/Nextcloud.wxs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/replacing-ourselves/
4545
https://www.joyofsetup.com/2010/01/16/major-upgrades-now-easier-than-ever/
4646
-->
47-
<MajorUpgrade Schedule="afterInstallInitialize" AllowDowngrades="yes" />
48-
<Property Id="REINSTALLMODE" Value="amus" />
47+
<MajorUpgrade Schedule="afterInstallExecute" AllowDowngrades="yes" />
48+
<Property Id="REINSTALLMODE" Value="dmus" />
49+
<Property Id="MSIRMSHUTDOWN" Value="1" />
4950

5051
<Media Id="1" Cabinet="$(var.AppShortName).cab" EmbedCab="yes" />
5152

@@ -88,9 +89,6 @@
8889

8990
<!-- Uninstall: Cleanup the Registry -->
9091
<Custom Action="RegistryCleanupCustomAction" After="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
91-
92-
<!-- Schedule Reboot for the Shell Extensions (in silent installation mode only, or if SCHEDULE_REBOOT argument is set-->
93-
<ScheduleReboot After="InstallFinalize">(SCHEDULE_REBOOT=1) OR NOT (UILevel=2)</ScheduleReboot>
9492
</InstallExecuteSequence>
9593

9694
<!-- "Add or Remove" Programs Entries -->

shell_integration/windows/NCUtil/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ add_library(NCUtil STATIC
77

88
target_include_directories(NCUtil
99
PUBLIC
10-
"${CMAKE_CURRENT_SOURCE_DIR}"
10+
${CMAKE_CURRENT_SOURCE_DIR}
11+
${CMAKE_CURRENT_BINARY_DIR}
1112
)

shell_integration/windows/NCUtil/Version.h renamed to shell_integration/windows/NCUtil/Version.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
// This is the number that will end up in the version window of the DLLs.
44
// Increment this version before committing a new build if you are today's shell_integration build master.
5-
#define NCEXT_BUILD_NUM 47
5+
#cmakedefine NCEXT_BUILD_NUM @NCEXT_BUILD_NUM@
66

77
#define STRINGIZE2(s) #s
88
#define STRINGIZE(s) STRINGIZE2(s)
99

10-
#define NCEXT_VERSION 3,0,0,NCEXT_BUILD_NUM
10+
#cmakedefine NCEXT_VERSION @NCEXT_VERSION@
1111
#define NCEXT_VERSION_STRING STRINGIZE(NCEXT_VERSION)

src/libsync/vfs/cfapi/shellext/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ set(cppWinRtExe "${WindowsSDKBinPathForTools}\\cppwinrt.exe")
153153
message("cppWinRtExe: ${cppWinRtExe}")
154154
message("midlExe: ${midlExe}")
155155

156+
configure_file(CfApiShellIntegrationVersion.h.in ${CMAKE_CURRENT_BINARY_DIR}/CfApiShellIntegrationVersion.h)
157+
156158
# use midl.exe and cppwinrt.exe to generate files for CustomStateProvider (WinRT class)
157159
add_custom_command(OUTPUT ${MidlOutputPathHeader}
158160
COMMAND ${midlExe} /winrt /h nul /tlb ${MidlOutputPathTlb} /winmd ${MidlOutputPathWinmd} /metadata_dir "${WindowsSDKReferencesPath}\\Windows.Foundation.FoundationContract\\${WindowsFoundationContractVersion}" /nomidl /reference "${WindowsSDKReferencesPath}\\Windows.Foundation.FoundationContract\\${WindowsFoundationContractVersion}\\Windows.Foundation.FoundationContract.winmd" /reference "${WindowsSDKReferencesPath}\\Windows.Storage.Provider.CloudFilesContract\\${WindowsStorageProviderCloudFilesContractVersion}\\Windows.Storage.Provider.CloudFilesContract.winmd" /I ${MidleFileFolder} customstateprovider.idl
@@ -170,6 +172,7 @@ add_library(CfApiShellExtensions MODULE
170172
${CMAKE_SOURCE_DIR}/src/common/shellextensionutils.cpp
171173
customstateprovider.cpp
172174
CfApiShellIntegration.def
175+
CfApiShellIntegration.rc
173176
)
174177

175178
message("CUSTOM_STATE_ICON_LOCKED_OUT: ${CUSTOM_STATE_ICON_LOCKED_OUT}")
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: GPL-2.0-or-later
4+
*/
5+
// Microsoft Visual C++ generated resource script.
6+
//
7+
#include "CfApiShellIntegrationVersion.h"
8+
9+
/////////////////////////////////////////////////////////////////////////////
10+
//
11+
// Generated from the TEXTINCLUDE 2 resource.
12+
//
13+
#include "windows.h"
14+
15+
/////////////////////////////////////////////////////////////////////////////
16+
//
17+
// Version
18+
//
19+
20+
VS_VERSION_INFO VERSIONINFO
21+
FILEVERSION NCEXT_VERSION
22+
PRODUCTVERSION NCEXT_VERSION
23+
FILEFLAGSMASK 0x3fL
24+
#ifdef _DEBUG
25+
FILEFLAGS 0x1L
26+
#else
27+
FILEFLAGS 0x0L
28+
#endif
29+
FILEOS 0x40004L
30+
FILETYPE 0x2L
31+
FILESUBTYPE 0x0L
32+
BEGIN
33+
BLOCK "StringFileInfo"
34+
BEGIN
35+
BLOCK "040904b0"
36+
BEGIN
37+
VALUE "CompanyName", "Nextcloud GmbH"
38+
VALUE "FileDescription", "Nextcloud CfApi shell extension"
39+
VALUE "FileVersion", NCEXT_VERSION_STRING
40+
VALUE "InternalName", "NCOverlays"
41+
VALUE "LegalCopyright", "Copyright (C) 2023 Nextcloud GmbH"
42+
VALUE "ProductName", "Nextcloud shell extension"
43+
VALUE "ProductVersion", NCEXT_VERSION_STRING
44+
END
45+
END
46+
BLOCK "VarFileInfo"
47+
BEGIN
48+
VALUE "Translation", 0x409, 1200
49+
END
50+
END
51+
/////////////////////////////////////////////////////////////////////////////
52+
53+
54+
55+
#ifndef APSTUDIO_INVOKED
56+
/////////////////////////////////////////////////////////////////////////////
57+
//
58+
// Generated from the TEXTINCLUDE 3 resource.
59+
//
60+
61+
62+
/////////////////////////////////////////////////////////////////////////////
63+
#endif // not APSTUDIO_INVOKED
64+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#pragma once
2+
3+
// SPDX-FileCopyrightText: 2016 ownCloud GmbH
4+
// SPDX-License-Identifier: LGPL-2.1-or-later
5+
6+
// This is the number that will end up in the version window of the DLLs.
7+
// Increment this version before committing a new build if you are today's shell_integration build master.
8+
#cmakedefine NCEXT_BUILD_NUM @NCEXT_BUILD_NUM@
9+
10+
#define STRINGIZE2(s) #s
11+
#define STRINGIZE(s) STRINGIZE2(s)
12+
13+
#cmakedefine NCEXT_VERSION @NCEXT_VERSION@
14+
#define NCEXT_VERSION_STRING STRINGIZE(NCEXT_VERSION)

0 commit comments

Comments
 (0)