summaryrefslogtreecommitdiffstats
path: root/win/makedist
blob: 21e89fffc6f8d833cf6361e1b0f77b6dd6672f24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash

# define VERSION on cmdline
# usage:
# VERSION=1.xx-win32 makedist

# script for creating a windows distribution file
# works on MinGW32/msys platform
#  additionally installed:
#  freeglut-2.8.1  ./configure --without-x --prefix=/mingw
#  jpeg-9a  ./configure --prefix=/mingw

# we use and _ship_ gnuplot 4.2.6

# configure and build (only ogie/src)
cd ..
./configure

cd src
make

DOCS_WIN="../ChangeLog ../COPYING README_windows.txt"
PDFDOC="../doc/GPLIGC_Manual.pdf"
PERL_BIN="install_windows.pl ../perl/GPLIGC.pl ../perl/GPLIGCfunctions.pm ../perl/gpsp2igc.pl ../perl/gpsp2igcfile.pl ../perl/loopviewer.pl"
IMG="../images/logo*"
CONF="../src/.ogierc"
BIN_WIN="../src/*.exe"

# gnuplot 4.2.6   --> other versions need to be checked / compiled on mingw (dependencies)
GNUPLOT_BIN="../../gnuplot-4.2.6/bin/wgnuplot.exe"
GNUPLOT_HELP="../../gnuplot-4.2.6/bin/wgnuplot.hlp"
GNUPLOT_LIC="../../gnuplot-4.2.6/Copyright"

# dlls to ship
DLL="/mingw/bin/libglut-0.dll /mingw/bin/libjpeg-9.dll /mingw/bin/libstdc++-6.dll /mingw/bin/libgcc_s_dw2-1.dll"

# these have to be treated with unix2dos (files from DOCS_WIN need to be repeated here)
TRANSL_WIN="*.pm *.pl ogie.ini COPYING ChangeLog *.txt"

cd ../win
mkdir GPLIGC-$VERSION

cp -v $DOCS_WIN  GPLIGC-$VERSION/
cp -v $PDFDOC    GPLIGC-$VERSION/
cp -v $PERL_BIN  GPLIGC-$VERSION/
cp -v $IMG       GPLIGC-$VERSION/
cp -v $CONF      GPLIGC-$VERSION/ogie.ini
cp -v $BIN_WIN   GPLIGC-$VERSION/
cp -v $DLL       GPLIGC-$VERSION/

# gnuplot
cp -v $GNUPLOT_BIN  GPLIGC-$VERSION/
cp -v $GNUPLOT_HELP GPLIGC-$VERSION/
cp -v $GNUPLOT_LIC  GPLIGC-$VERSION/Copyright-gnuplot

cd GPLIGC-$VERSION ; unix2dos $TRANSL_WIN

# default path in ogie.ini is changed to C:/GPLIGC
cd ..
perl -p -i.old  -e "s#PREFIX/share/gpligc#C:/GPLIGC#g" GPLIGC-$VERSION/ogie.ini
rm GPLIGC-$VERSION/*.old

# create archive
zip -r gpligc-$VERSION.zip GPLIGC-$VERSION/
rm -rf GPLIGC-$VERSION