~ubuntu-branches/ubuntu/precise/gnupg2/precise-proposed

« back to all changes in this revision

Viewing changes to scripts/w32installer.nsi

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Mueller
  • Date: 2005-03-29 10:30:32 UTC
  • Revision ID: james.westby@ubuntu.com-20050329103032-sj42n2ain3ipx310
Tags: upstream-1.9.15
ImportĀ upstreamĀ versionĀ 1.9.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; w32installer.nsi - W32 Installer definition      -*- lisp -*-
 
2
; Copyright (C) 2005 Free Software Foundation, Inc.
 
3
;
 
4
; This file is free software; as a special exception the author gives
 
5
; unlimited permission to copy and/or distribute it, with or without
 
6
; modifications, as long as this notice is preserved.
 
7
;
 
8
; This program is distributed in the hope that it will be useful, but
 
9
; WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 
10
; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
11
 
 
12
;----------------------------------------------------------------------
 
13
; This is an installer script used to create a W32 installer "exe" file
 
14
; using NSIS.  It is usually used by the mk-w32-dist script.
 
15
;----------------------------------------------------------------------
 
16
 
 
17
; TODO:
 
18
; - Display credit for the installer
 
19
; - Provide the location of the corresponding source
 
20
; - Check for iconv.dll and optionalkly install or download it.
 
21
; - Allow inclusion of the source into the installer.
 
22
; - Translate all strings
 
23
; - Setup the home directory and check for old (c:/gnupg located)
 
24
;   versions of the program
 
25
 
 
26
; We use the modern UI.
 
27
!include "MUI.nsh"
 
28
 
 
29
; -------------
 
30
; General stuff
 
31
; -------------
 
32
Name "GNU Privacy Guard"
 
33
 
 
34
OutFile "gnupg-w32cli-${VERSION}.exe"
 
35
 
 
36
InstallDir "$PROGRAMFILES\GNU\GnuPG"
 
37
 
 
38
InstallDirRegKey HKCU "Software\GNU\GnuPG" ""
 
39
 
 
40
SetCompressor lzma
 
41
 
 
42
ReserveFile "COPYING.txt"
 
43
 
 
44
; ------------------
 
45
; Interface Settings
 
46
; ------------------
 
47
 
 
48
!define MUI_ABORTWARNING
 
49
!define MUI_FINISHPAGE_NOAUTOCLOSE
 
50
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
 
51
 
 
52
; Remember the installer language
 
53
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU" 
 
54
!define MUI_LANGDLL_REGISTRY_KEY "Software\GNU\GnuPG" 
 
55
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
 
56
 
 
57
 
 
58
; -----
 
59
; Pages      
 
60
; -----
 
61
 
 
62
!define MUI_WELCOMEPAGE_TEXT "$(T_About)"
 
63
 
 
64
!insertmacro MUI_PAGE_WELCOME
 
65
 
 
66
 
 
67
!define MUI_PAGE_HEADER_SUBTEXT \
 
68
  "This software is licensed under the terms of the GNU General Public \
 
69
   License (GPL) which guarantees your freedom to share and change Free \
 
70
   Software."
 
71
 
 
72
!define MUI_LICENSEPAGE_TEXT_BOTTOM \
 
73
  "In short: You are allowed to run this software for any purpose. \
 
74
   You may distribute it as long as you give the recipients the same \
 
75
   rights you have received."
 
76
 
 
77
!define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)"
 
78
 
 
79
!insertmacro MUI_PAGE_LICENSE "COPYING.txt"
 
80
 
 
81
 
 
82
!insertmacro MUI_PAGE_COMPONENTS
 
83
!insertmacro MUI_PAGE_DIRECTORY
 
84
!insertmacro MUI_PAGE_INSTFILES
 
85
 
 
86
!define MUI_FINISHPAGE_SHOWREADME "README.txt"
 
87
!define MUI_FINISHPAGE_SHOWREADME_TEXT "$(T_ShowReadme)"
 
88
!define MUI_FINISHPAGE_LINK "Goto the GnuPG website"
 
89
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.gnupg.org"
 
90
!insertmacro MUI_PAGE_FINISH
 
91
 
 
92
  
 
93
!insertmacro MUI_UNPAGE_CONFIRM
 
94
!insertmacro MUI_UNPAGE_INSTFILES
 
95
 
 
96
 
 
97
; -----------------
 
98
; i18n Declarations
 
99
; -----------------
 
100
 
 
101
!insertmacro MUI_LANGUAGE "English"
 
102
!insertmacro MUI_LANGUAGE "German"
 
103
 
 
104
; ------------------
 
105
; Installer Sections
 
106
; ------------------
 
107
 
 
108
;InstType "full"
 
109
;InstType "minimal"
 
110
 
 
111
;----------------------
 
112
Section "Base" SecBase
 
113
;  SectionIn 1 2 RO
 
114
  SectionIn RO
 
115
 
 
116
  SetOutPath "$INSTDIR"
 
117
 
 
118
  File "README.txt"
 
119
  File "README.W32"
 
120
  File "COPYING.txt"
 
121
  File "gpg.exe"
 
122
  File "gpgkeys_finger.exe"
 
123
  File "gpgkeys_hkp.exe"
 
124
  File "gpgkeys_http.exe"
 
125
  File "gpgkeys_ldap.exe"
 
126
  File "*.mo"
 
127
 
 
128
  WriteRegStr HKCU "Software\GNU\GnuPG" "" $INSTDIR
 
129
 
 
130
  WriteUninstaller "$INSTDIR\Uninstall.exe"
 
131
  
 
132
SectionEnd ; Section Base
 
133
 
 
134
;------------------------
 
135
Section "Tools" SecTools
 
136
;  SectionIn 1
 
137
 
 
138
  File "gpgsplit.exe"
 
139
  File "gpgv.exe"
 
140
 
 
141
SectionEnd ; Section Tools
 
142
 
 
143
;----------------------
 
144
Section "Documentation" SecDoc
 
145
;  SectionIn 1
 
146
 
 
147
  File "gnupg.man"
 
148
  File "gpg.man"
 
149
  File "gpgv.man"
 
150
  File "NEWS.txt"
 
151
  File "FAQ.txt"
 
152
 
 
153
SectionEnd ; Section Documentation
 
154
 
 
155
 
 
156
;------------------
 
157
!ifdef WITH_SOURCE
 
158
Section "Source" SecSource
 
159
 
 
160
   ; Note that we include the uncompressed tarball because this allows
 
161
   ; far better compression results for the distribution.  We might
 
162
   ; want to compress it again after installation.
 
163
   File "gnupg-1.4.0.tar"
 
164
 
 
165
SectionEnd ; Section Source
 
166
!endif
 
167
 
 
168
 
 
169
;------------------
 
170
Section "Uninstall"
 
171
 
 
172
  Delete "$INSTDIR\README.txt"
 
173
  Delete "$INSTDIR\README.W32"
 
174
  Delete "$INSTDIR\COPYING.txt"
 
175
  Delete "$INSTDIR\gpg.exe"
 
176
  Delete "$INSTDIR\gpgkeys_finger.exe"
 
177
  Delete "$INSTDIR\gpgkeys_hkp.exe"
 
178
  Delete "$INSTDIR\gpgkeys_http.exe"
 
179
  Delete "$INSTDIR\gpgkeys_ldap.exe"
 
180
  Delete "$INSTDIR\*.mo"
 
181
  Delete "$INSTDIR\gpgsplit.exe"
 
182
  Delete "$INSTDIR\gpgv.exe"
 
183
  Delete "$INSTDIR\gnupg.man"
 
184
  Delete "$INSTDIR\gpg.man"
 
185
  Delete "$INSTDIR\gpgv.man"
 
186
  Delete "$INSTDIR\NEWS.txt"
 
187
  Delete "$INSTDIR\FAQ.txt"
 
188
 
 
189
  Delete "$INSTDIR\Uninstall.exe"
 
190
 
 
191
  RMDir "$INSTDIR"
 
192
 
 
193
  DeleteRegKey /ifempty HKCU "Software\GNU\GnuPG"
 
194
 
 
195
SectionEnd ; Uninstall
 
196
 
 
197
 
 
198
; ---------
 
199
; Functions
 
200
; ---------
 
201
 
 
202
Function .onInit
 
203
 
 
204
  !insertmacro MUI_LANGDLL_DISPLAY
 
205
 
 
206
FunctionEnd 
 
207
 
 
208
 
 
209
Function un.onInit
 
210
 
 
211
  !insertmacro MUI_UNGETLANGUAGE
 
212
  
 
213
FunctionEnd
 
214
 
 
215
 
 
216
; ------------
 
217
; Descriptions
 
218
; ------------
 
219
 
 
220
 
 
221
LangString T_About ${LANG_ENGLISH} \
 
222
  "GnuPG is GNU's tool for secure communication and data storage. \
 
223
  It can be used to encrypt data and to create digital signatures. \
 
224
  It includes an advanced key management facility and is compliant \
 
225
  with the proposed OpenPGP Internet standard as described in RFC2440."
 
226
LangString T_About ${LANG_GERMAN} \
 
227
  "GnuPG is das Werzeug aus dem GNU Projekt zur sicheren Kommunikation \
 
228
   sowie zum sicheren Speichern von Daten."
 
229
LangString T_ShowReadme ${LANG_ENGLISH} "Show the README file"
 
230
LangString T_ShowReadme ${LANG_GERMAN} "Die README Datei anzeigen"
 
231
 
 
232
 
 
233
LangString DESC_SecBase ${LANG_ENGLISH} \
 
234
      "The basic files used for the standard OpenPGP protocol"
 
235
LangString DESC_SecBase ${LANG_GERMAN} \
 
236
      "Die Basis Dateien zur Benutzung des OpenPGP Protokolls"
 
237
 
 
238
LangString DESC_SecTools ${LANG_ENGLISH} \
 
239
      "Extra tools like gpgv and gpgsplit"
 
240
LangString DESC_SecTools ${LANG_GERMAN} \
 
241
      "Weitere Tools wie gpgv und gpgsplit"
 
242
 
 
243
LangString DESC_SecDoc ${LANG_ENGLISH} \
 
244
      "Manual pages and a FAQ"
 
245
LangString DESC_SecDoc ${LANG_GERMAN} \
 
246
      "Handbuchseiten und eine FAQ"
 
247
 
 
248
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
 
249
  !insertmacro MUI_DESCRIPTION_TEXT ${SecBase} $(DESC_SecBase)
 
250
  !insertmacro MUI_DESCRIPTION_TEXT ${SecTools} $(DESC_SecTools)
 
251
  !insertmacro MUI_DESCRIPTION_TEXT ${SecDoc} $(DESC_SecDoc)
 
252
!insertmacro MUI_FUNCTION_DESCRIPTION_END
 
253