Debian Codegraph @

texk/gregorio/gregorio-src/contrib/system-setup.bat

raw
1 @echo off
2 SETLOCAL ENABLEEXTENSIONS EnableDelayedExpansion
3
4 set output="%TEMP%\system-setup.log"
5
6 echo Gregorio Windows Setup Diagnostic Tool
7 echo (C) 2015 The Gregorio Project.
8 echo.
9 echo Gregorio is free software: you can redistribute it and/or modify
10 echo it under the terms of the GNU General Public License as published by
11 echo the Free Software Foundation, either version 3 of the License, or
12 echo (at your option) any later version.
13 echo.
14 echo This program is distributed in the hope that it will be useful,
15 echo but WITHOUT ANY WARRANTY; without even the implied warranty of
16 echo MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 echo GNU General Public License for more details.
18 echo.
19 echo You should have received a copy of the GNU General Public License
20 echo along with this program. If not, see http://www.gnu.org/licenses/.
21 echo.
22 echo Creating system-setup.log...
23
24 echo ### Gregorio Windows Setup Results > %output%
25 echo #### Created: %date% >> %output%
26 echo ----------------------------------------------------------------------------- >> %output%
27 echo. >> %output%
28 echo. >> %output%
29
30 echo ### Windows Version >> %output%
31 ver >> %output%
32 echo. >> %output%
33 echo. >> %output%
34 echo ----------------------------------------------------------------------------- >> %output%
35 echo. >> %output%
36 echo. >> %output%
37
38 echo ### LuaTeX Setup >> %output%
39 echo #### Version >> %output%
40 echo. >> %output%
41 luatex -v >> %output% 2>&1
42 echo. >> %output%
43 echo #### Location >> %output%
44 echo. >> %output%
45 @for %%e in (%PATHEXT%) do @for %%i in (luatex%%e) do @if NOT "%%~$PATH:i"=="" echo %%~$PATH:i >> %output% 2>&1
46 echo. >> %output%
47 echo. >> %output%
48 echo #### TEXMFDIST >> %output%
49 kpsewhich --var-value=TEXMFDIST >> %output% 2>&1
50 echo. >> %output%
51 echo #### TEXMFLOCAL >> %output%
52 echo. >> %output%
53 for /f "delims=" %%i in ('kpsewhich --var-value TEXMFLOCAL') do set texmflocal=%%i
54 echo %texmflocal% >> %output% 2>&1
55 set texmflocal=%texmflocal:/=\%
56 IF NOT EXIST %texmflocal% ECHO Folder does not exist >> %output% 2>&1
57 echo. >> %output%
58 echo #### TEXINPUTS.lualatex >> %output%
59 kpsewhich --var-value=TEXINPUTS.lualatex >> %output% 2>&1
60 echo. >> %output%
61 echo #### LUAINPUTS.lualatex >> %output%
62 kpsewhich --var-value=LUAINPUTS.lualatex >> %output% 2>&1
63 echo. >> %output%
64 echo #### shell_escape >> %output%
65 kpsewhich --var-value=shell_escape >> %output% 2>&1
66 echo. >> %output%
67 echo #### Shell Escape Commands >> %output%
68 kpsewhich --var-value=shell_escape_commands >> %output% 2>&1
69 echo. >> %output%
70 echo #### openout_any >> %output%
71 kpsewhich --var-value=openout_any >> %output% 2>&1
72 echo. >> %output%
73 echo #### openin_any >> %output%
74 kpsewhich --var-value=openin_any >> %output% 2>&1
75 echo. >> %output%
76 echo. >> %output%
77 echo ----------------------------------------------------------------------------- >> %output%
78 echo. >> %output%
79 echo. >> %output%
80
81 echo ### Gregorio Setup >> %output%
82 echo #### Locations and Versions >> %output%
83 for /f "delims=" %%G in ('where /f gregorio*') do (
84 echo %%G >> %output%
85 for /f "delims=" %%H in ('%%G -V') do echo %%H >> %output% 2>&1
86 echo. >> %output%
87 )
88 echo #### GregorioTeX Locations >> %output%
89 echo. >> %output%
90
91 :: Files using GREGORIO_VERSION in {}
92 set files=gregoriosyms.sty ^
93 gregoriotex-chars.tex ^
94 gregoriotex-main.tex ^
95 gregoriotex-nabc.tex ^
96 gregoriotex-signs.tex ^
97 gregoriotex-spaces.tex ^
98 gregoriotex-syllable.tex ^
99 gregoriotex-common.tex ^
100 gregoriotex-symbols.tex
101
102 for %%G in (%files%) do (
103 echo ##### %%G >> %output%
104 for /f "delims=" %%H in ('kpsewhich -all %%G') do (
105 set loc=%%H
106 set loc=!loc:/=\!
107 echo !loc! >> %output%
108 for /f "delims=" %%I in ('findstr /r "GREGORIO_VERSION" "!loc!"') do set ver=%%I
109 set ver=!ver:*{=!
110 set ver=!ver:*{=!
111 set trash=}!ver:*}=!
112 call set ver=%%ver:!trash!=%%
113 echo !ver! >> %output% 2>&1
114 set ver=
115 )
116 )
117
118 :: Files using GREGORIO_VERSION in spaces
119 set files=gregoriotex-nabc.lua ^
120 gregoriotex-signs.lua ^
121 gregoriotex-symbols.lua
122
123 for %%G in (%files%) do (
124 echo ##### %%G >> %output%
125 for /f "delims=" %%H in ('kpsewhich -all %%G') do (
126 set loc=%%H
127 set loc=!loc:/=\!
128 echo !loc! >> %output%
129 for /f "delims=" %%I in ('findstr /r "GREGORIO_VERSION" "!loc!"') do set ver=%%I
130 set ver=!ver:*N =!
131 echo !ver! >> %output% 2>&1
132 set ver=
133 )
134 )
135
136 :: Files using GREGORIO_VERSION in ''
137 set files=gregoriotex.lua
138
139 for %%G in (%files%) do (
140 echo ##### %%G >> %output%
141 for /f "delims=" %%H in ('kpsewhich -all %%G') do (
142 set loc=%%H
143 set loc=!loc:/=\!
144 echo !loc! >> %output%
145 for /f "delims=" %%I in ('findstr /r "GREGORIO_VERSION" "!loc!"') do set ver=%%I
146 set ver=!ver:*'=!
147 set trash='!ver:*'=!
148 call set ver=%%ver:!trash!=%%
149 echo !ver! >> %output% 2>&1
150 set ver=
151 )
152 )
153
154 :: Files using PARSE_VERSION_DATE_LTX
155 set files=gregoriotex.sty ^
156 gregoriotex.tex
157
158 for %%G in (%files%) do (
159 echo ##### %%G >> %output%
160 for /f "delims=" %%H in ('kpsewhich -all %%G') do (
161 set loc=%%H
162 set loc=!loc:/=\!
163 echo !loc! >> %output%
164 for /f "delims=" %%I in ('findstr /r "PARSE_VERSION_DATE_LTX" "!loc!"') do set ver=%%I
165 set ver=!ver:*v=!
166 set trash=G!ver:*G=!
167 call set ver=%%ver:!trash!=%%
168 echo !ver! >> %output% 2>&1
169 set ver=
170 )
171 )
172
173 :: Font Files
174 set files=greciliae.ttf ^
175 greciliae-hollow.ttf ^
176 greciliae-hole.ttf ^
177 greciliae-op.ttf ^
178 greciliae-op-hollow.ttf ^
179 greciliae-op-hole.ttf ^
180 greextra.ttf ^
181 gregorio.ttf ^
182 gregorio-hollow.ttf ^
183 gregorio-hole.ttf ^
184 gregorio-op.ttf ^
185 gregorio-op-hollow.ttf ^
186 gregorio-op-hole.ttf ^
187 granapadano.ttf ^
188 granapadano-hollow.ttf ^
189 granapadano-hole.ttf ^
190 granapadano-op.ttf ^
191 granapadano-op-hollow.ttf ^
192 granapadano-op-hole.ttf ^
193 gregall.ttf
194
195 for %%G in (%files%) do (
196 echo ##### %%G >> %output%
197 for /f "delims=" %%H in ('kpsewhich -all %%G') do (
198 set loc=%%H
199 set loc=!loc:/=\!
200 echo !loc! >> %output%
201 otfinfo --font-version "!loc!" >> %output% 2>&1
202 )
203 )
204
205 :: Unversioned and Obsolete Files
206 set files=gregorio-vowels.dat ^
207 gsp-default.tex ^
208 gregoriotex-ictus.tex ^
209 gresym.ttf ^
210 parmesan.ttf ^
211 parmesan-op.ttf ^
212 gregsmodern.ttf
213
214 for %%G in (%files%) do (
215 echo ##### %%G >> %output%
216 for /f "delims=" %%H in ('kpsewhich -all %%G') do (
217 set loc=%%H
218 set loc=!loc:/=\!
219 echo !loc! >> %output%
220 )
221 )
222
223 echo. >> %output%
224 echo #### kpsewhich --all -engine luatex -progname lualatex gregoriotex.sty >> %output%
225 kpsewhich --all -engine luatex -progname lualatex gregoriotex.sty >> %output% 2>&1
226 echo. >> %output%
227 echo #### kpsewhich --all -engine luatex gregoriotex.tex >> %output%
228 kpsewhich --all -engine luatex gregoriotex.tex >> %output% 2>&1
229 echo. >> %output%
230 echo. >> %output%
231 echo ----------------------------------------------------------------------------- >> %output%
232 echo. >> %output%
233 echo. >> %output%
234
235 echo.
236 echo.
237 echo system-setup.log created and saved in a temporary location.
238 echo Upon exiting this script, the log will be opened in Notepad for you.
239 echo Please save the file to a convenient location and email it to
240 echo [email protected] as part of your bug report.
241 echo.
242 echo You can also create an issue at
243 echo http://github.com/gregorio-project/gregorio/issues
244 echo and copy-paste the content of this file into the description.
245 echo.
246 pause
247 start notepad %output%