Mention subscribing via the server buffer.
[gnus] / make.bat
1 @echo OFF\r
2 REM Change this to ON when debugging this batch file.\r
3 \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
6 rem .\r
7 rem .\r
8 rem Clear PWD so emacs doesn't get confused\r
9 set GNUS_PWD_SAVE=%PWD%\r
10 set PWD=\r
11 set ERROR=:\r
12 REM set pause=\r
13 \r
14 if %1p == p goto usage\r
15 \r
16 echo * Installing Gnus on your system.  Operating system:\r
17 ver\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
23 goto noemacs\r
24 \r
25 :ebat\r
26 set EMACS=emacs.bat\r
27 echo.\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
32 echo.\r
33 goto emacs\r
34 \r
35 :eexe\r
36 set EMACS=emacs.exe\r
37 echo.\r
38 echo ***************************************************************************\r
39 echo * Using emacs.exe\r
40 echo ***************************************************************************\r
41 echo.\r
42 goto emacs\r
43 \r
44 :emacs\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
49 :emacsnocopy\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
54 goto lisp\r
55 \r
56 :xemacs\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
63 :xemacsnocopy\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
68 echo.\r
69 echo ***************************************************************************\r
70 echo * Using xemacs.exe\r
71 echo ***************************************************************************\r
72 echo.\r
73 goto lisp\r
74 \r
75 :lisp\r
76 if "%pause%" == "pause" pause\r
77 set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%\r
78 cd lisp\r
79 if exist gnus-load.el attrib -r gnus-load.el\r
80 if exist gnus-load.el del gnus-load.el\r
81 echo.\r
82 echo * Stand by while generating autoloads.\r
83 echo.\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
90 echo.\r
91 echo * Stand by while compiling lisp files.\r
92 echo.\r
93 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile\r
94 if ErrorLevel 1 set ERROR=%ERROR%,compile\r
95 \r
96 if not "%2" == "/copy" goto infotest\r
97 echo.\r
98 echo * Stand by while copying lisp files.\r
99 echo.\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
103 goto infotest\r
104 \r
105 :infotest\r
106 cd ..\texi\r
107 if exist sieve attrib -r sieve\r
108 if exist sieve del sieve\r
109 \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
115 echo.\r
116 echo ***************************************************************************\r
117 echo * Using infohack.el, if you've got makeinfo.exe put it in PATH.\r
118 echo ***************************************************************************\r
119 echo.\r
120 goto info\r
121 \r
122 :minfo\r
123 set EMACSINFO=makeinfo\r
124 echo.\r
125 echo ***************************************************************************\r
126 echo * Using makeinfo\r
127 echo ***************************************************************************\r
128 echo.\r
129 goto info\r
130 \r
131 :info\r
132 if "%pause%" == "pause" pause\r
133 echo.\r
134 echo * Stand by while generating info files.\r
135 echo.\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
148 \r
149 if not "%2" == "/copy" goto nocopy\r
150 if not exist %GNUS_INFO_DIR%\nul mkdir %GNUS_INFO_DIR%\r
151 \r
152 echo.\r
153 echo * Stand by while copying info files.\r
154 echo.\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
173 \r
174 echo.\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
179 echo *\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
184 echo.\r
185 \r
186 :etc\r
187 if "%pause%" == "pause" pause\r
188 cd ..\etc\r
189 echo.\r
190 echo * Stand by while copying etc files.\r
191 echo.\r
192 REM\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
197 REM\r
198 REM FIXME: Instead of C&P, we should use a FOR loop.\r
199 REM\r
200 set i=images\r
201 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
202 echo ** .\%i%\ ...\r
203 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
204 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
205 REM\r
206 set i=images\mail\r
207 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
208 echo ** .\%i%\ ...\r
209 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
210 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
211 REM\r
212 set i=images\gnus\r
213 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
214 echo ** .\%i%\ ...\r
215 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
216 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
217 REM\r
218 set i=images\smilies\r
219 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
220 echo ** .\%i%\ ...\r
221 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
222 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
223 REM\r
224 set i=images\smilies\grayscale\r
225 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
226 echo ** .\%i%\ ...\r
227 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
228 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
229 REM\r
230 set i=images\smilies\medium\r
231 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
232 echo ** .\%i%\ ...\r
233 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
234 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
235 REM\r
236 set i=\r
237 goto warnings\r
238 \r
239 :nocopy\r
240 echo.\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
244 echo *\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
250 echo *\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
254 echo.\r
255 \r
256 :warnings\r
257 if not "%subdirwarning%" == "yes" goto warngnusload\r
258 echo.\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
263 echo *\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
268 echo.\r
269 goto warnerrors\r
270 \r
271 :warngnusload\r
272 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
276 echo *\r
277 echo * (require 'gnus-load)\r
278 echo ***************************************************************************\r
279 echo.\r
280 \r
281 :warnerrors\r
282 if "%ERROR%"==":" goto noerrors\r
283 set errorlevel=1\r
284 echo.\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
290 echo * %ERROR%\r
291 echo ***************************************************************************\r
292 echo.\r
293 goto done\r
294 \r
295 :noerrors\r
296 set errorlevel=0\r
297 \r
298 :done\r
299 cd ..\r
300 goto end\r
301 \r
302 :noemacs\r
303 echo.\r
304 echo ***************************************************************************\r
305 echo * Unable to find emacs.exe or xemacs.exe on the path you specified!\r
306 echo * STOP!\r
307 echo ***************************************************************************\r
308 echo.\r
309 goto usage\r
310 \r
311 :usage\r
312 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
316 echo *\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
325 echo *\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
330 echo.\r
331 \r
332 :end\r
333 rem Restore environment variables\r
334 set PWD=%GNUS_PWD_SAVE%\r
335 set GNUS_PWD_SAVE=\r
336 set EMACSBATCH=\r
337 set GNUS_LISP_DIR=\r
338 set GNUS_INFO_DIR=\r
339 set GNUS_ETC_DIR=\r
340 set subdirwarning=\r
341 set ERROR=\r