andre@760: #!/bin/bash andre@760: # Helper script to package the files expected by the -admin application andre@760: # Windows build is expected to live in CMAKE_SOURCE_DIR/build-windows andre@760: set -x andre@760: set -e andre@760: andre@760: if [ ! -d "$WINDOWS_NSSDIR" ]; then andre@760: echo "ERROR: Please set WINDOWS_NSSDIR to the location of your nss binaries" andre@760: exit 1 andre@760: fi andre@760: andre@760: TMPD=$(mktemp -d) andre@760: TMPDIR=$TMPD/TrustBridge-@PROJECT_VERSION@ andre@760: cd @CMAKE_BINARY_DIR@ andre@760: /bin/bash packaging/linux-createpackage.sh andre@760: mkdir -p $TMPDIR/linux andre@760: mkdir -p $TMPDIR/windows andre@760: cp @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.sh $TMPDIR/linux andre@760: cp @CMAKE_SOURCE_DIR@/build-windows/ui/trustbridge.exe $TMPDIR/windows andre@760: cp @CMAKE_SOURCE_DIR@/build-windows/cinst/cinst.exe $TMPDIR/windows andre@760: cp @CMAKE_SOURCE_DIR@/build-windows/cinst/mozilla.exe $TMPDIR/windows andre@760: cp @CMAKE_SOURCE_DIR@/packaging/filelist.nsh $TMPDIR andre@760: cp @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi $TMPDIR andre@760: cp -r @CMAKE_SOURCE_DIR@/packaging/resources $TMPDIR/resources andre@760: LC_ALL="de_DE.latin-1" echo "company=Bundesamt für Sicherheit in der Informationstechnik" > $TMPDIR/meta.ini andre@794: EST_SIZE=$(du -s $TMPDIR/windows | cut -f 1) andre@760: echo "version_number=@PROJECT_VERSION@" >> $TMPDIR/meta.ini andre@760: echo "setupname=%1TrustBridge-@PROJECT_VERSION@.exe" >> $TMPDIR/meta.ini andre@760: echo "productname=TrustBridge" >> $TMPDIR/meta.ini andre@794: echo "info_url=https://wald.intevation.org/projects/trustbridge/" >> $TMPDIR/meta.ino andre@794: echo "size=$EST_SIZE" >> $TMPDIR/meta.ini andre@760: cp $WINDOWS_NSSDIR/*.dll $TMPDIR/windows andre@760: cd $TMPD andre@760: zip -r TrustBridge-@PROJECT_VERSION@.zip TrustBridge-@PROJECT_VERSION@ andre@760: mv TrustBridge-@PROJECT_VERSION@.zip @CMAKE_BINARY_DIR@ andre@760: rm -r $TMPD andre@760: echo "Package is: @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.zip"