mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
From Joost Verburg: Put the clean_dvi.py script into the main distribution
* lib/configure.py (checkLatex): Add DraftDVI converter on windows if dv2dt and dt2dv are available (checkFormatEntries): Add DraftDVI entry on windows if dv2dt and dt2dv are available * lib/Makefile.am: add clean_dvi.py * development/Win32/packaging/build_lyxwin.sh: remove clean_dvi.py stuff * development/Win32/packaging/package_lyxwin.sh: remove configure mangling for clean_dvi.py * development/Win32/packaging/clean_dvi.py: move to lib/scripts * development/Win32/packaging/README: remove clean_dvi.py stuff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13924 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a96b307c42
commit
f0f4e2c042
@ -24,12 +24,8 @@ the process:
|
||||
|
||||
* Strip the binaries in $PREFIX/bin/ of all debugging info.
|
||||
|
||||
* Copy dt2dv.exe and dv2dt.exe to $PREFIX/bin/ and clean_dvi.py to
|
||||
$PREFIX/Resources/scripts/ These are needed to enable dvips, yap
|
||||
et al. to cope with "file names with spaces".
|
||||
|
||||
* Add formats and converters to the $PREFIX/Resources/configure
|
||||
script so that users can use the clean_dvi script transparently.
|
||||
* Copy dt2dv.exe and dv2dt.exe to $PREFIX/bin/. These are needed to enable
|
||||
dvips, yap et al. to cope with "file names with spaces".
|
||||
|
||||
* Remove all stuff generated by running configure. It makes sense on
|
||||
your machine only, not for whoever is installing LyX. Specifically
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
# It asks whether the Qt and LyX cvs trees are up to date.
|
||||
# It asks whether the Qt library has been compiled.
|
||||
# It checks that qt-mt3.dll, mingw10.dll and clean_dvi.py exist.
|
||||
# It checks that qt-mt3.dll and mingw10.dll exist.
|
||||
# It compiles the dv2dt and dt2dv utilites.
|
||||
# It compiles and installs LyX.
|
||||
|
||||
@ -30,7 +30,6 @@ QT_DIR="${HOME}"/Qt/3x-msys
|
||||
LYX_DIR="../../.."
|
||||
PACKAGING_DIR="$LYX_DIR/development/Win32/packaging"
|
||||
DTL_DIR="$PACKAGING_DIR/dtl"
|
||||
CLEAN_DVI_DIR="$PACKAGING_DIR"
|
||||
|
||||
ASPELL_INSTALL_DIR="c:/Aspell"
|
||||
LYX_ASPELL_DIR="/c/Aspell" # the Autotools don't like "C:/" syntax.
|
||||
@ -43,7 +42,6 @@ MINGW_DLL="${MINGW_DIR}/bin/mingwm10.dll"
|
||||
|
||||
DT2DV="${DTL_DIR}/dt2dv.exe"
|
||||
DV2DT="${DTL_DIR}/dv2dt.exe"
|
||||
CLEAN_DVI_PY="${CLEAN_DVI_DIR}/clean_dvi.py"
|
||||
|
||||
# Change this to 'mv -f' when you are confident that
|
||||
# the various sed scripts are working correctly.
|
||||
@ -72,8 +70,8 @@ query_qt()
|
||||
|
||||
check_files_exist()
|
||||
{
|
||||
# Check that the dlls and clean_dvi.py exist
|
||||
for file in "${QT_DLL}" "${MINGW_DLL}" "${CLEAN_DVI_PY}"
|
||||
# Check that the dlls exist
|
||||
for file in "${QT_DLL}" "${MINGW_DLL}"
|
||||
do
|
||||
test -r "${file}" || {
|
||||
echo "$file does not exist" >&2
|
||||
|
@ -7,7 +7,6 @@
|
||||
# qt-mt3.dll
|
||||
# iconv.dll
|
||||
# mingw10.dll
|
||||
# clean_dvi.py
|
||||
# dv2dt.exe
|
||||
# dt2dv.exe
|
||||
|
||||
@ -28,7 +27,6 @@
|
||||
QT_DLL="$HOME/Qt/3x-msys/bin/qt-mt3.dll"
|
||||
ICONV_DLL="/j/MinGW/bin/iconv.dll"
|
||||
MINGW_DLL="/j/MinGW/bin/mingwm10.dll"
|
||||
CLEAN_DVI_PY="clean_dvi.py"
|
||||
DTL_DIR=dtl
|
||||
DT2DV="$DTL_DIR/dt2dv.exe"
|
||||
DV2DT="$DTL_DIR/dv2dt.exe"
|
||||
@ -41,7 +39,7 @@ MV='mv -f'
|
||||
|
||||
windows_packaging()
|
||||
{
|
||||
# Install the necessary .dlls and clean_dvi stuff.
|
||||
# Install the necessary .dlls.
|
||||
for file in "${QT_DLL}" "${ICONV_DLL}" "${MINGW_DLL}" "${DT2DV}" "${DV2DT}"
|
||||
do
|
||||
cp "${file}" "$LYX_INSTALL_DIR"/bin/. || {
|
||||
@ -50,11 +48,6 @@ windows_packaging()
|
||||
}
|
||||
done
|
||||
|
||||
cp "${CLEAN_DVI_PY}" "$LYX_INSTALL_DIR"/Resources/scripts/. || {
|
||||
echo "Failed to copy ${CLEAN_DVI_PY} to the LyX package" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Strip the executables
|
||||
(
|
||||
cd "${LYX_INSTALL_DIR}/bin"
|
||||
@ -64,36 +57,6 @@ windows_packaging()
|
||||
done
|
||||
)
|
||||
|
||||
# Modify the configure script,
|
||||
# * add a dvi2 format
|
||||
# * change the latex->dvi converter to latex->dvi2
|
||||
# * add a dvi2->dvi converter
|
||||
# * fix the generated chkconfig.sed so that it works with versions of
|
||||
# sed that get confused by sed scripts with DOS line endings.
|
||||
TMP=tmp.$$
|
||||
CONFIGURE="${LYX_INSTALL_DIR}"/Resources/configure
|
||||
# Do this to make it easy to compare the before and after files.
|
||||
dos2unix "${CONFIGURE}"
|
||||
sed '
|
||||
# (Note that this sed script contains TAB characters.)
|
||||
# Append the dvi2 format after the dvi format.
|
||||
/^ *\\\\Format[ ]\{1,\}dvi[ ]\{1,\}/a\
|
||||
\\\\Format dvi2 dvi DraftDVI ""
|
||||
|
||||
# Change the latex->dvi converter to latex->dvi2
|
||||
# and append the dvi2->dvi converter
|
||||
/^ *\\\\converter[ ]\{1,\}latex[ ]\{1,\}dvi[ ]\{1,\}/{
|
||||
s/dvi/dvi2/
|
||||
a\
|
||||
\\\\converter dvi2 dvi "python \\\$\\\$s/scripts/clean_dvi.py \\\$\\\$i \\\$\\\$o" ""
|
||||
}
|
||||
' "${CONFIGURE}" > "${TMP}"
|
||||
cmp -s "${CONFIGURE}" "${TMP}" || {
|
||||
diff -u "${CONFIGURE}" "${TMP}"
|
||||
${MV} "${TMP}" "${CONFIGURE}"
|
||||
}
|
||||
rm -f "${TMP}"
|
||||
|
||||
# Strip the executables
|
||||
(
|
||||
cd "${LYX_INSTALL_DIR}/Resources"
|
||||
|
@ -878,6 +878,7 @@ scriptsdir = $(pkgdatadir)/scripts
|
||||
# in install-data-hook.
|
||||
dist_scripts_DATA = \
|
||||
scripts/TeXFiles.sh \
|
||||
scripts/clean_dvi.py \
|
||||
scripts/convertDefault.sh \
|
||||
scripts/fen2ascii.py \
|
||||
scripts/fig2pdftex.sh \
|
||||
|
@ -168,8 +168,17 @@ def checkProg(description, progs, rc_entry = [], path = [] ):
|
||||
def checkLatex():
|
||||
''' Check latex, return lyx_check_config '''
|
||||
# Find programs! Returned path is not used now
|
||||
path, LATEX = checkProg( 'a Latex2e program', ['pplatex $$i', 'latex $$i', 'latex2e $$i'],
|
||||
rc_entry = [ r'\converter latex dvi "%%" "latex"' ] )
|
||||
if os.name == 'nt' or sys.platform == 'cygwin':
|
||||
# Windows only: DraftDVI
|
||||
if checkProg('DVI to DTL converter', ['dv2dt']) != ['', 'none'] and checkProg('DTL to DVI converter', ['dt2dv']) != ['', 'none']:
|
||||
converter_entry = r'''\converter latex dvi2 "%%" "latex"
|
||||
\converter dvi2 dvi "python $$s/scripts/clean_dvi.py $$i $$o" ""'''
|
||||
else:
|
||||
converter_entry = r'\converter latex dvi "%%" "latex"'
|
||||
else:
|
||||
converter_entry = r'\converter latex dvi "%%" "latex"'
|
||||
path, LATEX = checkProg('a Latex2e program', ['pplatex $$i', 'latex $$i', 'latex2e $$i'],
|
||||
rc_entry = [converter_entry])
|
||||
# no latex
|
||||
if LATEX != 'none':
|
||||
# Check if latex is usable
|
||||
@ -248,6 +257,10 @@ def checkFormatEntries():
|
||||
#
|
||||
checkProg('a DVI previewer', ['xdvi', 'kdvi'],
|
||||
rc_entry = [ r'\Format dvi dvi DVI D "%%" "" "document"' ])
|
||||
if os.name == 'nt' or sys.platform == 'cygwin':
|
||||
# Windows only: DraftDVI
|
||||
if checkProg('DVI to DTL converter', ['dv2dt']) != ['', 'none'] and checkProg('DTL to DVI converter', ['dt2dv']) != ['', 'none']:
|
||||
addToRC(r'\Format dvi2 dvi DraftDVI "" "" "document"')
|
||||
#
|
||||
checkProg('a HTML previewer', ['mozilla file://$$p$$i', 'netscape'],
|
||||
rc_entry = [ r'\Format html html HTML H "%%" "" "document"' ])
|
||||
|
Loading…
Reference in New Issue
Block a user