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 Clear PWD so emacs doesn't get confused
\r
9 set GNUS_PWD_SAVE=%PWD%
\r
14 if %1p == p goto usage
\r
16 echo * Installing Gnus on your system. Operating system:
\r
18 rem Emacs 20.7 no longer includes emacs.bat. Use emacs.exe if the batch file is
\r
19 rem not present -- this also fixes the problem about too many parameters on Win9x.
\r
20 if exist %1\emacs.bat goto ebat
\r
21 if exist %1\emacs.exe goto eexe
\r
22 if exist %1\xemacs.exe goto xemacs
\r
28 echo ***************************************************************************
\r
29 echo * Using emacs.bat (If you've got Emacs 20.3 or higher please remove
\r
30 echo * Emacs.bat, it isn't needed anymore.)
\r
31 echo ***************************************************************************
\r
38 echo ***************************************************************************
\r
39 echo * Using emacs.exe
\r
40 echo ***************************************************************************
\r
45 if not "%2" == "/copy" goto emacsnocopy
\r
46 if not exist %1\..\site-lisp\nul mkdir %1\..\site-lisp
\r
47 if not exist %1\..\site-lisp\gnus\nul mkdir %1\..\site-lisp\gnus
\r
48 if not exist %1\..\site-lisp\subdirs.el set subdirwarning=yes
\r
50 set EMACS_ARGS=-batch -q -no-site-file
\r
51 set GNUS_INFO_DIR=%1\..\info
\r
52 set GNUS_LISP_DIR=%1\..\site-lisp\gnus\lisp
\r
53 set GNUS_ETC_DIR=%1\..\site-lisp\gnus\etc
\r
57 set EMACS=xemacs.exe
\r
58 if not "%2" == "/copy" goto xemacsnocopy
\r
59 if not exist %1\..\..\site-packages\nul mkdir %1\..\..\site-packages\
\r
60 if not exist %1\..\..\site-packages\info\nul mkdir %1\..\..\site-packages\info
\r
61 if not exist %1\..\..\site-packages\lisp\nul mkdir %1\..\..\site-packages\lisp
\r
62 if not exist %1\..\..\site-packages\etc\nul mkdir %1\..\..\site-packages\etc
\r
64 set EMACS_ARGS=-batch -no-autoloads
\r
65 set GNUS_INFO_DIR=%1\..\..\site-packages\info
\r
66 set GNUS_LISP_DIR=%1\..\..\site-packages\lisp\gnus
\r
67 set GNUS_ETC_DIR=%1\..\..\site-packages\etc
\r
69 echo ***************************************************************************
\r
70 echo * Using xemacs.exe
\r
71 echo ***************************************************************************
\r
76 if "%pause%" == "pause" pause
\r
77 set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%
\r
79 if exist gnus-load.el attrib -r gnus-load.el
\r
80 if exist gnus-load.el del gnus-load.el
\r
82 echo * Stand by while generating autoloads.
\r
84 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-cus-load .
\r
85 if ErrorLevel 1 set ERROR=make-cus-load
\r
86 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-auto-load .
\r
87 if ErrorLevel 1 set ERROR=%ERROR%,make-auto-load
\r
88 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-load
\r
89 if ErrorLevel 1 set ERROR=%ERROR%,make-load
\r
91 echo * Stand by while compiling lisp files.
\r
93 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile
\r
94 if ErrorLevel 1 set ERROR=%ERROR%,compile
\r
96 if not "%2" == "/copy" goto infotest
\r
98 echo * Stand by while copying lisp files.
\r
100 if not exist %GNUS_LISP_DIR%\nul mkdir %GNUS_LISP_DIR%
\r
101 xcopy /R /Q /Y *.el* %GNUS_LISP_DIR%
\r
102 if ErrorLevel 1 set ERROR=%ERROR%,copy-lisp
\r
107 if exist sieve attrib -r sieve
\r
108 if exist sieve del sieve
\r
110 echo * Checking if makeinfo is available...
\r
111 makeinfo sieve.texi
\r
112 if exist sieve goto minfo
\r
113 echo * No makeinfo found, using infohack.el.
\r
114 set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo
\r
116 echo ***************************************************************************
\r
117 echo * Using infohack.el, if you've got makeinfo.exe put it in PATH.
\r
118 echo ***************************************************************************
\r
123 set EMACSINFO=makeinfo
\r
125 echo ***************************************************************************
\r
126 echo * Using makeinfo
\r
127 echo ***************************************************************************
\r
132 if "%pause%" == "pause" pause
\r
134 echo * Stand by while generating info files.
\r
136 %EMACSINFO% emacs-mime.texi
\r
137 if ErrorLevel 1 set ERROR=%ERROR%,emacs-mime.texi
\r
138 %EMACSINFO% gnus.texi
\r
139 if ErrorLevel 1 set ERROR=%ERROR%,gnus.texi
\r
140 %EMACSINFO% sieve.texi
\r
141 if ErrorLevel 1 set ERROR=%ERROR%,sieve.texi
\r
142 %EMACSINFO% pgg.texi
\r
143 if ErrorLevel 1 set ERROR=%ERROR%,pgg.texi
\r
144 %EMACSINFO% message.texi
\r
145 if ErrorLevel 1 set ERROR=%ERROR%,message.texi
\r
146 %EMACSINFO% sasl.texi
\r
147 if ErrorLevel 1 set ERROR=%ERROR%,sasl.texi
\r
149 if not "%2" == "/copy" goto nocopy
\r
150 if not exist %GNUS_INFO_DIR%\nul mkdir %GNUS_INFO_DIR%
\r
153 echo * Stand by while copying info files.
\r
155 xcopy /R /Q /Y gnus %GNUS_INFO_DIR%
\r
156 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-info
\r
157 xcopy /R /Q /Y gnus-? %GNUS_INFO_DIR%
\r
158 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-x-info
\r
159 xcopy /R /Q /Y gnus-?? %GNUS_INFO_DIR%
\r
160 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-xx-info
\r
161 xcopy /R /Q /Y message %GNUS_INFO_DIR%
\r
162 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-info
\r
163 if exist message-1 xcopy /R /Q /Y message-? %GNUS_INFO_DIR%
\r
164 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-x-info
\r
165 xcopy /R /Q /Y emacs-mime %GNUS_INFO_DIR%
\r
166 if ErrorLevel 1 set ERROR=%ERROR%,copy-emacs-mime-info
\r
167 xcopy /R /Q /Y sieve %GNUS_INFO_DIR%
\r
168 if ErrorLevel 1 set ERROR=%ERROR%,copy-sieve-info
\r
169 xcopy /R /Q /Y pgg %GNUS_INFO_DIR%
\r
170 if ErrorLevel 1 set ERROR=%ERROR%,copy-pgg-info
\r
171 xcopy /R /Q /Y sasl %GNUS_INFO_DIR%
\r
172 if ErrorLevel 1 set ERROR=%ERROR%,copy-sasl-info
\r
175 echo ***************************************************************************
\r
176 echo * You should add the following lines to
\r
177 echo * %GNUS_INFO_DIR%\dir
\r
178 echo * if they aren't already there:
\r
180 echo * * PGG: (pgg). Emacs interface to various PGP implementations.
\r
181 echo * * Sieve: (sieve). Managing Sieve scripts in Emacs.
\r
182 echo * * SASL: (sasl). The Emacs SASL library.
\r
183 echo ***************************************************************************
\r
187 if "%pause%" == "pause" pause
\r
190 echo * Stand by while copying etc files.
\r
193 if not exist %GNUS_ETC_DIR% mkdir %GNUS_ETC_DIR%
\r
194 echo ** gnus-tut.txt ...
\r
195 xcopy /R /Q /Y gnus-tut.txt %GNUS_ETC_DIR%
\r
196 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-tut-txt
\r
198 REM FIXME: Instead of C&P, we should use a FOR loop.
\r
201 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
203 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
204 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
207 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
209 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
210 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
213 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
215 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
216 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
218 set i=images\smilies
\r
219 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
221 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
222 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
224 set i=images\smilies\grayscale
\r
225 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
227 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
228 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
230 set i=images\smilies\medium
\r
231 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
\r
233 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
\r
234 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
\r
241 echo ***************************************************************************
\r
242 echo * You chose not to copy the files, therefore you should add the
\r
243 echo * following lines to the TOP of your [X]emacs customization file:
\r
245 echo * (add-to-list 'load-path "/Path/to/gnus/lisp")
\r
246 echo * (if (featurep 'xemacs)
\r
247 echo * (add-to-list 'Info-directory-list "c:/Path/to/gnus/texi/")
\r
248 echo * (add-to-list 'Info-default-directory-list "c:/Path/to/gnus/texi/"))
\r
249 echo * (require 'gnus-load)
\r
251 echo * Replace c:/Path/to/gnus with the Path where your new Gnus is (that's here
\r
252 echo * and yes, you've got to use forward slashes).
\r
253 echo ***************************************************************************
\r
257 if not "%subdirwarning%" == "yes" goto warngnusload
\r
259 echo ***************************************************************************
\r
260 echo * There's no subdirs.el file in your site-lisp directory, you should
\r
261 echo * therefor add the following line to the TOP of your Emacs
\r
262 echo * customization file:
\r
264 echo * (add-to-list 'load-path "/Path/to/emacs-site-lisp-directory/gnus/lisp")
\r
265 echo * (require 'gnus-load)
\r
266 echo * Yes, it must be forward slashes.
\r
267 echo ***************************************************************************
\r
273 echo ***************************************************************************
\r
274 echo * You should add the following line to the TOP of your Emacs
\r
275 echo * customization file:
\r
277 echo * (require 'gnus-load)
\r
278 echo ***************************************************************************
\r
282 if "%ERROR%"==":" goto noerrors
\r
285 echo ***************************************************************************
\r
286 echo * WARNING ERRORS OCCURRED!
\r
287 echo * You should look for error messages in the output of the called programs
\r
288 echo * and try to find out what exactly went wrong.
\r
289 echo * Errors occured in the following modules:
\r
291 echo ***************************************************************************
\r
304 echo ***************************************************************************
\r
305 echo * Unable to find emacs.exe or xemacs.exe on the path you specified!
\r
307 echo ***************************************************************************
\r
313 echo ***************************************************************************
\r
314 REM echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy] [ ^> inst-log.txt 2^>^&1 ]
\r
315 echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy]
\r
317 echo * where: :[X]Emacs-exe-dir: is the directory your
\r
318 echo * emacs.exe respectively xemacs.exe resides in,
\r
319 echo * e.g. G:\Programme\XEmacs\XEmacs-21.4.11\i586-pc-win32\
\r
320 echo * or G:\Emacs\bin
\r
321 echo * /copy indicates that the compiled files should be copied to your
\r
322 echo * emacs lisp, info, and etc site directories.
\r
323 REM echo * ^> inst-log.txt 2^>^&1
\r
324 REM echo * Log output to inst-log.txt
\r
326 echo * Note: If you have Emacs/w3 you should set the environment variable
\r
327 echo * W3DIR to the directory where w3 is installed eg.
\r
328 echo * set W3DIR=d:\lisp\w3-4.0pre46\lisp
\r
329 echo ***************************************************************************
\r
333 rem Restore environment variables
\r
334 set PWD=%GNUS_PWD_SAVE%
\r