Update README.md
[engrid-github.git] / src / scripts / generate_dependency_list.sh
blobb4574ea00e56f0091ea6e8fa1b27d50abc071904
1 #!/bin/bash
2 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 # + +
4 # + This file is part of enGrid. +
5 # + +
6 # + Copyright 2008-2014 enGits GmbH +
7 # + +
8 # + enGrid is free software: you can redistribute it and/or modify +
9 # + it under the terms of the GNU General Public License as published by +
10 # + the Free Software Foundation, either version 3 of the License, or +
11 # + (at your option) any later version. +
12 # + +
13 # + enGrid is distributed in the hope that it will be useful, +
14 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 # + GNU General Public License for more details. +
17 # + +
18 # + You should have received a copy of the GNU General Public License +
19 # + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 # + +
21 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 set -ux
24 # Check if all parameters are present
25 # If no, exit
26 if [ $# -ne 4 ]
27 then
28 echo "usage :"
29 echo "`basename $0` INPUT OUTPUT INSTALL UNINSTALL"
30 exit 0
33 INPUT=$1
34 OUTPUT=$2
35 INSTALL=$3
36 UNINSTALL=$4
38 grep DLL $1 > $OUTPUT
39 sed -i '/windows/d' $OUTPUT
40 sed -i '/Warning/d' $OUTPUT
41 sed -i '/KnownDLLs/d' $OUTPUT
42 sed -i '/IESHIMS\.DLL/d' $OUTPUT
43 sed -i '/WER\.DLL/d' $OUTPUT
44 sed -i 's/DLL\(.*\)$/DLL/g' $OUTPUT
45 sed -i 's/\[.*\]//g' $OUTPUT
46 sed -i 's/^ *//g' $OUTPUT
48 ~/bin/remove_duplicates.pl $OUTPUT
49 OUTPUT_2=no_dupes_$OUTPUT
50 sort $OUTPUT_2 > $OUTPUT
52 cp $OUTPUT $INSTALL
53 sed -i 's/c:\\qt\\2009\.03\\mingw\\bin/${MINGWBINDIR}/g' $INSTALL
54 sed -i 's/c:\\qt\\2009\.03\\qt\\bin/${QTBINDIR}/g' $INSTALL
55 sed -i 's/c:\\qwt-5\.3\.0-svn\\lib/${QWTLIBDIR}/g' $INSTALL
56 sed -i 's/c:\\qwtplot3d\\lib/${QWTPLOT3DLIBDIR}/g' $INSTALL
57 sed -i 's/c:\\vtk-5\.4\.2-install\\bin/${VTKBINDIR}/g' $INSTALL
58 sed -i 's/c:\\libraries\\vtk-5\.4\.2-install\\bin/${VTKBINDIR}/g' $INSTALL
60 sed -i 's/^/ File "/' $INSTALL
61 sed -i 's/$/"/' $INSTALL
63 cp $OUTPUT $UNINSTALL
64 sed -i 's/.*\\\([^\\]*\)\.DLL/\1.DLL/g' $UNINSTALL
65 sed -i 's/^/ Delete "$INSTDIR\\/' $UNINSTALL
66 sed -i 's/$/"/' $UNINSTALL
68 echo "=== OUTPUT ==="
69 cat $OUTPUT
71 echo "=== INSTALL ==="
72 cat $INSTALL
74 echo "=== UNINSTALL ==="
75 cat $UNINSTALL