XEmacs 21.4.21.
[chise/xemacs-chise.git.1] / nt / XEmacs.iss
1 ; This script generates an installation kit for a Windows-native XEmacs, 21.4 and 21.5.
2 ; This script runs with Inno Setup version 5.1.6, see http://www.jrsoftware.org/ for more info.
3 ; This script requires the Inno Setup pre-processor.
4 ;
5 ; Version History
6 ; 2007-09-26  Vin Shelton <acs@xemacs.org>    Remove setting of package-get-always-update and miscellaneous cleanup.
7 ; 2007-09-25  Vin Shelton <acs@xemacs.org>    Put comment wrapper around site-start.el changes and remove them on uninstall.
8 ;                                             Enable ftp.xemacs.org for packages and set path to ftp.exe in site-start.el.
9 ; 2007-09-06  Vin Shelton <acs@xemacs.org>    Added easypg.
10 ; 2006-04-06  Vin Shelton <acs@xemacs.org>    Changed defaults for ExecSrc and PkgSrc.
11 ;                                             Don't set 'Start in' property.
12 ; 2006-04-02  Vin Shelton <acs@xemacs.org>    Set 'Start in' property for shortcuts to 'My Documents' directory.
13 ; 2006-03-03  Vin Shelton <acs@xemacs.org>    Support for 21.5.  Added packages as separate components.
14 ; 2006-01-28  Vin Shelton <acs@xemacs.org>    Erase unused registry code.
15 ; 2006-01-26  Vin Shelton <acs@xemacs.org>    Don't append XEmacs binary directory to system path.
16 ; 2006-01-21  Vin Shelton <acs@xemacs.org>    Append XEmacs binary directory to system path; this is not currently deleted on uninstall.
17 ;                                             Get built kit from C:\XEmacs-built.
18 ; 2005-12-26  Vin Shelton <acs@xemacs.org>    Packages are now installed directly into {app}\xemacs-packages, etc.  As of 21.4.19, the package root is found automatically, so EMACSPACKAGEPATH is no longer necessary.
19 ; 2005-12-17  Vin Shelton <acs@xemacs.org>    Move packages out of the version-specific tree.
20 ; 2005-12-13  Vin Shelton <acs@xemacs.org>    Created.
21
22 ; Allow undefined identifiers, e.g. 'KitName'
23 #pragma parseroption -u+
24
25 ;#define QUICKIE_TEST
26
27 #ifndef XEmacsVersion
28   #define XEmacsVersion  "21.4.20"
29 #endif
30 ;#define KitName     "-2"
31 #ifndef ExecSrc
32   #define ExecSrc     "installed"
33 #endif
34 #ifndef PkgSrc
35   #define PkgSrc      "packages"
36 #endif
37
38 [Setup]
39 AllowNoIcons=yes
40 AppName=XEmacs
41 AppVerName=XEmacs {#XEmacsVersion}
42 AppPublisher=XEmacs Development Team
43 AppPublisherURL=http://www.xemacs.org
44 AppSupportURL=http://www.xemacs.org
45 AppUpdatesURL=http://www.xemacs.org
46 Compression=lzma
47 DefaultDirName={pf}\XEmacs
48 DefaultGroupName=XEmacs
49 InfoBeforeFile=ReadMe-{#XEmacsVersion}
50 OutputDir=.
51 OutputBaseFilename=XEmacs_Setup_{#XEmacsVersion}{#KitName}
52 SolidCompression=yes
53 UninstallFilesDir={app}/XEmacs-{#XEmacsVersion}
54
55 [Languages]
56 Name: "english"; MessagesFile: "compiler:Default.isl"
57
58 [Messages]
59 StatusRunProgram=Unpacking selected packages...
60
61 [Tasks]
62 Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
63 Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
64
65 [Files]
66 ; Always installed
67 Source: "{#ExecSrc}\XEmacs-{#XEmacsVersion}\*"; DestDir: "{app}\XEmacs-{#XEmacsVersion}"; Flags: ignoreversion recursesubdirs
68 Source: "{#PkgSrc}\efs-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion
69 Source: "{#PkgSrc}\xemacs-base-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion
70 ; minitar.exe and unpack.cmd are used to unpack the packages
71 Source: "{#ExecSrc}\XEmacs-{#XEmacsVersion}\i586-pc-win32\minitar.exe"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion
72 Source: "unpack.cmd"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion
73 Source: "{#PkgSrc}\package-index.LATEST.gpg"; DestDir: "{app}";
74 #ifndef QUICKIE_TEST
75 ; Recommended
76 Source: "{#PkgSrc}\c-support-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: c_support; Flags: ignoreversion
77 Source: "{#PkgSrc}\cc-mode-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: cc_mode; Flags: ignoreversion
78 Source: "{#PkgSrc}\debug-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: debug; Flags: ignoreversion
79 Source: "{#PkgSrc}\dired-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: dired; Flags: ignoreversion
80 Source: "{#PkgSrc}\ecb-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ecb; Flags: ignoreversion
81 Source: "{#PkgSrc}\edebug-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: edebug; Flags: ignoreversion
82 Source: "{#PkgSrc}\ediff-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ediff; Flags: ignoreversion
83 Source: "{#PkgSrc}\edit-utils-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: edit_utils; Flags: ignoreversion
84 Source: "{#PkgSrc}\eieio-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: eieio; Flags: ignoreversion
85 Source: "{#PkgSrc}\fsf-compat-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: fsf_compat; Flags: ignoreversion
86 Source: "{#PkgSrc}\mail-lib-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: mail_lib; Flags: ignoreversion
87 Source: "{#PkgSrc}\net-utils-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: net_utils; Flags: ignoreversion
88 Source: "{#PkgSrc}\os-utils-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: os_utils; Flags: ignoreversion
89 Source: "{#PkgSrc}\pc-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: pc; Flags: ignoreversion
90 Source: "{#PkgSrc}\perl-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: perl_modes; Flags: ignoreversion
91 Source: "{#PkgSrc}\prog-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: prog_modes; Flags: ignoreversion
92 Source: "{#PkgSrc}\semantic-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: semantic; Flags: ignoreversion
93 Source: "{#PkgSrc}\sh-script-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sh_script; Flags: ignoreversion
94 Source: "{#PkgSrc}\sounds-wav-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sounds_wav; Flags: ignoreversion
95 Source: "{#PkgSrc}\speedbar-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: speedbar; Flags: ignoreversion
96 Source: "{#PkgSrc}\texinfo-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: texinfo; Flags: ignoreversion
97 Source: "{#PkgSrc}\text-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: text_modes; Flags: ignoreversion
98 Source: "{#PkgSrc}\time-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: time; Flags: ignoreversion
99 Source: "{#PkgSrc}\xemacs-devel-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: xemacs_devel; Flags: ignoreversion
100 ; Optional
101 Source: "{#PkgSrc}\auctex-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: auctex; Flags: ignoreversion
102 Source: "{#PkgSrc}\bbdb-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: bbdb; Flags: ignoreversion
103 Source: "{#PkgSrc}\calc-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: calc; Flags: ignoreversion
104 Source: "{#PkgSrc}\easypg-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: easypg; Flags: ignoreversion
105 Source: "{#PkgSrc}\ecrypto-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ecrypto; Flags: ignoreversion
106 Source: "{#PkgSrc}\elib-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: elib; Flags: ignoreversion
107 Source: "{#PkgSrc}\emerge-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: emerge; Flags: ignoreversion
108 Source: "{#PkgSrc}\eshell-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: eshell; Flags: ignoreversion
109 Source: "{#PkgSrc}\footnote-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: footnote; Flags: ignoreversion
110 Source: "{#PkgSrc}\fortran-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: fortran_modes; Flags: ignoreversion
111 Source: "{#PkgSrc}\gnus-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: gnus; Flags: ignoreversion
112 Source: "{#PkgSrc}\hm--html-menus-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: hm__html_menus; Flags: ignoreversion
113 Source: "{#PkgSrc}\ibuffer-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ibuffer; Flags: ignoreversion
114 Source: "{#PkgSrc}\igrep-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: igrep; Flags: ignoreversion
115 Source: "{#PkgSrc}\ispell-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ispell; Flags: ignoreversion
116 Source: "{#PkgSrc}\jde-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: jde; Flags: ignoreversion
117 Source: "{#PkgSrc}\mailcrypt-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: mailcrypt; Flags: ignoreversion
118 Source: "{#PkgSrc}\mh-e-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: mh_e; Flags: ignoreversion
119 Source: "{#PkgSrc}\mmm-mode-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: mmm_mode; Flags: ignoreversion
120 Source: "{#PkgSrc}\pcl-cvs-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: pcl_cvs; Flags: ignoreversion
121 Source: "{#PkgSrc}\pcomplete-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: pcomplete; Flags: ignoreversion
122 Source: "{#PkgSrc}\ps-print-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ps_print; Flags: ignoreversion
123 Source: "{#PkgSrc}\psgml-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: psgml; Flags: ignoreversion
124 Source: "{#PkgSrc}\python-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: python_modes; Flags: ignoreversion
125 Source: "{#PkgSrc}\re-builder-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: re_builder; Flags: ignoreversion
126 Source: "{#PkgSrc}\reftex-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: reftex; Flags: ignoreversion
127 Source: "{#PkgSrc}\ruby-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ruby_modes; Flags: ignoreversion
128 Source: "{#PkgSrc}\sasl-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sasl; Flags: ignoreversion
129 Source: "{#PkgSrc}\scheme-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: scheme; Flags: ignoreversion
130 Source: "{#PkgSrc}\sgml-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sgml; Flags: ignoreversion
131 Source: "{#PkgSrc}\sieve-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sieve; Flags: ignoreversion
132 Source: "{#PkgSrc}\supercite-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: supercite; Flags: ignoreversion
133 Source: "{#PkgSrc}\textools-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: textools; Flags: ignoreversion
134 Source: "{#PkgSrc}\tramp-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: tramp; Flags: ignoreversion
135 Source: "{#PkgSrc}\vc-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: vc; Flags: ignoreversion
136 Source: "{#PkgSrc}\vhdl-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: vhdl; Flags: ignoreversion
137 Source: "{#PkgSrc}\viper-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: viper; Flags: ignoreversion
138 Source: "{#PkgSrc}\vm-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: vm; Flags: ignoreversion
139 Source: "{#PkgSrc}\w3-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: w3; Flags: ignoreversion
140 Source: "{#PkgSrc}\x-symbol-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: x_symbol; Flags: ignoreversion
141 Source: "{#PkgSrc}\xetla-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: xetla; Flags: ignoreversion
142 Source: "{#PkgSrc}\xslide-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: xslide; Flags: ignoreversion
143 Source: "{#PkgSrc}\xslt-process-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: xslt_process; Flags: ignoreversion
144 #endif  // ifndef QUICKIE_TEST
145 #ifdef MULE
146 Source: "{#PkgSrc}\latin-euro-standards-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: latin_euro_standards; Flags: ignoreversion
147 Source: "{#PkgSrc}\latin-unity-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: latin_unity; Flags: ignoreversion
148 Source: "{#PkgSrc}\locale-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: locale; Flags: ignoreversion
149 Source: "{#PkgSrc}\lookup-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: lookup; Flags: ignoreversion
150 Source: "{#PkgSrc}\mule-base-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: mule_base; Flags: ignoreversion
151 #endif
152
153 [Types]
154 Name: "recommended"; Description: "Recommended installation"
155 Name: "complete"; Description: "Install XEmacs {#XEmacsVersion} and all packages"
156 Name: "minimal"; Description: "Minimalist installation"
157 Name: "custom"; Description: "Custom installation"; Flags: iscustom
158
159 [Components]
160 Name: "base"; Description: "XEmacs {#XEmacsVersion} executable and essential support files"; Types: complete minimal recommended custom; Flags: fixed
161 Name: "auctex"; Description: "auctex: Basic TeX/LaTeX support"; Types: complete custom
162 Name: "bbdb"; Description: "bbdb: The Big Brother Data Base"; Types: complete custom
163 Name: "c_support"; Description: "c-support: Basic single-file add-ons for editing C code"; Types: complete recommended custom
164 Name: "calc"; Description: "calc: Emacs calculator"; Types: complete custom
165 Name: "cc_mode"; Description: "cc-mode: C, C++, etc language support"; Types: complete recommended custom
166 Name: "debug"; Description: "debug: GUD, gdb, dbx debugging support"; Types: complete recommended custom
167 Name: "dired"; Description: "dired: Manage file systems"; Types: complete recommended custom
168 Name: "ecb"; Description: "ecb: Emacs source code browser"; Types: complete recommended custom
169 Name: "easypg"; Description: "easypg: GnuPG interface for Emacs"; Types: complete custom
170 Name: "ecrypto"; Description: "ecrypto: Crypto functionality in Emacs Lisp"; Types: complete custom
171 Name: "edebug"; Description: "edebug: An Emacs Lisp debugger"; Types: complete recommended custom
172 Name: "ediff"; Description: "ediff: Interface over GNU patch"; Types: complete recommended custom
173 Name: "edit_utils"; Description: "edit-utils: Miscellaneous editor extensions, you probably need this"; Types: complete minimal recommended custom
174 Name: "efs"; Description: "efs: Edit files on other computers"; Types: complete minimal recommended custom; Flags: fixed
175 Name: "eieio"; Description: "eieio: Enhanced Implementation of Emacs Interpreted Objects"; Types: complete recommended custom
176 Name: "elib"; Description: "elib: Portable Emacs Lisp utilities library"; Types: complete custom
177 Name: "emerge"; Description: "emerge: Another interface over GNU patch"; Types: complete custom
178 Name: "eshell"; Description: "eshell: Command shell implemented in Emacs Lisp"; Types: complete custom
179 Name: "footnote"; Description: "footnote: Footnoting in mail message editing modes"; Types: complete custom
180 Name: "fortran_modes"; Description: "fortran-modes: Fortran support"; Types: complete custom
181 Name: "fsf_compat"; Description: "fsf-compat: FSF Emacs compatibility files"; Types: complete recommended custom
182 Name: "gnus"; Description: "gnus: The Gnus Newsreader and Mailreader"; Types: complete custom
183 Name: "hm__html_menus"; Description: "hm--html-menus: HTML editing"; Types: complete custom
184 Name: "ibuffer"; Description: "ibuffer: Advanced replacement for buffer-menu"; Types: complete custom
185 Name: "igrep"; Description: "igrep: Enhanced front-end for Grep"; Types: complete custom
186 Name: "ispell"; Description: "ispell: Spell-checking with GNU ispell"; Types: complete custom
187 Name: "jde"; Description: "jde: Integrated Development Environment for Java"; Types: complete custom
188 #ifdef MULE
189 Name: "latin_euro_standards"; Description: "latin-euro-standards: Support for the Latin character sets (MULE)"; Types: complete recommended custom
190 Name: "latin_unity"; Description: "latin-unity: Find single ISO 8859 character set to encode a buffer (MULE)"; Types: complete recommended custom
191 Name: "locale"; Description: "locale: Localized menubars and localized splash screens (MULE)"; Types: complete recommended custom
192 Name: "lookup"; Description: "lookup: Dictionary support (MULE)"; Types: complete recommended custom
193 #endif
194 Name: "mail_lib"; Description: "mail-lib: Fundamental lisp files for providing email support"; Types: complete recommended custom
195 Name: "mailcrypt"; Description: "mailcrypt: Support for messaging encryption with PGP"; Types: complete custom
196 Name: "mh_e"; Description: "mh-e: Interface to the MH Mail System"; Types: complete custom
197 Name: "mmm_mode"; Description: "mmm-mode: Multiple major modes in a single buffer"; Types: complete custom
198 #ifdef MULE
199 Name: "mule_base"; Description: "mule-base: Basic MULE support"; Types: complete recommended custom
200 #endif
201 Name: "net_utils"; Description: "net-utils: Miscellaneous Networking Utilities"; Types: complete recommended custom
202 Name: "os_utils"; Description: "os-utils: Miscellaneous O/S utilities"; Types: complete recommended custom
203 Name: "pc"; Description: "pc: PC style interface emulation"; Types: complete recommended custom
204 Name: "pcl_cvs"; Description: "pcl-cvs: CVS frontend"; Types: complete custom
205 Name: "pcomplete"; Description: "pcomplete: Provides programmatic completion"; Types: complete custom
206 Name: "perl_modes"; Description: "perl-modes: Perl support"; Types: complete recommended custom
207 Name: "prog_modes"; Description: "prog-modes: Support for various programming languages"; Types: complete recommended custom
208 Name: "ps_print"; Description: "ps-print: Printing functions and utilities"; Types: complete custom
209 Name: "psgml"; Description: "psgml: Validated HTML/SGML editing"; Types: complete custom
210 Name: "python_modes"; Description: "python-modes: Python support"; Types: complete custom
211 Name: "re_builder"; Description: "re-builder: Build regular expressions"; Types: complete custom
212 Name: "reftex"; Description: "reftex: LaTeX cross-references and citations"; Types: complete custom
213 Name: "ruby_modes"; Description: "ruby-modes: Ruby support"; Types: complete custom
214 Name: "sasl"; Description: "sasl: Simple Authentication and Security Layer (SASL) library"; Types: complete custom
215 Name: "scheme"; Description: "scheme: Front-end support for Inferior Scheme"; Types: complete custom
216 Name: "semantic"; Description: "semantic: Semantic bovinator (Yacc/Lex for XEmacs)"; Types: complete recommended custom
217 Name: "sgml"; Description: "sgml: SGML/Linuxdoc-SGML editing"; Types: complete custom
218 Name: "sh_script"; Description: "sh-script: Support for editing shell scripts"; Types: complete recommended custom
219 Name: "sieve"; Description: "sieve: Manage Sieve email filtering scripts"; Types: complete custom
220 Name: "sounds_wav"; Description: "sounds-wav: XEmacs Microsoft sound files"; Types: complete recommended custom
221 Name: "speedbar"; Description: "speedbar: Provides a separate frame with convenient references"; Types: complete recommended custom
222 Name: "supercite"; Description: "supercite: Citation tool for news & mail messages"; Types: complete custom
223 Name: "texinfo"; Description: "texinfo: XEmacs TeXinfo support"; Types: complete minimal recommended custom
224 Name: "text_modes"; Description: "text-modes: Miscellaneous support for editing text files"; Types: complete recommended custom
225 Name: "textools"; Description: "textools: Miscellaneous TeX support"; Types: complete custom
226 Name: "time"; Description: "time: Display time & date on the modeline"; Types: complete recommended custom
227 Name: "tramp"; Description: "tramp: Remote shell-based file editing"; Types: complete custom
228 Name: "vc"; Description: "vc: Version Control for Free systems"; Types: complete custom
229 Name: "vhdl"; Description: "vhdl: Support for VHDL"; Types: complete custom
230 Name: "viper"; Description: "viper: VI emulation support"; Types: complete custom
231 Name: "vm"; Description: "vm: An Emacs mailer"; Types: complete custom
232 Name: "w3"; Description: "w3: A Web browser"; Types: complete custom
233 Name: "x_symbol"; Description: "x-symbol: Semi WYSIWYG for LaTeX and HTML"; Types: complete custom
234 Name: "xemacs_base"; Description: "xemacs-base: Basic XEmacs support";  Types: complete minimal recommended custom; Flags: fixed
235 Name: "xemacs_devel"; Description: "xemacs-devel: Emacs Lisp developer support"; Types: complete recommended custom
236 Name: "xetla"; Description: "xetla: XEmacs support for GNU/arch (tla)"; Types: complete custom
237 Name: "xslide"; Description: "xslide: XSL editing support"; Types: complete custom
238 Name: "xslt_process"; Description: "xslt-process: XSLT processing support"; Types: complete custom
239
240 [INI]
241
242 [Icons]
243 Name: "{group}\XEmacs-{#XEmacsVersion}"; Filename: "{app}\XEmacs-{#XEmacsVersion}\i586-pc-win32\xemacs.exe"
244 Name: "{group}\{cm:UninstallProgram,XEmacs-{#XEmacsVersion}}"; Filename: "{uninstallexe}"
245 ; WorkingDir corresponds to the 'Start in' property.
246 Name: "{userdesktop}\XEmacs-{#XEmacsVersion}"; Filename: "{app}\XEmacs-{#XEmacsVersion}\i586-pc-win32\xemacs.exe"; Tasks: desktopicon
247 Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\XEmacs-{#XEmacsVersion}"; Filename: "{app}\XEmacs-{#XEmacsVersion}\i586-pc-win32\xemacs.exe"; Tasks: quicklaunchicon
248
249 [Run]
250 ; Unpack and delete the package tarballs
251 Filename: "{app}\xemacs-packages\unpack.cmd"; WorkingDir: "{app}\xemacs-packages"; Flags: runhidden;  AfterInstall: AfterInstall
252
253 [UninstallDelete]
254
255 [Code]
256 Const
257   SiteStartFooter = ';;; End of XEmacs_Setup addition' + #10;
258   SiteStartHeader = #10 + ';;; Lines added by XEmacs_Setup' + #10;
259   SubKeyName = 'Software\XEmacs\XEmacs';
260   ValueName = 'EMACSPACKAGEPATH';
261
262 // Internal Declarations
263 procedure AfterInstall(); forward;
264 procedure CleanupPackagePath(); forward;
265 procedure CreateSiteStart(); forward;
266 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); forward;
267 procedure RemovePackagePathSetting(RootKey: Integer); forward;
268 procedure RemoveSiteStartModifications(); forward;
269
270
271 procedure AfterInstall();
272 begin
273   CreateSiteStart;
274   CleanupPackagePath;
275 end;
276
277 procedure CleanupPackagePath();
278 begin
279   RemovePackagePathSetting(HKEY_CURRENT_USER);
280   RemovePackagePathSetting(HKEY_LOCAL_MACHINE);
281 end;
282
283 // Create a site-start.el file to allow easy package downloading
284 procedure CreateSiteStart();
285 var
286   Contents: String;
287   FtpExe: String;
288   HeaderRequired, FooterRequired: Boolean;
289   InsertPos: Integer;
290   InstallBase: String;
291   Payload: String;
292   SiteStart: String;
293 begin
294
295   // Here's what we're going to add to lisp\site-start.el:
296   //   ;;; Lines added by XEmacs_Setup
297   //   (setq package-get-package-index-file-location "C:/Program Files/XEmacs")
298   //   (setq package-get-remote '("ftp.xemacs.org" "pub/xemacs/packages"))
299   //   (setq efs-ftp-program-name "C:/WINDOWS/system32/ftp.exe")
300   //   ;;; End of XEmacs_Setup addition
301
302   SiteStart := ExpandConstant('{app}') + '\site-packages';
303   CreateDir(SiteStart);
304   SiteStart := SiteStart + '\lisp';
305   CreateDir(SiteStart);
306   SiteStart := SiteStart + '\site-start.el';
307
308   // Optimize for the most common cases: either site-start.el does not contain anything related to XEmacs setup
309   // or site-start.el contains the entire text verbatim.
310
311   // Convert separators from backslash to slash
312   InstallBase := ExpandConstant('{app}');
313   StringChange(InstallBase, '\', '/');
314   FtpExe := ExpandConstant('{syswow64}') + '\ftp.exe';
315   StringChange(FtpExe, '\', '/');
316   Payload := '(setq package-get-package-index-file-location "' + InstallBase + '")' + #10 +
317              '(setq package-get-remote ' + Chr(39) + '("ftp.xemacs.org" "pub/xemacs/packages"))' + #10
318              '(setq efs-ftp-program-name "' + FtpExe + '")' + #10;
319
320   // File is non-existant - write header, payload and footer
321   if NOT LoadStringFromFile(SiteStart, Contents) then
322   begin
323     SaveStringToFile(SiteStart, SiteStartHeader + Payload + SiteStartFooter, False);
324   end else
325   begin
326
327     // Pos > 0 indicates that the full text already appears verbatim in the site-start.el file, so do nothing in that case
328     if Pos(SiteStartHeader + Payload + SiteStartFooter, Contents) = 0 then
329     begin
330       FooterRequired := True;
331       HeaderRequired := True;
332       InsertPos := Pos(SiteStartHeader, Contents);
333       if InsertPos > 0 then
334       begin
335         HeaderRequired := False
336         InsertPos := Pos(SiteStartFooter, Contents);
337         if InsertPos > 0 then
338         begin
339           FooterRequired := False;
340         end else
341         begin
342           InsertPos := Length(Contents);
343         end;
344       end;
345
346       if InsertPos = 0 then InsertPos := 1;
347
348       if HeaderRequired then
349       begin
350         Insert(SiteStartHeader, Contents, InsertPos);
351         InsertPos := InsertPos + Length(SiteStartHeader);
352       end;
353       Insert(Payload, Contents, InsertPos);
354       InsertPos := InsertPos + Length(Payload);
355
356       if FooterRequired then
357         Insert(SiteStartFooter, Contents, InsertPos);
358
359       SaveStringToFile(SiteStart, Contents, False);
360     end;
361   end;
362 end;
363
364 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
365 begin
366   case CurUninstallStep of
367   usUninstall:
368     begin
369       RemoveSiteStartModifications;
370     end;
371   end;
372 end;
373
374 procedure RemovePackagePathSetting(RootKey: Integer);
375 var
376   RootKeyName: String;
377   Value: String;
378 begin
379   RootKeyName := 'Unknown Root';
380   case RootKey of
381     HKEY_CURRENT_USER:
382       RootKeyName := 'HKEY_CURRENT_USER';
383     HKEY_LOCAL_MACHINE:
384       RootKeyName := 'HKEY_LOCAL_MACHINE';
385   end;
386   // Check to see if the key exists in the specified registry root
387   if RegQueryStringValue(RootKey, SubKeyName, ValueName, Value) then
388   begin
389     // Allow the user to delete it
390     if MsgBox('Do you want to delete the registry key ' + RootKeyName + '\' + SubKeyName + '\' + ValueName + '?' #13 'Currently this key has the value "' + Value + '".' #13#13 'If you do not delete this registry key, then the packages installed from this setup kit will not be found when XEmacs runs.' #13, mbConfirmation, MB_YESNO) = IDYES then
391     begin
392       RegDeleteValue(RootKey, SubKeyName, ValueName);
393     end;
394   end;
395 end;
396
397
398 procedure RemoveSiteStartModifications();
399 var
400   Contents: String;
401   Footer, Header: Integer;
402   SiteStart: String;
403 begin
404   SiteStart := ExpandConstant('{app}') + '\site-packages\lisp\site-start.el';
405   if LoadStringFromFile(SiteStart, Contents) then
406   begin
407     Header := Pos(SiteStartHeader, Contents);
408     if Header > 0 then
409     begin
410       Footer := Pos(SiteStartFooter, Contents);
411       if (Footer > 0) AND (Footer > Header) then
412       begin
413         Footer := Footer + Length(SiteStartFooter);
414         Delete(Contents, Header, Footer-Header);
415         SaveStringToFile(SiteStart, Contents, False);
416       end;
417     end;
418   end;
419 end;
420