View Issue Details [ Jump to Notes ] | [ Print ] |
ID | Project | Category | View Status | Date Submitted | Last Update |
0014124 | CMake | CPack | public | 2013-05-02 09:52 | 2013-10-07 10:09 |
|
Reporter | David Golub | |
Assigned To | Brad King | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | Microsoft | OS | Windows | OS Version | 7 |
Product Version | CMake 2.8.10.2 | |
Target Version | | Fixed in Version | | |
|
Summary | 0014124: NSIS installer uninstalls from incorrect directory |
Description | When CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL is set, the installer tries to uninstall the old version from the default installation path for the new version, rather than using the path from the registry where the old version is installed. Therefore, if it is installed to a different directory, it won't get properly uninstalled. I'm submitted a patch to fix this issue. |
Tags | No tags attached. |
|
Attached Files | 0001-CPack-NSIS-Obtain-path-from-which-to-uninstall-from-.patch [^] (875 bytes) 2013-05-02 09:52 [Show Content] [Hide Content]From 8b54264048cd0035adc244640ec29615b146ab1b Mon Sep 17 00:00:00 2001
From: David Golub <golubdr@gmail.com>
Date: Thu, 2 May 2013 09:47:08 -0400
Subject: [PATCH] CPack/NSIS: Obtain path from which to uninstall from
registry.
---
Modules/NSIS.template.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index 59a444b..76310af 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -916,7 +916,9 @@ Function .onInit
;Run the uninstaller
uninst:
ClearErrors
- ExecWait '$0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
+ StrLen $2 "\Uninstall.exe"
+ StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path
+ ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file
IfErrors uninst_failed inst
uninst_failed:
--
1.8.1.msysgit.1
|
|