2 REM Change this to ON when debugging this batch file.
\r
4 rem Written by Frank Schmitt (ich@frank-schmitt.net)
\r
5 rem based on the work by David Charlap (shamino@writeme.com)
\r
8 rem From http://my.gnus.org/node/343:
\r
9 rem A comment on installing Gnus on Windows 98 SE that might help others: When
\r
10 rem I ran the "make.bat" file in the 5.10.6 tarball I got a bunch of "Out of
\r
11 rem environment space" messages. The solution was to (1) make a shortcut to
\r
12 rem the make.bat file, and (2) right-click on the shortcut, setting "Cmd line"
\r
13 rem in the "Program" tab in "properties" to include the parameters make.bat
\r
14 rem requires, and "initial environment" in the "memories" tab, to the maximum
\r
15 rem (in my case, anyway, 2560).
\r
17 rem Clear PWD so emacs doesn't get confused
\r
18 set GNUS_PWD_SAVE=%PWD%
\r
23 if %1p == p goto usage
\r
25 echo * Installing Gnus on your system. Operating system:
\r
27 rem Emacs 20.7 no longer includes emacs.bat. Use emacs.exe if the batch file is
\r
28 rem not present -- this also fixes the problem about too many parameters on Win9x.
\r
29 if exist %1\emacs.bat goto ebat
\r
30 if exist %1\emacs.exe goto eexe
\r
31 if exist %1\xemacs.exe goto xemacs
\r
37 echo ***************************************************************************
\r
38 echo * Using emacs.bat (If you've got Emacs 20.3 or higher please remove
\r
39 echo * Emacs.bat, it isn't needed anymore.)
\r
40 echo ***************************************************************************
\r
47 echo ***************************************************************************
\r
48 echo * Using emacs.exe
\r
49 echo ***************************************************************************
\r
54 if not "%2" == "/copy" goto emacsnocopy
\r
55 if not exist %1\..\site-lisp\nul mkdir %1\..\site-lisp
\r
56 if not exist %1\..\site-lisp\gnus\nul mkdir %1\..\site-lisp\gnus
\r
57 if not exist %1\..\site-lisp\subdirs.el set subdirwarning=yes
\r
59 set EMACS_ARGS=-batch -q -no-site-file
\r
60 set GNUS_INFO_DIR=%1\..\info
\r
61 set GNUS_LISP_DIR=%1\..\site-lisp\gnus\lisp
\r
62 set GNUS_ETC_DIR=%1\..\site-lisp\gnus\etc
\r
66 set EMACS=xemacs.exe
\r
67 if not "%2" == "/copy" goto xemacsnocopy
\r
68 if not exist %1\..\..\site-packages\nul mkdir %1\..\..\site-packages\
\r
69 if not exist %1\..\..\site-packages\info\nul mkdir %1\..\..\site-packages\info
\r
70 if not exist %1\..\..\site-packages\lisp\nul mkdir %1\..\..\site-packages\lisp
\r
71 if not exist %1\..\..\site-packages\etc\nul mkdir %1\..\..\site-packages\etc
\r
73 set EMACS_ARGS=-batch -no-autoloads
\r
74 set GNUS_INFO_DIR=%1\..\..\site-packages\info
\r
75 set GNUS_LISP_DIR=%1\..\..\site-packages\lisp\gnus
\r
76 set GNUS_ETC_DIR=%1\..\..\site-packages\etc
\r
78 echo ***************************************************************************
\r
79 echo * Using xemacs.exe
\r
80 echo ***************************************************************************
\r
85 if "%pause%" == "pause" pause
\r
86 set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%
\r
88 if exist gnus-load.el attrib -r gnus-load.el
\r
89 if exist gnus-load.el del gnus-load.el
\r
91 echo * Stand by while generating autoloads.
\r
93 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-cus-load .
\r
94 if ErrorLevel 1 set ERROR=make-cus-load
\r
95 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-auto-load .
\r
96 if ErrorLevel 1 set ERROR=%ERROR%,make-auto-load
\r
97 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-load
\r
98 if ErrorLevel 1 set ERROR=%ERROR%,make-load
\r
100 echo * Stand by while compiling lisp files.
\r
102 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile
\r
103 if ErrorLevel 1 set ERROR=%ERROR%,compile
\r
105 if not "%2" == "/copy" goto infotest
\r
107 echo * Stand by while copying lisp files.
\r
109 if not exist %GNUS_LISP_DIR%\nul mkdir %GNUS_LISP_DIR%
\r
110 xcopy /R /Q /Y *.el* %GNUS_LISP_DIR%
\r
111 if ErrorLevel 1 set ERROR=%ERROR%,copy-lisp
\r
116 if exist sieve attrib -r sieve
\r
117 if exist sieve del sieve
\r
119 echo * Checking if makeinfo is available...
\r
120 makeinfo sieve.texi
\r
121 if exist sieve goto minfo
\r
122 echo * No makeinfo found, using infohack.el.
\r
123 set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo
\r
125 echo ***************************************************************************
\r
126 echo * Using infohack.el, if you've got makeinfo.exe put it in PATH.
\r
127 echo ***************************************************************************
\r
132 set EMACSINFO=makeinfo
\r
134 echo ***************************************************************************
\r
135 echo * Using makeinfo
\r
136 echo ***************************************************************************
\r
141 if "%pause%" == "pause" pause
\r
143 echo * Stand by while generating info files.
\r
145 %EMACSINFO% emacs-mime.texi
\r
146 if ErrorLevel 1 set ERROR=%ERROR%,emacs-mime.texi
\r
147 %EMACSINFO% gnus.texi
\r
148 if ErrorLevel 1 set ERROR=%ERROR%,gnus.texi
\r
149 %EMACSINFO% sieve.texi
\r
150 if ErrorLevel 1 set ERROR=%ERROR%,sieve.texi
\r
151 %EMACSINFO% pgg.texi
\r
152 if ErrorLevel 1 set ERROR=%ERROR%,pgg.texi
\r
153 %EMACSINFO% message.texi
\r
154 if ErrorLevel 1 set ERROR=%ERROR%,message.texi
\r
155 %EMACSINFO% sasl.texi
\r
156 if ErrorLevel 1 set ERROR=%ERROR%,sasl.texi
\r
158 if not "%2" == "/copy" goto nocopy
\r
159 if not exist %GNUS_INFO_DIR%\nul mkdir %GNUS_INFO_DIR%
\r
162 echo * Stand by while copying info files.
\r
164 xcopy /R /Q /Y gnus %GNUS_INFO_DIR%
\r
165 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-info
\r
166 xcopy /R /Q /Y gnus-? %GNUS_INFO_DIR%
\r
167 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-x-info
\r
168 xcopy /R /Q /Y gnus-?? %GNUS_INFO_DIR%
\r
169 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-xx-info
\r
170 xcopy /R /Q /Y message %GNUS_INFO_DIR%
\r
171 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-info
\r
172 if exist message-1 xcopy /R /Q /Y message-? %GNUS_INFO_DIR%
\r
173 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-x-info
\r
174 xcopy /R /Q /Y emacs-mime %GNUS_INFO_DIR%
\r
175 if ErrorLevel 1 set ERROR=%ERROR%,copy-emacs-mime-info
\r
176 xcopy /R /Q /Y sieve %GNUS_INFO_DIR%
\r
177 if ErrorLevel 1 set ERROR=%ERROR%,copy-sieve-info
\r
178 xcopy /R /Q /Y pgg %GNUS_INFO_DIR%
\r
179 if ErrorLevel 1 set ERROR=%ERROR%,copy-pgg-info
\r
180 xcopy /R /Q /Y sasl %GNUS_INFO_DIR%
\r
181 if ErrorLevel 1 set ERROR=%ERROR%,copy-sasl-info
\r
184 echo ***************************************************************************
\r
185 echo * You should add the following lines to
\r
186 echo * %GNUS_INFO_DIR%\dir
\r
187 echo * if they aren't already there:
\r
189 echo * * PGG: (pgg). Emacs interface to various PGP implementations.
\r
190 echo * * Sieve: (sieve). Managing Sieve scripts in Emacs.
\r
191 echo * * SASL: (sasl). The Emacs SASL library.
\r
192 echo ***************************************************************************
\r
196 if "%pause%" == "pause" pause
\r
199 echo * Stand by while copying etc files.
\r
202 if not exist %GNUS_ETC_DIR% mkdir %GNUS_ETC_DIR%
\r
203 echo ** gnus-tut.txt ...
\r
204 xcopy /R /Q /Y gnus-tut.txt %GNUS_ETC_DIR%
\r
205 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-tut-txt
\r
207 REM FIXME: Instead of C&P, we should use a FOR loop.
\r
210 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
212 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
213 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
216 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
218 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
219 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
222 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
224 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
225 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
227 set i=images\smilies
\r
228 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
230 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
231 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
233 set i=images\smilies\grayscale
\r
234 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
236 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
237 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
239 set i=images\smilies\medium
\r
240 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
242 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
243 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
250 echo ***************************************************************************
\r
251 echo * You chose not to copy the files, therefore you should add the
\r
252 echo * following lines to the TOP of your [X]emacs customization file:
\r
254 echo * (add-to-list 'load-path "/Path/to/gnus/lisp")
\r
255 echo * (if (featurep 'xemacs)
\r
256 echo * (add-to-list 'Info-directory-list "c:/Path/to/gnus/texi/")
\r
257 echo * (add-to-list 'Info-default-directory-list "c:/Path/to/gnus/texi/"))
\r
258 echo * (require 'gnus-load)
\r
260 echo * Replace c:/Path/to/gnus with the Path where your new Gnus is (that's here
\r
261 echo * and yes, you've got to use forward slashes).
\r
262 echo ***************************************************************************
\r
266 if not "%subdirwarning%" == "yes" goto warngnusload
\r
268 echo ***************************************************************************
\r
269 echo * There's no subdirs.el file in your site-lisp directory, you should
\r
270 echo * therefor add the following line to the TOP of your Emacs
\r
271 echo * customization file:
\r
273 echo * (add-to-list 'load-path "/Path/to/emacs-site-lisp-directory/gnus/lisp")
\r
274 echo * (require 'gnus-load)
\r
275 echo * Yes, it must be forward slashes.
\r
276 echo ***************************************************************************
\r
282 echo ***************************************************************************
\r
283 echo * You should add the following line to the TOP of your Emacs
\r
284 echo * customization file:
\r
286 echo * (require 'gnus-load)
\r
287 echo ***************************************************************************
\r
291 if "%ERROR%"==":" goto noerrors
\r
294 echo ***************************************************************************
\r
295 echo * WARNING ERRORS OCCURRED!
\r
296 echo * You should look for error messages in the output of the called programs
\r
297 echo * and try to find out what exactly went wrong.
\r
298 echo * Errors occured in the following modules:
\r
300 echo ***************************************************************************
\r
313 echo ***************************************************************************
\r
314 echo * Unable to find emacs.exe or xemacs.exe on the path you specified!
\r
316 echo ***************************************************************************
\r
322 echo ***************************************************************************
\r
323 REM echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy] [ ^> inst-log.txt 2^>^&1 ]
\r
324 echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy]
\r
326 echo * where: :[X]Emacs-exe-dir: is the directory your
\r
327 echo * emacs.exe respectively xemacs.exe resides in,
\r
328 echo * e.g. G:\Programme\XEmacs\XEmacs-21.4.11\i586-pc-win32\
\r
329 echo * or G:\Emacs\bin
\r
330 echo * /copy indicates that the compiled files should be copied to your
\r
331 echo * emacs lisp, info, and etc site directories.
\r
332 REM echo * ^> inst-log.txt 2^>^&1
\r
333 REM echo * Log output to inst-log.txt
\r
335 echo * Note: If you have Emacs/w3 you should set the environment variable
\r
336 echo * W3DIR to the directory where w3 is installed eg.
\r
337 echo * set W3DIR=d:\lisp\w3-4.0pre46\lisp
\r
338 echo ***************************************************************************
\r
342 rem Restore environment variables
\r
343 set PWD=%GNUS_PWD_SAVE%
\r
353 arch-tag: 502dd14c-acde-4f69-8e82-43203b12a82c
\r