comparison packaging/win-createpackage.sh.in @ 1188:eb77ddd7e1ab

(issue137) Generate and include install / uninstall file lists
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 22 Sep 2014 15:37:32 +0200
parents 3de099c8129e
children e4aff35ef8fd
comparison
equal deleted inserted replaced
1187:913867a8bf40 1188:eb77ddd7e1ab
1 #!/bin/bash
1 # Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik 2 # Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
2 # Software engineering by Intevation GmbH 3 # Software engineering by Intevation GmbH
3 # 4 #
4 # This file is Free Software under the GNU GPL (v>=2) 5 # This file is Free Software under the GNU GPL (v>=2)
5 # and comes with ABSOLUTELY NO WARRANTY! 6 # and comes with ABSOLUTELY NO WARRANTY!
6 # See LICENSE.txt for details. 7 # See LICENSE.txt for details.
7 8
8 #!/bin/bash
9
10 #NSSDIR is hackish as this will be replaced by static compiling 9 #NSSDIR is hackish as this will be replaced by static compiling
11 # anyway 10 # anyway
12
13 TMPDIR=$(mktemp -d) 11 TMPDIR=$(mktemp -d)
14 TMPINST=$(mktemp) 12 TMPINST=$(mktemp)
15 13
16 EXEFILES=$(find . -name trustbridge-certificate-installer.exe -o -name trustbridge.exe -o -name trustbridge-nss-installer.exe) 14 EXEFILES=$(find . -name trustbridge-certificate-installer.exe -o -name trustbridge.exe -o -name trustbridge-nss-installer.exe)
17 HELPDIR=@CMAKE_BINARY_DIR@/doc/help/client/html 15 HELPDIR=@CMAKE_BINARY_DIR@/doc/help/client/html
18 16
19 cp $EXEFILES $TMPDIR 17 cp $EXEFILES $TMPDIR
20 cp -r $HELPDIR $TMPDIR/doc 18 cp -r $HELPDIR $TMPDIR/doc
21 19
20 echo "; This file is autogenerated." > @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
21 echo "; This file is autogenerated." > @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
22 OLDDIR=$(pwd)
23 cd $TMPDIR
24 for file in `find * -name \*.exe`; do
25 echo File \"\${files_dir}\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
26 echo Delete \"\$INSTDIR\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
27 done
28 cd $TMPDIR/doc
29
30 for curdir in `find * -maxdepth 0 -type d -not -path .`; do
31 cd $curdir
32 curpath=\"\$INSTDIR\\doc\\$curdir\"
33 echo SetOutPath $curpath >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
34 for file in `find * -maxdepth 0 -type f`; do
35 echo File \"\${files_dir}\${path_sep}doc\${path_sep}$curdir\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
36 echo Delete \"\$INSTDIR\\doc\\$curdir\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
37 done
38 echo RMDir $curpath >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
39 cd -
40 done
41
42 echo SetOutPath \"\$INSTDIR\\doc\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
43 for file in `find * -maxdepth 0 -type f -not -path .buildinfo`; do
44 echo File \"\${files_dir}\${path_sep}doc\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
45 echo Delete \"\$INSTDIR\\doc\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
46 done
47 echo RMDir \"\$INSTDIR\\doc\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
48
49 cd $OLDDIR
22 EST_SIZE=$(du -s $TMPDIR | cut -f 1) 50 EST_SIZE=$(du -s $TMPDIR | cut -f 1)
23 51
24 echo $TMPDIR 52 echo $TMPDIR
25 export LC_ALL="de_DE.latin-1" 53 export LC_ALL="de_DE.latin-1"
26 54

http://wald.intevation.org/projects/trustbridge/