2005-06-06 13:00:52 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
# This script aims to do averything necessary to automate the packaging
|
|
|
|
# of LyX/Win ready for an Windows Installer to be built.
|
|
|
|
|
|
|
|
# It copies these files into the appropriate places in the LyX tree.
|
|
|
|
# qt-mt3.dll
|
2006-03-02 19:14:09 +00:00
|
|
|
# iconv.dll
|
2005-06-06 13:00:52 +00:00
|
|
|
# mingw10.dll
|
|
|
|
# dv2dt.exe
|
|
|
|
# dt2dv.exe
|
|
|
|
|
|
|
|
# It strips the executables.
|
|
|
|
|
2006-03-02 19:14:09 +00:00
|
|
|
# It adds formats and converters to the Resources/configure script to
|
2005-06-06 13:00:52 +00:00
|
|
|
# ensure that the generated .dvi file is usable.
|
|
|
|
|
|
|
|
# It removes all stuff generated by running configure:
|
2005-07-17 21:31:02 +00:00
|
|
|
# xfonts/
|
2005-06-06 13:00:52 +00:00
|
|
|
# doc/LaTeXConfig.lyx
|
|
|
|
# lyxrc.defaults
|
|
|
|
# packages.lst
|
|
|
|
# textclass.lst
|
|
|
|
|
|
|
|
# The installee should regenerate them by running configure on his machine.
|
|
|
|
|
2006-03-02 19:14:09 +00:00
|
|
|
QT_DLL="$HOME/Qt/3x-msys/bin/qt-mt3.dll"
|
|
|
|
ICONV_DLL="/j/MinGW/bin/iconv.dll"
|
2005-06-06 13:00:52 +00:00
|
|
|
MINGW_DLL="/j/MinGW/bin/mingwm10.dll"
|
|
|
|
DTL_DIR=dtl
|
|
|
|
DT2DV="$DTL_DIR/dt2dv.exe"
|
|
|
|
DV2DT="$DTL_DIR/dv2dt.exe"
|
|
|
|
|
2005-07-15 10:05:13 +00:00
|
|
|
LYX_INSTALL_DIR="../../../build/installprefix"
|
2005-06-06 13:00:52 +00:00
|
|
|
|
|
|
|
# Change this to 'mv -f' when you are confident that
|
|
|
|
# the various sed scripts are working correctly.
|
|
|
|
MV='mv -f'
|
|
|
|
|
|
|
|
windows_packaging()
|
|
|
|
{
|
2006-05-24 20:06:42 +00:00
|
|
|
# Install the necessary .dlls.
|
2006-03-02 19:14:09 +00:00
|
|
|
for file in "${QT_DLL}" "${ICONV_DLL}" "${MINGW_DLL}" "${DT2DV}" "${DV2DT}"
|
2005-06-06 13:00:52 +00:00
|
|
|
do
|
|
|
|
cp "${file}" "$LYX_INSTALL_DIR"/bin/. || {
|
|
|
|
echo "Failed to copy ${file} to the LyX package" >&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
done
|
|
|
|
|
|
|
|
# Strip the executables
|
|
|
|
(
|
|
|
|
cd "${LYX_INSTALL_DIR}/bin"
|
|
|
|
for file in *.exe
|
|
|
|
do
|
|
|
|
strip $file
|
|
|
|
done
|
|
|
|
)
|
|
|
|
|
|
|
|
# Strip the executables
|
|
|
|
(
|
2006-03-02 19:14:09 +00:00
|
|
|
cd "${LYX_INSTALL_DIR}/Resources"
|
2005-07-17 21:31:02 +00:00
|
|
|
rm -rf xfonts
|
2005-06-06 13:00:52 +00:00
|
|
|
for file in doc/LaTeXConfig.lyx lyxrc.defaults packages.lst textclass.lst
|
|
|
|
do
|
|
|
|
rm -f $file
|
|
|
|
done
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
windows_packaging || exit 1
|
|
|
|
|
|
|
|
# The end
|