]> git.lyx.org Git - lyx.git/blob - development/Win32/packaging/package_lyxwin.sh
Fix humiliating typo and update the link to the licence page on the web.
[lyx.git] / development / Win32 / packaging / package_lyxwin.sh
1 #! /bin/sh
2
3 # This script aims to do averything necessary to automate the packaging
4 # of LyX/Win ready for an Windows Installer to be built.
5
6 # It copies these files into the appropriate places in the LyX tree.
7 #   qt-mt3.dll
8 #   iconv.dll
9 #   mingw10.dll
10 #   dv2dt.exe
11 #   dt2dv.exe
12
13 # It strips the executables.
14
15 # It adds formats and converters to the Resources/configure script to
16 # ensure that the generated .dvi file is usable.
17
18 # It removes all stuff generated by running configure:
19 #   xfonts/
20 #   doc/LaTeXConfig.lyx
21 #   lyxrc.defaults
22 #   packages.lst
23 #   textclass.lst
24
25 # The installee should regenerate them by running configure on his machine.
26
27 QT_DLL="$HOME/Qt/3x-msys/bin/qt-mt3.dll"
28 ICONV_DLL="/j/MinGW/bin/iconv.dll"
29 MINGW_DLL="/j/MinGW/bin/mingwm10.dll"
30 DTL_DIR=dtl
31 DT2DV="$DTL_DIR/dt2dv.exe"
32 DV2DT="$DTL_DIR/dv2dt.exe"
33
34 LYX_INSTALL_DIR="../../../build/installprefix"
35
36 # Change this to 'mv -f' when you are confident that
37 # the various sed scripts are working correctly.
38 MV='mv -f'
39
40 windows_packaging()
41 {
42     # Install the necessary .dlls.
43     for file in "${QT_DLL}" "${ICONV_DLL}" "${MINGW_DLL}" "${DT2DV}" "${DV2DT}"
44     do
45       cp "${file}" "$LYX_INSTALL_DIR"/bin/. || {
46           echo "Failed to copy ${file} to the LyX package" >&2
47           exit 1
48       }
49     done
50
51     # Strip the executables
52     (
53         cd "${LYX_INSTALL_DIR}/bin"
54         for file in *.exe
55         do
56           strip $file
57         done
58     )
59
60     # Strip the executables
61     (
62         cd "${LYX_INSTALL_DIR}/Resources"
63         rm -rf xfonts
64         for file in doc/LaTeXConfig.lyx lyxrc.defaults packages.lst textclass.lst
65         do
66           rm -f $file
67         done
68     )
69 }
70
71
72 windows_packaging || exit 1
73
74 # The end