forked from nextcloud/desktop
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #148 [stable-3.12] nmc/2081-InstallerChanges - Master
- Loading branch information
Showing
7 changed files
with
192 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
<!-- App Defines --> | ||
<?define AppName = "@APPLICATION_NAME@" ?> | ||
<?define AppShortName = "@APPLICATION_EXECUTABLE@" ?> | ||
<?define OldAppName = "MagentaCLOUD Software" ?> | ||
|
||
<?define AppIcon = "@[email protected]" ?> | ||
<?define AppExe = "@[email protected]" ?> | ||
|
@@ -32,9 +33,8 @@ | |
<?define AppCommandOpenUrlScheme = "@APPLICATION_URI_HANDLER_SCHEME@" ?> | ||
|
||
<!-- Custom license: To use it, also remove the "Skip the license page" stuff in the <UI> section | ||
and uncomment <WixVariable Id="WixUILicenseRtf"... | ||
<?define AppLicenseRtf = "path\License.rtf" ?> | ||
--> | ||
and uncomment <WixVariable Id="WixUILicenseRtf"...--> | ||
<?define AppLicenseRtf = "$(sys.CURRENTDIR)\License.rtf" ?> | ||
|
||
<!-- App Version --> | ||
<?define VerMajor = "@MIRALL_VERSION_MAJOR@" ?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
On Error goto 0 | ||
|
||
Const HKEY_LOCAL_MACHINE = &H80000002 | ||
|
||
Const strObjRegistry = "winmgmts:\\.\root\default:StdRegProv" | ||
|
||
Function RegistryDeleteKeyRecursive(regRoot, strKeyPath) | ||
Set objRegistry = GetObject(strObjRegistry) | ||
objRegistry.EnumKey regRoot, strKeyPath, arrSubkeys | ||
If IsArray(arrSubkeys) Then | ||
For Each strSubkey In arrSubkeys | ||
RegistryDeleteKeyRecursive regRoot, strKeyPath & "\" & strSubkey | ||
Next | ||
End If | ||
objRegistry.DeleteKey regRoot, strKeyPath | ||
End Function | ||
|
||
Function RegistryListSubkeys(regRoot, strKeyPath) | ||
Set objRegistry = GetObject(strObjRegistry) | ||
objRegistry.EnumKey regRoot, strKeyPath, arrSubkeys | ||
RegistryListSubkeys = arrSubkeys | ||
End Function | ||
|
||
Function GetUserSID() | ||
Dim objWshNetwork, objUserAccount | ||
|
||
Set objWshNetwork = CreateObject("WScript.Network") | ||
|
||
Set objUserAccount = GetObject("winmgmts://" & objWshNetwork.UserDomain & "/root/cimv2").Get("Win32_UserAccount.Domain='" & objWshNetwork.ComputerName & "',Name='" & objWshNetwork.UserName & "'") | ||
GetUserSID = objUserAccount.SID | ||
End Function | ||
|
||
Function RegistryCleanupSyncRootManager() | ||
strSyncRootManagerKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager" | ||
|
||
arrSubKeys = RegistryListSubkeys(HKEY_LOCAL_MACHINE, strSyncRootManagerKeyPath) | ||
|
||
If IsArray(arrSubkeys) Then | ||
arrSubkeys=Filter(arrSubkeys, Session.Property("APPNAME")) | ||
End If | ||
If IsArray(arrSubkeys) Then | ||
arrSubkeys=Filter(arrSubkeys, GetUserSID()) | ||
End If | ||
|
||
If IsArray(arrSubkeys) Then | ||
For Each strSubkey In arrSubkeys | ||
RegistryDeleteKeyRecursive HKEY_LOCAL_MACHINE, strSyncRootManagerKeyPath & "\" & strSubkey | ||
Next | ||
End If | ||
End Function | ||
|
||
Function RegistryCleanup() | ||
RegistryCleanupSyncRootManager() | ||
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
* | ||
* Copyright (C) by Michael Schuster <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
* | ||
--> | ||
<?include $(sys.CURRENTDIR)OEM.wxi?> | ||
<?include $(sys.CURRENTDIR)Platform.wxi?> | ||
|
||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> | ||
|
||
<!-- | ||
When to change the Product GUID: | ||
https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/ | ||
https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/checking-for-oldies/ | ||
We change the Product Id for every release, to let up-/downgrading always work. | ||
But we then should never change the UpgradeCode. | ||
--> | ||
<Fragment> | ||
<UI Id="MigrationDialogUI"> | ||
|
||
<DialogRef Id="ExitDialog"/> | ||
|
||
<Dialog Id="MigrationDialog" Width="370" Height="270" Title="$(var.AppName) $(var.PlatformBitness)"> | ||
|
||
<Control Id="Weiter" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="Weiter" > | ||
<!-- <Publish Event="DoAction" Value="RemoveOldClient">updateCheckboxResult = 1 and aquisitionCheckboxResult = 1 and Not Installed</Publish> | ||
<Publish Event="OnExit" Value="success"></Publish> --> | ||
</Control> | ||
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.ExitDialogBitmap)" /> | ||
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="Back" /> | ||
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" /> | ||
<Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="40" Transparent="yes" NoPrefix="yes" Text="MagentaCLOUD durchsucht ihren PC nach früheren Versionen. Sollte eine frühere Version vorhanden sein, so wird sie deinstalliert werden, da sie nicht länger kompatibel ist." /> | ||
<Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)" /> | ||
</Dialog> | ||
<InstallUISequence> | ||
<Show Dialog="MigrationDialog" After="ExecuteAction" /> | ||
</InstallUISequence> | ||
</UI> | ||
</Fragment> | ||
</Wix> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters