From: Asger Ottar Alstrup Date: Mon, 14 Feb 2005 09:26:50 +0000 (+0000) Subject: - Add fake configuration files for windows X-Git-Tag: 1.6.10~14545 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6971e9cd6f3643eac64a79f07a9216e180ecb14c;p=features.git - Add fake configuration files for windows git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9624 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/Win32/fakeconfig/chkconfig.ltx b/development/Win32/fakeconfig/chkconfig.ltx new file mode 100644 index 0000000000..248935acf4 --- /dev/null +++ b/development/Win32/fakeconfig/chkconfig.ltx @@ -0,0 +1,269 @@ +% This is chkconfig.ltx, a script which tries to autodetect and +% document your LaTeX configuration. +% Author: Jean-Marc Lasgouttes (Jean-Marc.Lasgouttes@inria.fr) +% with minimal changes by Asger Alstrup (alstrup@diku.dk). +% +% This script should only be run from the configure script to update +% the files textclass.lst and doc/LyXConfig.lyx +% +% This script is in fact a complete rewrite of the original chkconfig +% script. Expect bugs. + +%%% If you want to add new packages/documentclasses to be recognized, +%%% read the explanation that follow and jump to the section 'Actual +%%% inspection code' below. You do not need to understand the ugly +%%% LaTeX code below to help improving chkconfig.ltx :-) +%%% +%%% If you want to add the new package , all you need most of +%%% the times is a two-steps work: +%%% 1- Add the command \TestPackage{}. The syntax is: +%%% \TestPackage[]{}, which tests whether .sty +%%% (or , if this optional parameter is provided) exists. +%%% 2- Add a description for in doc/LyXConfig.lyx.in, +%%% containing in particular a line like +%%% Found @chk_@ +%%% This line will be replaced at configure time by the proper text. +%%% +%%% For document classes, things are even simpler, since you do not +%%% need to edit this file. Just put your layout file in some place +%%% where LyX can find it and add if you wish a description in +%%% LyXConfig.lyx.in, as described above. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%% Initialization part (skip) %%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% we do not want to stop on errors +\nonstopmode\makeatletter + +%%% Some useful macros. +% Several commands are defined to test for packages: +% \AddLayout{} adds an entry for in textclass.lst +% \AddVariable{}{} creates a new variable chk_, +% and gives it the value . +% \TestDocClass{}{} if layout has not already +% been tested for, execute . Note that you will +% probably not need to use this directly, since the configure +% script generates the needed macro calls automatically. +% \TestPackage[]{} tests whether .sty (or , +% if it is provided) exists. +% Both commands call \AddVariable to give value 'yes' or 'no' to +% the variable chk_. +%%% +\newcommand{\prefix}{+} % the character used by grep to filter 'good' output +\newcommand{\AddLayout}[4][\default]{ + \def\default{#2} + \immediate\write\layouts{"#2" "#1" "#3" "#4"}} +\newcommand{\AddVariable}[2]{ + \immediate\write\sed{s!@chk_#1@!#2!g} + \immediate\write\vars{chk_#1='#2'}} +\newcommand{\AddPackage}[1]{ + \immediate\write\packages{#1}} +% Tests whether an item is present +% Syntax: \TestItem{}{}{}{}{}{} +\newif\ifexists +\newcommand{\TestItem}[6][\default]{ + \def\default{#2} + \def\files{#1} + \message{^^J\prefix checking for #3 #2 [#1]...} + \let\firstelement\relax + \existstrue + \@for\file:=\files\do{ + \ifx\firstelement\relax + \edef\firstelement{\file} + \fi + \IfFileExists{\file} + {} + {\IfFileExists{\file.#4}{}{\existsfalse}} + } + \ifexists + \message{yes^^J} + \AddVariable{#2}{yes} + #5 + \else + \message{no^^J} + \AddVariable{#2}{no} + #6 + \fi} +\newcommand{\TestPackage}[2][\default]{ + \TestItem[#1]{#2}{package}{sty}{\AddPackage{#2}}{}} +\newcommand{\TestDocClass}[2]{ + \def\layoutname{#1} % remember the name of the layout file + \@ifundefined{layout@#1} + {#2 % execute the command + \global\@namedef{layout@#1}{}} + {} % we have already tried this one. +} +\newcommand{\DeclareLaTeXClass}[2][\default]{ + \TestItem[#1]{\layoutname}{document class}{cls} + {\AddLayout[\firstelement]{\layoutname}{#2}{true}} + {\AddLayout[\firstelement]{\layoutname}{#2}{false}} +} +\newcommand{\DeclareLinuxDocClass}[2][\default]{ + \message{^^J\prefix checking for linuxdoc class \layoutname... } + \@ifundefined{haslinuxdoc} + {\message{no^^J} + \AddLayout[#1]{\layoutname}{#2}{false}} + {\message{yes^^J} + \AddLayout[#1]{\layoutname}{#2}{true}} +} +% Only for compatibility. Will be removed later. +\let\DeclareSGMLClass=\DeclareDocBookClass + +\newcommand{\DeclareDocBookClass}[2][\default]{ + \message{^^J\prefix checking for docbook\space\space class \layoutname... } + \@ifundefined{hasdocbook} + {\message{no^^J} + \AddLayout[#1]{\layoutname}{#2}{false}} + {\message{yes^^J} + \AddLayout[#1]{\layoutname}{#2}{true}} +} + +% Stolen from article.cls +\newcommand{\today}{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year} + +% Initializes the files +\typeout{\prefix Inspecting your LaTeX configuration.} +\newwrite{\layouts} \immediate\openout \layouts = textclass.lst +\newwrite{\sed} \immediate\openout \sed = chkconfig.sed +\newwrite{\vars} \immediate\openout \vars = chkconfig.vars +\newwrite{\packages} \immediate\openout \packages = packages.lst + +\immediate\write\layouts{% +# This file declares layouts and their associated definition files.^^J% +# It has been automatically generated by configure^^J% +# Use "Options/Reconfigure" if you need to update it after a^^J% +# configuration change. Run ./configure manually to update the^^J% +# system wide version of this file.} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% ACTUAL CONFIGURATION INSPECTION CODE %%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%% Add any new package or document class here. + +%%% First, we want the day on which the test has been run. +\AddVariable{date}{\today} + +%%% Then, the version of LaTeX we are using +\message{^^J\prefix checking for LaTeX version... \fmtversion} +\AddVariable{fmtversion}{\fmtversion} + +%%% And now, the list of available languages +% The trick is to know that \the\everyjob contains something like +% \typeout{LaTeX2e <2001/06/01>} +% \typeout{Babel and hyphenation patterns for american, french, german, ngerman, nohyphenation, loaded.} +% All we have to do is to extract the list from there: +% (1) concatenate all the messages that are displayed everytime the +% format is loaded. The is done by redefining locally \typeout to +% append its argument to the macro \mesg. +\def\mesg{} +{\def\typeout#1{\xdef\mesg{\mesg #1}} + \the\everyjob} +% (2) strip the useless parts from \mesg. This uses the fact that TeX +% allows to define macros with parameters delimited by arbitrary text. +\def\strip#1patterns for #2, loaded.#3\endmark{\def\langs{#2}} +\expandafter\strip\mesg\endmark +% (3) handle the result +\message{^^J\prefix checking for available hyphenation patterns... \langs} +\AddVariable{languages}{\langs} + +%%% Check for ec fonts. Most of this code has been shamelessely stolen +%%% from the file ltxcheck.tex in the LaTeX distribution. In particular, +%%% don't ask me how the macro \ecrm works... +\def\ecrm{% + \begingroup + \escapechar-1 + \xdef\reserved@a{% + \noexpand\in@ + {\expandafter\string\csname ecrm\endcsname}% + {\expandafter\expandafter\expandafter + \string\csname T1/cmr/m/n\endcsname}}% + \endgroup + \reserved@a} + +\message{^^J\prefix checking for default encoding (this may take a long time)^^J} +\font\test=ecrm1000\relax +\ifx\test\nullfont + \message{^^J\prefix\prefix checking for ec fonts... no^^J} + \AddVariable{ec}{no} + \AddVariable{fontenc}{default} +\else + \message{^^J\prefix\space\space checking for ec fonts... yes^^J} + \message{^^J\prefix\space\space checking for ec support in LaTeX format...} + \ecrm + \ifin@ + \message{yes^^J} + \AddVariable{ec}{yes} + \AddVariable{fontenc}{T1} + \message{^^J \prefix\space\space default encoding will be set to T1^^J} + \else + \message{no^^J} + \AddVariable{ec}{no} + \AddVariable{fontenc}{default} + \fi +\fi + + +%%% Document classes +% The list of layout files has been put in this file here by the +% configure script. +\input{chklayouts} + + +%%% Packages +\TestPackage{a4} +\TestPackage{a4wide} +\TestPackage{array} +\TestPackage{babel} +\TestPackage{color} % this one should be there if graphics.sty is there. +\TestPackage{fancyhdr} +\TestPackage{floatflt} +\TestPackage{setspace} +\TestPackage{subfigure} +\TestPackage{geometry} +\TestPackage{longtable} +\TestPackage{algorithm} +\TestPackage{rotating} +\TestPackage{latex8} +\TestPackage{url} +\TestPackage{varioref} +\TestPackage{prettyref} +\TestPackage{natbib} +\TestPackage{dvipost} + +% The test for the graphics package is slightly more involved... +\newcommand\groption{dvips} +\TestItem{graphicx}{package}{sty} +% Let's do some clever things to guess the default driver for the +% graphicx package. The maintainer of the site might have declared it +% in the file 'graphics.cfg'. Let's hope there are no strange commands +% in there... + {\renewcommand\ExecuteOptions[1]{\renewcommand\groption{default}} + \InputIfFileExists{graphics.cfg}{}{} + \AddPackage{graphicx}} + {\renewcommand{\groption}{none}} +\message{^^J\prefix checking for graphics driver... \groption^^J} +\AddVariable{graphicsdriver}{\groption} + +% psnfss is in fact the name of a set of style files, among which +% times.sty. If times.sty is here, we will assume that everything is +% fine. +\TestPackage[times.sty]{psnfss} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% END ACTUAL CONFIGURATION INSPECTION CODE %%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% End of the LaTeX job +\immediate\closeout\layouts +\immediate\closeout\sed +\immediate\closeout\vars +\immediate\closeout\packages +\typeout{\prefix Inspection done.} +\typeout{\prefix Read the file doc/LaTeXConfig.lyx for more information.} +% Get the real \end command, that has been hidden by LaTeX +\@@end diff --git a/development/Win32/fakeconfig/lyxrc.defaults b/development/Win32/fakeconfig/lyxrc.defaults new file mode 100644 index 0000000000..392cf11ade --- /dev/null +++ b/development/Win32/fakeconfig/lyxrc.defaults @@ -0,0 +1,94 @@ +# This file has been automatically generated by LyX' lib/configure +# script. It contains default settings that have been determined by +# examining your system. PLEASE DO NOT MODIFY ANYTHING HERE! If you +# want to customize LyX, make a copy of the file LYXDIR/lyxrc as +# ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will +# override the values given here. +\Format asciichess asc "ASCII (chess output)" "" "" "kedit" +\Format asciiimage asc "ASCII (image)" "" "" "kedit" +\Format asciixfig asc "ASCII (xfig output)" "" "" "kedit" +\Format agr agr GRACE "" "none" "none" +\Format bmp bmp BMP "" "kview" "gimp" +\Format date "" "date command" "" "" "" +\Format dateout tmp "date (output)" "" "" "kedit" +\Format docbook sgml DocBook B "" "kedit" +\Format docbook-xml xml "Docbook (xml)" "" "" "kedit" +\Format dvi dvi DVI D "xdvi" "" +\Format eps eps EPS "" "kghostview" "" +\Format fax "" Fax "" "" "" +\Format fen fen FEN "" "none" "none" +\Format fig fig XFig "" "xfig" "xfig" +\Format gif gif GIF "" "kview" "gimp" +\Format html html HTML H "mozilla file://$$p$$i" "" +\Format jpg jpg JPG "" "kview" "gimp" +\Format latex tex LaTeX L "" "kedit" +\Format linuxdoc sgml LinuxDoc x "" "kedit" +\Format lyx lyx LyX "" "lyx" "lyx" +\Format lyxpreview lyxpreview "LyX Preview" "" "" "" +\Format literate nw NoWeb N "" "kedit" +\Format pbm pbm PBM "" "kview" "gimp" +\Format pdf pdf "PDF (ps2pdf)" P "acroread" "" +\Format pdf2 pdf "PDF (pdflatex)" F "acroread" "" +\Format pdf3 pdf "PDF (dvipdfm)" m "acroread" "" +\Format pdftex pdftex_t PDFTEX "" "" "" +\Format pgm pgm PGM "" "kview" "gimp" +\Format png png PNG "" "kview" "gimp" +\Format ppm ppm PPM "" "kview" "gimp" +\Format program "" Program "" "" "" +\Format ps ps Postscript t "kghostview" "" +\Format pstex pstex_t PSTEX "" "" "" +\Format tgif obj TGIF "" "tgif" "tgif" +\Format sxw sxw "OpenOffice.Org Writer" O "" "" +\Format text txt ASCII A "" "kedit" +\Format textparagraph txt "ASCII (paragraphs)" "" "" "kedit" +\Format tiff tif TIFF "" "kview" "gimp" +\Format word doc Word W "" "" +\Format xbm xbm XBM "" "kview" "gimp" +\Format xpm xpm XPM "" "kview" "gimp" + +\converter date dateout "date +%d-%m-%Y > $$o" "" +\converter docbook docbook-xml "cp $$i $$o" "xml" +\converter docbook dvi "db2dvi $$i" "" +\converter docbook html "db2html $$i" "" +\converter dvi pdf3 "dvipdfm $$i" "" +\converter dvi ps "dvips -o $$o $$i" "" +\converter fen asciichess "python $$s/scripts/fen2ascii.py $$i $$o" "" +\converter fig pdftex "sh $$s/scripts/fig2pdftex.sh $$i $$o" "" +\converter fig pstex "sh $$s/scripts/fig2pstex.sh $$i $$o" "" +\converter html latex "none" "" +\converter latex html "latex2html -no_subdir -split 0 -show_section_numbers $$i" "originaldir,needaux" +\converter latex dvi "latex $$i" "latex" +\converter latex lyx "reLyX-1.4.0cvs -f $$i" "" +\converter latex pdf2 "pdflatex $$i" "latex" +\converter latex sxw "oolatex $$i" "latex" +\converter linuxdoc dvi "sgml2latex -o dvi $$i" "" +\converter linuxdoc html "sgml2html $$i" "" +\converter linuxdoc latex "sgml2latex $$i" "" +\converter linuxdoc lyx "sgml2lyx $$i" "" +\converter literate latex "none" "" +\converter literate lyx "none" "" +\converter lyxpreview png "python $$s/scripts/lyxpreview2bitmap.py" "" +\converter lyxpreview ppm "python $$s/scripts/lyxpreview2bitmap.py" "" +\converter ps fax "none" "" +\converter ps pdf "ps2pdf -dCompatibilityLevel=1.3 $$i" "" +\converter sxw latex "none" "" +\converter word latex "none" "" +\converter fig eps "fig2dev -L eps $$i $$o" "" +\converter fig ppm "fig2dev -L ppm $$i $$o" "" +\converter fig png "fig2dev -L png $$i $$o" "" +\converter tiff eps "tiff2ps $$i > $$o" "" +\converter tgif eps "tgif -stdout -print -color -eps $$i > $$o" "" +\converter tgif pdf "tgif -stdout -print -color -pdf $$i > $$o" "" +\converter eps pdf "epstopdf --outfile=$$o $$i" "" + +\copier fig "sh $$s/scripts/fig_copy.sh $$i $$o" +\copier pstex "python $$s/scripts/tex_copy.py $$i $$o $$l" +\copier pdftex "python $$s/scripts/tex_copy.py $$i $$o $$l" + + +\ascii_roff_command "groff -t -Tlatin1 $$FName" +\chktex_command "none" +\spell_command "ispell" +\print_spool_command "lp" +\print_spool_printerprefix "-d " +\font_encoding "T1" diff --git a/development/Win32/fakeconfig/packages.lst b/development/Win32/fakeconfig/packages.lst new file mode 100644 index 0000000000..ef7b9c88b1 --- /dev/null +++ b/development/Win32/fakeconfig/packages.lst @@ -0,0 +1,17 @@ +a4 +a4wide +array +babel +color +fancyhdr +floatflt +setspace +subfigure +geometry +longtable +rotating +url +varioref +natbib +graphicx +psnfss diff --git a/development/Win32/fakeconfig/textclass.lst b/development/Win32/fakeconfig/textclass.lst new file mode 100644 index 0000000000..58e6bb07bf --- /dev/null +++ b/development/Win32/fakeconfig/textclass.lst @@ -0,0 +1,74 @@ +## This file declares layouts and their associated definition files. +## It has been automatically generated by configure +## Use "Options/Reconfigure" if you need to update it after a +## configuration change. Run ./configure manually to update the +## system wide version of this file. +"IEEEtran" "IEEEtran" "article (IEEEtran)" "false" +"aa" "aa" "article (A&A)" "false" +"aapaper" "aa" "article (A&A V4)" "false" +"aastex" "aastex" "article (AASTeX)" "false" +"agu-dtd" "AGU-article" "AGU Article (SGML)" "true" +"agums" "aguplus" "article (AGU++) manuscript" "false" +"amsart-plain" "amsart" "article (AMS, unnumbered)" "true" +"amsart-seq" "amsart" "article (AMS, sequential numbering)" "true" +"amsart" "amsart" "article (AMS)" "true" +"amsbook" "amsbook" "book (AMS)" "true" +"apa" "apa" "APA style" "false" +"article" "article" "article" "true" +"book" "book" "book" "true" +"broadway" "broadway" "broadway" "false" +"chess" "article" "article (Chess)" "false" +"cl2emult" "cl2emult" "article (cl2emult)" "false" +"cv" "cv" "curriculum vitae" "false" +"dinbrief" "dinbrief" "letter (german)" "true" +"docbook-book" "book" "DocBook book (SGML)" "true" +"docbook-chapter" "chapter" "DocBook chapter (SGML)" "true" +"docbook-section" "section" "DocBook section (SGML)" "true" +"docbook" "article" "DocBook article (SGML)" "true" +"dtk" "dtk" "article (dtk)" "false" +"egs" "egs" "article (European Geophysical Society) egs" "false" +"elsart" "elsart" "article (elsevier)" "false" +"entcs" "entcs" "article (ENTCS)" "false" +"extarticle" "extarticle" "extarticle" "true" +"extbook" "extbook" "extbook" "true" +"extletter" "extletter" "extletter" "true" +"extreport" "extreport" "extreport" "true" +"foils" "foils" "slides (FoilTeX)" "true" +"g-brief-de" "g-brief" "letter (g-brief)" "false" +"g-brief-en" "g-brief" "letter (g-brief)" "false" +"g-brief2" "g-brief2" "letter (g-brief2)" "false" +"heb-article" "article" "article (Hebrew)" "true" +"heb-letter" "letter" "letter (Hebrew)" "true" +"hollywood" "hollywood" "hollywood" "false" +"ijmpd" "ws-ijmpd" "article (ijmpd)" "false" +"jgrga" "aguplus" "article (AGU++) JGR" "false" +"kluwer" "kluwer" "article (Kluwer)" "false" +"latex8" "article" "article (Latex8)" "false" +"letter" "letter" "letter" "true" +"linuxdoc" "article" "LinuxDoc article (SGML)" "true" +"literate-article" "article" "article (Noweb)" "false" +"literate-book" "book" "book (Noweb)" "false" +"literate-report" "report" "report (Noweb)" "false" +"llncs" "llncs" "Springer - Lecture Notes in Comp. Sci." "false" +"ltugboat" "ltugboat" "article (tugboat)" "false" +"manpage" "manpage" "LinuxDoc manpage (SGML)" "true" +"memoir" "memoir" "memoir" "false" +"mwart" "mwart" "article (mwart)" "true" +"mwbk" "mwbk" "book (mwbk)" "true" +"mwrep" "mwrep" "report (mwrep)" "true" +"paper" "paper" "article (paper)" "false" +"report" "report" "report" "true" +"revtex" "revtex" "article (REVTeX)" "false" +"revtex4" "revtex4" "article (REVTeX 4)" "true" +"scrartcl" "scrartcl" "article (koma-script)" "true" +"scrbook" "scrbook" "book (koma-script)" "true" +"scrlettr" "scrlettr" "letter (koma-script)" "true" +"scrlttr2" "scrlttr2" "letter (koma-script v.2)" "true" +"scrreprt" "scrreprt" "report (koma-script)" "true" +"seminar" "seminar" "seminar" "true" +"siamltex" "siamltex" "article (siamltex)" "false" +"slides" "slides" "slides (default)" "true" +"spie" "spie" "article (SPIE-Proceedings)" "false" +"svglobal" "svjour" "article (Springer - svjour/global)" "false" +"svjog" "svjour" "article (Springer - svjour/jog)" "false" +"svprobth" "svjour" "article (Springer - svjour/PTRF)" "false" diff --git a/development/Win32/readme.txt b/development/Win32/readme.txt index cddee7780d..1de92c00c3 100644 --- a/development/Win32/readme.txt +++ b/development/Win32/readme.txt @@ -24,13 +24,13 @@ Development: To get a stack-trace for assertions in LyX, make a breakpoint in src/Boost.C. To see the output from LyX, add "2> c:\errors.txt" to the command -line in Project, Build properties, Debugging, Command arguments +line in Project, Build properties, Debugging, Command arguments To run LyX, you need a bunch of generated files from configure. -Run "fake.bat" to copy chkconfig.ltx, LaTeXConfig.lyx and lyxrc.defaults -from this directory to their destination. +Run "fake.bat" to copy chkconfig.ltx, lyxrc.defaults, packages.lst +and textclass.lst from fakeconfig to their destination. At start-up, you might get an assertion about a unix path in boost::filesystem. You can safely ignore that.