Mercurial > trustbridge
annotate packaging/create-dist-package.sh.in @ 848:9792c69201c2
Add note about runtime dependencies for admin tool
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 30 Jul 2014 16:22:55 +0200 |
parents | 8081ed84589d |
children | ecc6aa433253 637948e9e32d |
rev | line source |
---|---|
760
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
1 #!/bin/bash |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
2 # Helper script to package the files expected by the -admin application |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
3 # Windows build is expected to live in CMAKE_SOURCE_DIR/build-windows |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
4 set -x |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
5 set -e |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
6 |
831
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
7 if [ ! -x `which wine` ]; then |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
8 echo "ERROR: Could not find wine." |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
9 exit 1 |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
10 fi |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
11 |
760
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
12 TMPD=$(mktemp -d) |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
13 TMPDIR=$TMPD/TrustBridge-@PROJECT_VERSION@ |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
14 cd @CMAKE_BINARY_DIR@ |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
15 /bin/bash packaging/linux-createpackage.sh |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
16 mkdir -p $TMPDIR/linux |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
17 mkdir -p $TMPDIR/windows |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
18 cp @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.sh $TMPDIR/linux |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
19 cp @CMAKE_SOURCE_DIR@/build-windows/ui/trustbridge.exe $TMPDIR/windows |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
20 cp @CMAKE_SOURCE_DIR@/build-windows/cinst/cinst.exe $TMPDIR/windows |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
21 cp @CMAKE_SOURCE_DIR@/build-windows/cinst/mozilla.exe $TMPDIR/windows |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
22 cp @CMAKE_SOURCE_DIR@/packaging/filelist.nsh $TMPDIR |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
23 cp @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi $TMPDIR |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
24 cp -r @CMAKE_SOURCE_DIR@/packaging/resources $TMPDIR/resources |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
25 LC_ALL="de_DE.latin-1" echo "company=Bundesamt f�r Sicherheit in der Informationstechnik" > $TMPDIR/meta.ini |
794
fdc15f0cfdd8
(issue61) NSIS Write uninstall information and make URL configurable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
760
diff
changeset
|
26 EST_SIZE=$(du -s $TMPDIR/windows | cut -f 1) |
760
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
27 echo "version_number=@PROJECT_VERSION@" >> $TMPDIR/meta.ini |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
28 echo "setupname=%1TrustBridge-@PROJECT_VERSION@.exe" >> $TMPDIR/meta.ini |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
29 echo "productname=TrustBridge" >> $TMPDIR/meta.ini |
820
eef8e0ca82b9
Fix distpackage script
Andre Heinecke <andre.heinecke@intevation.de>
parents:
794
diff
changeset
|
30 echo "info_url=https://wald.intevation.org/projects/trustbridge/" >> $TMPDIR/meta.ini |
eef8e0ca82b9
Fix distpackage script
Andre Heinecke <andre.heinecke@intevation.de>
parents:
794
diff
changeset
|
31 echo "productname_short=TrustBridge" >> $TMPDIR/meta.ini |
eef8e0ca82b9
Fix distpackage script
Andre Heinecke <andre.heinecke@intevation.de>
parents:
794
diff
changeset
|
32 echo "description=TrustBridge" >> $TMPDIR/meta.ini |
794
fdc15f0cfdd8
(issue61) NSIS Write uninstall information and make URL configurable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
760
diff
changeset
|
33 echo "size=$EST_SIZE" >> $TMPDIR/meta.ini |
831
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
34 |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
35 # Create a temporary NSIS file for the uninstaller cration |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
36 LC_ALL="de_DE.latin-1" makensis -Dfiles_dir=$TMPDIR/windows \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
37 -Dcompany="Bundesamt f�r Sicherheit in der Informationstechnik" \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
38 -Dversion_number=@PROJECT_VERSION@ \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
39 -Dsetupname="$TMPDIR/TrustBridge-@PROJECT_VERSION@-uni.exe" \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
40 -Dproductname="TrustBridge" \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
41 -Dpath_sep="/" \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
42 -Dinfo_url="https://wald.intevation.org/projects/trustbridge/" \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
43 -Dsize=$EST_SIZE \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
44 -DWRITE_UNINSTALLER \ |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
45 -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
46 wine $TMPDIR/TrustBridge-@PROJECT_VERSION@-uni.exe /S || true |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
47 mv ~/.wine/drive_c/tmp-uninstaller/Uninstall.exe $TMPDIR/windows |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
48 rmdir ~/.wine/drive_c/tmp-uninstaller |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
49 rm $TMPDIR/TrustBridge-@PROJECT_VERSION@-uni.exe |
747a48996c1f
(Issue13) Precompile uninstaller
Andre Heinecke <andre.heinecke@intevation.de>
parents:
820
diff
changeset
|
50 |
760
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
51 cd $TMPD |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
52 zip -r TrustBridge-@PROJECT_VERSION@.zip TrustBridge-@PROJECT_VERSION@ |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
53 mv TrustBridge-@PROJECT_VERSION@.zip @CMAKE_BINARY_DIR@ |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
54 rm -r $TMPD |
438d7c88104f
Add create-dist-package script to create a package suitable for trustbridge-admin
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
55 echo "Package is: @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.zip" |