4 # Installed MinGW needed.
6 # sudo apt-get install g++-mingw-w64-i686
7 # sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
8 # sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
14 echo "Usage: xmingw <path to LyX sources>"
22 # ---------------------------------------------------------
23 # set 'versionname' to overwrite generated one based on 'ver'
26 date=`date --utc '+%Y.%m.%d-%H.%M'`
27 if [ -z $versionname ]; then
28 versionname=LyX$ver-$date
32 echo ---------------------------------------------------------
33 echo ---------- Building $versionname
34 echo ---------------------------------------------------------
36 # ---------------------------------------------------------
38 # helper function to check return code
42 if [ $exitcode -ne 0 ]; then
48 dep=$lyxsrcdir/../lyx-dependencies
52 server=http://sourceforge.net/projects/kst/files/3rdparty
54 if [ "$2" = "x64" ]; then
55 mingw=x86_64-w64-mingw32
57 branch=LyX$ver-master-win64
60 mingw=i686-w64-mingw32
61 branch=LyX$ver-master-win32
65 qtver=Qt-$qtver-$mingw
69 echo Checking mingw installation ...
70 $compiler-gcc -dumpversion
74 # ---------------------------------------------------------
76 # download and unpack Qt
78 if [ ! -d $dep/$qtver ]; then
79 qttar=$qtver-Ubuntu64-$LTS$tarver.tar
80 wget $server/$qttar.xz
84 tar xf $builddir/$qttar
86 echo -e "[Paths]\nPrefix = $dep/$qtver" > $dep/$qtver/bin/qt.conf
89 export PATH=$dep/$qtver/bin:$PATH
90 echo Checking Qt installation ...
96 # ---------------------------------------------------------
101 mergefile=-DLYX_MERGE_FILES=1
105 -DCMAKE_VERBOSE_MAKEFILE=1 \
107 -DLYX_PROGRAM_SUFFIX="" \
108 -DLYX_CONSOLE=FORCE \
109 -DLYX_XMINGW=$compiler \
113 -DLYX_3RDPARTY_BUILD=1 \
121 make -j$processors $1
135 # ---------------------------------------------------------