0
|
1 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
2 |
;;
|
|
3 |
;; Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
;; All rights reserved.
|
|
5 |
;; Contact: Nokia Corporation (qt-info@nokia.com)
|
|
6 |
;;
|
|
7 |
;; This file is part of the tools applications of the Qt Toolkit.
|
|
8 |
;;
|
|
9 |
;; $QT_BEGIN_LICENSE:LGPL$
|
|
10 |
;; No Commercial Usage
|
|
11 |
;; This file contains pre-release code and may not be distributed.
|
|
12 |
;; You may use this file in accordance with the terms and conditions
|
|
13 |
;; contained in the Technology Preview License Agreement accompanying
|
|
14 |
;; this package.
|
|
15 |
;;
|
|
16 |
;; GNU Lesser General Public License Usage
|
|
17 |
;; Alternatively, this file may be used under the terms of the GNU Lesser
|
|
18 |
;; General Public License version 2.1 as published by the Free Software
|
|
19 |
;; Foundation and appearing in the file LICENSE.LGPL included in the
|
|
20 |
;; packaging of this file. Please review the following information to
|
|
21 |
;; ensure the GNU Lesser General Public License version 2.1 requirements
|
|
22 |
;; will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
23 |
;;
|
|
24 |
;; In addition, as a special exception, Nokia gives you certain additional
|
|
25 |
;; rights. These rights are described in the Nokia Qt LGPL Exception
|
|
26 |
;; version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
27 |
;;
|
|
28 |
;; If you have questions regarding the use of this file, please contact
|
|
29 |
;; Nokia at qt-info@nokia.com.
|
|
30 |
;;
|
|
31 |
;;
|
|
32 |
;;
|
|
33 |
;;
|
|
34 |
;;
|
|
35 |
;;
|
|
36 |
;;
|
|
37 |
;;
|
|
38 |
;; $QT_END_LICENSE$
|
|
39 |
;;
|
|
40 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
41 |
!include "StrFunc.nsh"
|
|
42 |
!include "includes\list.nsh"
|
|
43 |
|
|
44 |
${StrCase}
|
|
45 |
${StrTrimNewLines}
|
|
46 |
${StrStr}
|
|
47 |
${StrRep}
|
|
48 |
${UnStrRep}
|
|
49 |
|
|
50 |
var STARTMENU_STRING
|
|
51 |
var PRODUCT_UNIQUE_KEY
|
|
52 |
var RUNNING_AS_ADMIN
|
|
53 |
|
|
54 |
!ifndef MODULE_MINGW
|
|
55 |
!ifdef MODULE_MSVC_VC60
|
|
56 |
!define INSTALL_COMPILER "vc60"
|
|
57 |
!else
|
|
58 |
!ifdef MODULE_MSVC_VS2002
|
|
59 |
!define INSTALL_COMPILER "vs2002"
|
|
60 |
!else
|
|
61 |
!ifdef MODULE_MSVC_VS2005
|
|
62 |
!define INSTALL_COMPILER "vs2005"
|
|
63 |
!else
|
|
64 |
!define INSTALL_COMPILER "vs2003"
|
|
65 |
!endif
|
|
66 |
!endif
|
|
67 |
!endif
|
|
68 |
!else
|
|
69 |
!define INSTALL_COMPILER "mingw"
|
|
70 |
!endif
|
|
71 |
|
|
72 |
; ADDIN\INTEGRATION
|
|
73 |
var VS_VERSION
|
|
74 |
var VS_VERSION_SHORT
|
|
75 |
var ADDIN_INSTDIR
|
|
76 |
var VSIP_INSTDIR
|
|
77 |
var HELP_INSTDIR
|
|
78 |
var ECLIPSE_INSTDIR
|
|
79 |
var QTJAMBIECLIPSE_INSTDIR
|
|
80 |
|
|
81 |
; LICENSECHECK
|
|
82 |
var LICENSE_KEY
|
|
83 |
var LICENSEE
|
|
84 |
var LICENSE_PRODUCT
|
|
85 |
var LICENSE_FILE
|
|
86 |
|
|
87 |
; MSVC
|
|
88 |
!ifdef MODULE_MSVC
|
|
89 |
!define MSVC_ValidateDirectory
|
|
90 |
var MSVC_INSTDIR
|
|
91 |
!endif
|
|
92 |
|
|
93 |
; MINGW
|
|
94 |
!ifdef MODULE_MINGW
|
|
95 |
!define MINGW_ValidateDirectory
|
|
96 |
var MINGW_INSTDIR
|
|
97 |
!endif
|
|
98 |
|
|
99 |
; QSA
|
|
100 |
var QSA_INSTDIR
|
|
101 |
|
|
102 |
; QTDIR PAGE
|
|
103 |
var QTDIR_SELECTED
|
|
104 |
var COMPILER_SELECTED
|
|
105 |
|
|
106 |
; used by addin7x and vsip
|
|
107 |
!ifndef MODULE_VSIP_ROOT
|
|
108 |
!define MODULE_VSIP_ROOT "${INSTALL_ROOT}\vsip"
|
|
109 |
!endif
|
|
110 |
|
|
111 |
; add to confirm path
|
|
112 |
var UninstallerConfirmProduct
|
|
113 |
|
|
114 |
Function un.ConfirmOnDelete
|
|
115 |
exch $0
|
|
116 |
push $1
|
|
117 |
|
|
118 |
push "$0"
|
|
119 |
push "$UninstallerConfirmProduct"
|
|
120 |
call un.ItemInList
|
|
121 |
pop $1
|
|
122 |
IntCmp $1 1 ConfirmOnDeleteDone
|
|
123 |
|
|
124 |
strcmp "$UninstallerConfirmProduct" "" 0 +3
|
|
125 |
strcpy $UninstallerConfirmProduct "$0"
|
|
126 |
goto +2
|
|
127 |
strcpy $UninstallerConfirmProduct "$UninstallerConfirmProduct$\r$\n$0"
|
|
128 |
|
|
129 |
ConfirmOnDeleteDone:
|
|
130 |
pop $1
|
|
131 |
pop $0
|
|
132 |
FunctionEnd
|
|
133 |
|
|
134 |
!macro ConfirmOnRemove REG_KEY PRODUCT_NAME
|
|
135 |
push $0
|
|
136 |
ClearErrors
|
|
137 |
ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "${REG_KEY}"
|
|
138 |
intcmp $0 1 0 +3
|
|
139 |
push "${PRODUCT_NAME}"
|
|
140 |
call un.ConfirmOnDelete
|
|
141 |
ClearErrors
|
|
142 |
pop $0
|
|
143 |
!macroend
|