source: branches/4.5.1/tools/installer/nsis/includes/global.nsh

Last change on this file was 2, checked in by Dmitry A. Kuminov, 17 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

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