; ; ChkTeX.install v1.5, installs the ChkTeX program ; Copyright (C) 1995-96 Jens T. Berger Thielemann ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ; ; Contact the author at: ; Jens Berger ; Spektrumvn. 4 ; N-0666 Oslo ; Norway ; E-mail: ; ; ; (set @app-name "ChkTeX") (welcome) (message "Welcome to the ChkTeX installation script.\n" "Before taking the program in use, please read the COPYING file; " "it applies to this script as well as the remaining parts of the " "package. In short:\nNO WARRANTIES WHATSOEVER.\n\n" "Copyright © 1995-96\nJens T. Berger Thielemann\n" ) (set @default-dest (askdir (prompt "Where do you wish ChkTeX installed?") (default "C:") (help "You can here select where you wish to install the " "main ChkTeX executable program.\n\n" @askdir-help ) ) ) (copyfiles (source "ChkTeX") (dest @default-dest) (infos) ) ;;;;;; ;; ;; Install environment file ;; ;;;;;; (if (exists "ENVARC:" (noreq) ) (set SysConfPath "ENVARC:") (set SysConfPath "S:") ) (if (exists "ENV:CHKTEXRC" (noreq) ) ( (set ConfigPath (getenv "CHKTEXRC") ) (set EnvPath 1) ) ( (set ConfigPath SysConfPath) (set EnvPath 0) ) ) (if (or (= @user-level 2) (exists (tackon ConfigPath ".chktexrc") ) ) (set install (askbool (prompt "Install environment files?") (help "If you select `yes', the default environment files will " "be installed. They will initialize ChkTeX to a `normal' " "behaviour, and give a good starting-point for " "modification.\n" "However, if you've already installed an earlier version of " "ChkTeX, and modified the .chktexrc file, you will probably not " "want to overwrite that one. You should still take a " "look at the included .chktexrc, though, to be introduced to the new " "keywords that are introduced." ) (default 1) ) ) (set install 1) ) (if (= install 1) ( (if (or ; This is only applicable if > 2.0 (<> ConfigPath "S:") (<> EnvPath 0) ) (if (askbool (prompt "Where should the resource file be installed?") (help "The resource file has grown quite big (~20k). " "Therefore, low memory systems may not wish to have it " "permanently stored in RAM. ChkTeX supports putting it " "in a custom location; if you wish to do this, select " "\"User dir\", else \"Environment\"." ) (choices "User dir" "Environment") (default EnvPath) ) ( (debug 1) (set ConfigPath (askdir (prompt "Select path for resource file.") (help "Please select a permanent location for " "the .chktexrc file. We will store the " "path to it in an environment variable " "named CHKTEXRC." ) (default ConfigPath) ) ) (debug 2) (set SetEnvCmd (cat "SetEnv CHKTEXRC " (expandpath ConfigPath) "\n" ) ) (debug 3) (startup @app-name (prompt "Add lines to S:User-startup?") (help "ChkTeX needs to modify S:User-startup in order " "to refind the .chktexrc file. This will be " "done in this step.\n\n" @startup-help ) (command SetEnvCmd) ) (debug 4) (textfile (dest "ENV:CHKTEXRC") (append (expandpath ConfigPath)) ) (debug 5) ) (set ConfigPath SysConfPath) ) ) (copyfiles (source "chktexrc") (dest ConfigPath) (newname ".chktexrc") ) (if (or (= ConfigPath "ENVARC:") (= ConfigPath "ENV:") ) (copyfiles (source "chktexrc") (dest "ENV:") (newname ".chktexrc") ) ) ) ) (if (exists "HELP:" (noreq) ) (set docdest "HELP:") (set docdest @default-dest) ) (copyfiles (source "") (dest docdest) (choices "COPYING" "ChkTeX.readme" "ChkTeX.tex" "ChkTeX.dvi" "deweb.doc" "deweb.1" ) (prompt "Which documentation files do you wish to install?") (help "If you would like to have the documentation online, you have " "the possibility here. It might be nice for future reference.\n" "As you may know, the .dvi files are in the Device Independent " "format. .1 files are formatted " "with nroff. " "The remaining files are plain iso-8859-1 encoded text files.\n" "Please select files fitting your decoding software.\n\n" @copyfiles-help ) (confirm) (infos) ) (if (or (exists "REXX:" (noreq) ) (= @user-level 2) ) ( (set browser (askchoice (prompt "Which message browser should ChkTeX interface " "against?" ) (help "ChkTeX can, via ARexx scripts, interface against " "VBrowse and SCMsg; the respective message browsers of " "VBCC and SAS/C. These can in turn interface " "against Ced or GoldED.\n" @askchoice-help ) (choices "SCMsg" "VBrowse" "None") ) ) (if (<> browser 2) ( (set editor (askchoice (prompt "Which editor are you using?") (help "Here, you should specify which editor you are using. " "This will create a script named `ChkTeX.ced' or " "`ChkTeX.ged' respectively. This should be bound to " "a hot-key.\n" @askchoice-help ) (choices "CygnusED" "GoldED") ) ) (select editor ; Ced ( (copyfiles (source "") (choices "ChkTeX.ced" "GotoFile.ced") (dest "REXX:") ) (protect "REXX:ChkTeX.ced" "+se") (protect "REXX:GotoFile.ced" "+se") ) ; Ged ( (copyfiles (source "ChkTeX.ged") (dest "REXX:") ) (protect "REXX:ChkTeX.ged" "+se") ) ) (select browser ; SCMsg (copyfiles (source "ChkTeX.scm") (dest "REXX:") (newname "ChkTeX.rexx") ) ; VBrowse (select editor (textfile (dest "REXX:ChkTeX.rexx") (append "/* REXX */\n" "Editor = 'rx rexx:gotofile.ced -l %d %s'\n\n" ) (include "ChkTeX.vbr") ) (textfile (dest "REXX:ChkTeX.rexx") (append "/* REXX */\n" "Editor = 'ged line %d %s'\n\n" ) (include "ChkTeX.vbr") ) ) ) ) ) (protect "REXX:ChkTeX.rexx" "+se") ) ) (if (askbool (prompt "Install lacheck replacement?") (help "The AUC-TeX Emacs mode uses a program named lacheck, " "which also checks LaTeX source code. To automagically make " "this mode use ChkTeX instead, install this script." ) (default 1) ) ( (copyfiles (source "lacheck") (dest @default-dest) ) (protect (tackon @default-dest "lacheck") "+se" ) ) ) (if (askbool (prompt "Install CWEB filters?") (help "These programs will filter away everything of a CWEB " "document but the LaTeX code. They will preserve line numbers.\n" "However, the scripts requires that you have Perl v5 installed; " "you also need a UNIX-like shell or an equivalent shell to make use of " "them.\n" ) (default 0) ) ( (set cwebdest (askdir (prompt "Where do you wish the CWEB filters installed?") (default "USR:perl") (help "You can here select where you wish to install the " "C-shell and Perl CWEB filters.\n\n" @askdir-help ) ) ) (copyfiles (source "deweb.in") (dest cwebdest) (newname "deweb") ) (copyfiles (source "chkweb") (dest cwebdest) ) ) ) (if (askbool (prompt "Install ChkTeX C-source files?") (help "If you select `yes', the source code files of the " "project will be installed in a directory of your selection. " "This may be handy for future reference, or if you wish to " "hack a bit on ChkTeX for yourself. As usual, the source " "is always the final documentation.\n" "Please read the COPYING file before doing so, however." ) (default 0) ) ( (set sourcedest (askdir (prompt "Where do you want the source installed?") (default "sc:source/") (help "You can here select where you wish to install the " "C source of the main ChkTeX executable program. " "A directory will be created there named ChkTeX.\n\n" @askdir-help ) ) ) (copyfiles (source "") (dest (tackon sourcedest "ChkTeX" ) ) (choices "ChkTeX.c" "ChkTeX.h" "FindErrs.c" "FindErrs.h" "OpSys.c" "OpSys.h" "Resource.c" "Resource.h" "Utility.c" "Utility.h" "WB2Argv.c" "WB2Argv.h" "getopt.c" "getopt.h" "getopt1.c" "HashWord.a" "config.AMIGA" "config.msd" "config.h.in" "configure.in" "Makefile.in" "SMakefile" "SCOPTIONS" "Test.tex" "input.tex" ) (infos) ) (copyfiles (source "") (dest (tackon sourcedest "ChkTeX/exec" ) ) (choices "exec/types.h") ) ) ) (exit "To enhance the program's function, please take a look at " "the .chktexrc file, located in the " "`" ConfigPath "' directory.\n\n" "Have fun.\n\n" )