view packaging/win-createpackage.sh.in @ 1119:5349e2354c48

(issue54) Merge branch runafterinstall There is now an NSIS Plugin that executes the Software after installation using COM in the shell of the current user. With the way over the shell there is no inheritance / token management required. As it is impossible to drop all privileges of a token granted by UAC and still be able to reelevate the Token again with another RunAs call later this round trip over the Shell was necessary.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 16 Sep 2014 19:48:22 +0200
parents fd85a02d771d
children e210ecc32d69
line wrap: on
line source
# Copyright (C) 2014 by Bundesamt f�r Sicherheit in der Informationstechnik
# Software engineering by Intevation GmbH
#
# This file is Free Software under the GNU GPL (v>=2)
# and comes with ABSOLUTELY NO WARRANTY!
# See LICENSE.txt for details.

#!/bin/bash

#NSSDIR is hackish as this will be replaced by static compiling 
# anyway

TMPDIR=$(mktemp -d)
TMPINST=$(mktemp)

EXEFILES=$(find . -name cinst.exe -o -name trustbridge.exe -o -name mozilla.exe)
HELPDIR=@CMAKE_BINARY_DIR@/manuals/help-manual/html

cp $EXEFILES $TMPDIR
cp -r $HELPDIR $TMPDIR/doc

EST_SIZE=$(du -s $TMPDIR | cut -f 1)

echo $TMPDIR
export LC_ALL="de_DE.latin-1" 

makensis -Dfiles_dir=$TMPDIR \
    -Dcompany="Bundesamt f�r Sicherheit in der Informationstechnik" \
    -Dplugin_dir="@CMAKE_CURRENT_BINARY_DIR@" \
    -Dversion_number=@PROJECT_VERSION@ \
    -Dsetupname="$TMPINST" \
    -Dproductname="TrustBridge" \
    -Ddescription="TrustBridge" \
    -Dpath_sep="/" \
    -Dinfo_url="http://wald.intevation.org/projects/trustbridge/" \
    -Dsize=$EST_SIZE \
    -DWRITE_UNINSTALLER \
    -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi
wine $TMPINST /S || true
mv ~/.wine/drive_c/tmp-uninstaller/Uninstall.exe $TMPDIR
rmdir ~/.wine/drive_c/tmp-uninstaller
rm $TMPINST

makensis -Dfiles_dir=$TMPDIR \
    -Dcompany="Bundesamt f�r Sicherheit in der Informationstechnik" \
    -Dplugin_dir="@CMAKE_CURRENT_BINARY_DIR@" \
    -Dversion_number=@PROJECT_VERSION@ \
    -Dsetupname="@CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe" \
    -Dproductname="TrustBridge" \
    -Ddescription="TrustBridge" \
    -Dpath_sep="/" \
    -Dinfo_url="http://wald.intevation.org/projects/trustbridge/" \
    -Dsize=$EST_SIZE \
    -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi

osslsigncode sign -certs @CMAKE_SOURCE_DIR@/ui/tests/data/codesign/codesigning.pem \
   -key @CMAKE_SOURCE_DIR@/ui/tests/data/codesign/codesigning.key \
   -h sha256 -in @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe \
   -out @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@-signed.exe
mv @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@-signed.exe @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe

rm -r $TMPDIR

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