From cf32b759738f74788c29f721a5d49f43e4a5ab09 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 5 Feb 2011 18:51:20 +0200 Subject: [PATCH 1/4] Set remotes plugin to disabled to prevent triggering of paranoia from paranoid Windows users. --- resources/windows/OpenLP.reg | Bin 1670 -> 1670 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/resources/windows/OpenLP.reg b/resources/windows/OpenLP.reg index 503e718a201e3cfc34aad41d9a43f173fa11776d..0ceee96684508fdc7352996fb24e981b8803c2aa 100644 GIT binary patch delta 17 YcmZqUZR6eG!pdkc`95pv delta 23 fcmZqUZR6eG!aBKujcu|4Q^aH&Hjc@wSnmJ;RG0@> From 5f7d570b6533ae5f247f326a0c63a239652c43b2 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 5 Feb 2011 18:52:03 +0200 Subject: [PATCH 2/4] Add some code to the installer to uninstall the previous install of OpenLP. --- resources/windows/OpenLP-2.0.iss | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/resources/windows/OpenLP-2.0.iss b/resources/windows/OpenLP-2.0.iss index 94ee4fc22..fbb36009a 100644 --- a/resources/windows/OpenLP-2.0.iss +++ b/resources/windows/OpenLP-2.0.iss @@ -86,3 +86,56 @@ Root: HKCU; SubKey: Software\OpenLP\OpenLP\presentations; ValueType: dword; Valu Root: HKCU; SubKey: Software\OpenLP\OpenLP\remotes; ValueType: dword; ValueName: status; ValueData: $00000001 Root: HKCU; SubKey: Software\OpenLP\OpenLP\songs; ValueType: dword; ValueName: status; ValueData: $00000001 Root: HKCU; SubKey: Software\OpenLP\OpenLP\songusage; ValueType: dword; ValueName: status; ValueData: $00000001 + + +[Code] +function GetUninstallString(): String; +var + sUnInstPath: String; + sUnInstallString: String; +begin + sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1'); + sUnInstallString := ''; + if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then + RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); + Result := sUnInstallString; +end; + +function IsUpgrade(): Boolean; +begin + Result := (GetUninstallString() <> ''); +end; + +// Return Values: +// 1 - uninstall string is empty +// 2 - error executing the UnInstallString +// 3 - successfully executed the UnInstallString +function UnInstallOldVersion(): Integer; +var + sUnInstallString: String; + iResultCode: Integer; +begin + Result := 0; + sUnInstallString := GetUninstallString(); + if sUnInstallString <> '' then + begin + sUnInstallString := RemoveQuotes(sUnInstallString); + if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then + Result := 3 + else + Result := 2; + end + else + Result := 1; +end; + +procedure CurStepChanged(CurStep: TSetupStep); +begin + if (CurStep=ssInstall) then + begin + if (IsUpgrade()) then + begin + UnInstallOldVersion(); + end; + end; +end; From 668419190ca04e4543c5a0ed679d3af49b479442 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 5 Feb 2011 17:31:13 +0000 Subject: [PATCH 3/4] Theme fixes --- openlp/core/ui/thememanager.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 7a4dda882..e0dbf789a 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -260,7 +260,7 @@ class ThemeManager(QtGui.QWidget): 'You must select a theme to rename.')), unicode(translate('OpenLP.ThemeManager', 'Rename Confirmation')), unicode(translate('OpenLP.ThemeManager', 'Rename %s theme?')), - False): + False, False): item = self.themeListWidget.currentItem() oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString()) self.fileRenameForm.fileNameEdit.setText(oldThemeName) @@ -676,7 +676,7 @@ class ThemeManager(QtGui.QWidget): return theme def _validate_theme_action(self, select_text, confirm_title, confirm_text, - testPlugin=True): + testPlugin=True, confirm=True): """ Check to see if theme has been selected and the destructive action is allowed. @@ -688,12 +688,13 @@ class ThemeManager(QtGui.QWidget): item = self.themeListWidget.currentItem() theme = unicode(item.text()) # confirm deletion - answer = QtGui.QMessageBox.question(self, confirm_title, - confirm_text % theme, QtGui.QMessageBox.StandardButtons( - QtGui.QMessageBox.Yes | QtGui.QMessageBox.No), - QtGui.QMessageBox.No) - if answer == QtGui.QMessageBox.No: - return False + if confirm: + answer = QtGui.QMessageBox.question(self, confirm_title, + confirm_text % theme, QtGui.QMessageBox.StandardButtons( + QtGui.QMessageBox.Yes | QtGui.QMessageBox.No), + QtGui.QMessageBox.No) + if answer == QtGui.QMessageBox.No: + return False # should be the same unless default if theme != unicode(item.data(QtCore.Qt.UserRole).toString()): critical_error_message_box( From aaa7a549e2933cedc41f9c871355c3d9ea0b1b3f Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 5 Feb 2011 21:04:56 +0200 Subject: [PATCH 4/4] Fixed up registry entries in setup script. --- resources/windows/OpenLP-2.0.iss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/windows/OpenLP-2.0.iss b/resources/windows/OpenLP-2.0.iss index fbb36009a..a85b41187 100644 --- a/resources/windows/OpenLP-2.0.iss +++ b/resources/windows/OpenLP-2.0.iss @@ -83,11 +83,10 @@ Root: HKCU; SubKey: Software\OpenLP\OpenLP\custom; ValueType: dword; ValueName: Root: HKCU; SubKey: Software\OpenLP\OpenLP\images; ValueType: dword; ValueName: status; ValueData: $00000001 Root: HKCU; SubKey: Software\OpenLP\OpenLP\media; ValueType: dword; ValueName: status; ValueData: $00000001 Root: HKCU; SubKey: Software\OpenLP\OpenLP\presentations; ValueType: dword; ValueName: status; ValueData: $00000001 -Root: HKCU; SubKey: Software\OpenLP\OpenLP\remotes; ValueType: dword; ValueName: status; ValueData: $00000001 +Root: HKCU; SubKey: Software\OpenLP\OpenLP\remotes; ValueType: dword; ValueName: status; ValueData: $00000000 Root: HKCU; SubKey: Software\OpenLP\OpenLP\songs; ValueType: dword; ValueName: status; ValueData: $00000001 Root: HKCU; SubKey: Software\OpenLP\OpenLP\songusage; ValueType: dword; ValueName: status; ValueData: $00000001 - [Code] function GetUninstallString(): String; var