#! /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 # iconv.dll # mingw10.dll # dv2dt.exe # dt2dv.exe # It strips the executables. # It adds formats and converters to the Resources/configure script to # ensure that the generated .dvi file is usable. # It removes all stuff generated by running configure: # xfonts/ # doc/LaTeXConfig.lyx # lyxrc.defaults # packages.lst # textclass.lst # The installee should regenerate them by running configure on his machine. QT_DLL="$HOME/Qt/3x-msys/bin/qt-mt3.dll" ICONV_DLL="/j/MinGW/bin/iconv.dll" MINGW_DLL="/j/MinGW/bin/mingwm10.dll" DTL_DIR=dtl DT2DV="$DTL_DIR/dt2dv.exe" DV2DT="$DTL_DIR/dv2dt.exe" LYX_INSTALL_DIR="../../../build/installprefix" # Change this to 'mv -f' when you are confident that # the various sed scripts are working correctly. MV='mv -f' windows_packaging() { # Install the necessary .dlls. for file in "${QT_DLL}" "${ICONV_DLL}" "${MINGW_DLL}" "${DT2DV}" "${DV2DT}" 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 ( cd "${LYX_INSTALL_DIR}/Resources" rm -rf xfonts for file in doc/LaTeXConfig.lyx lyxrc.defaults packages.lst textclass.lst do rm -f $file done ) } windows_packaging || exit 1 # The end