comparison packaging/create-dist-package.sh.in @ 831:747a48996c1f

(Issue13) Precompile uninstaller Create-dist-packge now creates a temporary installer that only writes the uninstaller. Then it excutes this installer (using wine) to create the uninstaller. That uninstaller is then packaged normaly and packaged instead of the written uninstaller.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 24 Jul 2014 15:59:00 +0200
parents eef8e0ca82b9
children 8081ed84589d
comparison
equal deleted inserted replaced
830:344d15e23f6c 831:747a48996c1f
4 set -x 4 set -x
5 set -e 5 set -e
6 6
7 if [ ! -d "$WINDOWS_NSSDIR" ]; then 7 if [ ! -d "$WINDOWS_NSSDIR" ]; then
8 echo "ERROR: Please set WINDOWS_NSSDIR to the location of your nss binaries" 8 echo "ERROR: Please set WINDOWS_NSSDIR to the location of your nss binaries"
9 exit 1
10 fi
11
12 if [ ! -x `which wine` ]; then
13 echo "ERROR: Could not find wine."
9 exit 1 14 exit 1
10 fi 15 fi
11 16
12 TMPD=$(mktemp -d) 17 TMPD=$(mktemp -d)
13 TMPDIR=$TMPD/TrustBridge-@PROJECT_VERSION@ 18 TMPDIR=$TMPD/TrustBridge-@PROJECT_VERSION@
30 echo "info_url=https://wald.intevation.org/projects/trustbridge/" >> $TMPDIR/meta.ini 35 echo "info_url=https://wald.intevation.org/projects/trustbridge/" >> $TMPDIR/meta.ini
31 echo "productname_short=TrustBridge" >> $TMPDIR/meta.ini 36 echo "productname_short=TrustBridge" >> $TMPDIR/meta.ini
32 echo "description=TrustBridge" >> $TMPDIR/meta.ini 37 echo "description=TrustBridge" >> $TMPDIR/meta.ini
33 echo "size=$EST_SIZE" >> $TMPDIR/meta.ini 38 echo "size=$EST_SIZE" >> $TMPDIR/meta.ini
34 cp $WINDOWS_NSSDIR/*.dll $TMPDIR/windows 39 cp $WINDOWS_NSSDIR/*.dll $TMPDIR/windows
40
41 # Create a temporary NSIS file for the uninstaller cration
42 LC_ALL="de_DE.latin-1" makensis -Dfiles_dir=$TMPDIR/windows \
43 -Dcompany="Bundesamt für Sicherheit in der Informationstechnik" \
44 -Dversion_number=@PROJECT_VERSION@ \
45 -Dsetupname="$TMPDIR/TrustBridge-@PROJECT_VERSION@-uni.exe" \
46 -Dproductname="TrustBridge" \
47 -Dpath_sep="/" \
48 -Dinfo_url="https://wald.intevation.org/projects/trustbridge/" \
49 -Dsize=$EST_SIZE \
50 -DWRITE_UNINSTALLER \
51 -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi
52 wine $TMPDIR/TrustBridge-@PROJECT_VERSION@-uni.exe /S || true
53 mv ~/.wine/drive_c/tmp-uninstaller/Uninstall.exe $TMPDIR/windows
54 rmdir ~/.wine/drive_c/tmp-uninstaller
55 rm $TMPDIR/TrustBridge-@PROJECT_VERSION@-uni.exe
56
35 cd $TMPD 57 cd $TMPD
36 zip -r TrustBridge-@PROJECT_VERSION@.zip TrustBridge-@PROJECT_VERSION@ 58 zip -r TrustBridge-@PROJECT_VERSION@.zip TrustBridge-@PROJECT_VERSION@
37 mv TrustBridge-@PROJECT_VERSION@.zip @CMAKE_BINARY_DIR@ 59 mv TrustBridge-@PROJECT_VERSION@.zip @CMAKE_BINARY_DIR@
38 rm -r $TMPD 60 rm -r $TMPD
39 echo "Package is: @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.zip" 61 echo "Package is: @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.zip"

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