aheinecke@588: # Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik aheinecke@405: # Software engineering by Intevation GmbH aheinecke@405: # aheinecke@405: # This file is Free Software under the GNU GPL (v>=2) aheinecke@405: # and comes with ABSOLUTELY NO WARRANTY! aheinecke@405: # See LICENSE.txt for details. aheinecke@405: aheinecke@340: #!/bin/bash aheinecke@340: aheinecke@340: #NSSDIR is hackish as this will be replaced by static compiling aheinecke@340: # anyway aheinecke@340: aheinecke@340: TMPDIR=$(mktemp -d) andre@860: TMPINST=$(mktemp) aheinecke@340: aheinecke@490: EXEFILES=$(find . -name cinst.exe -o -name trustbridge.exe -o -name mozilla.exe) andre@963: HELPDIR=@CMAKE_BINARY_DIR@/manuals/help-manual/html aheinecke@340: aheinecke@340: cp $EXEFILES $TMPDIR andre@963: cp -r $HELPDIR $TMPDIR/doc aheinecke@340: andre@794: EST_SIZE=$(du -s $TMPDIR | cut -f 1) andre@794: aheinecke@340: echo $TMPDIR andre@860: export LC_ALL="de_DE.latin-1" andre@860: andre@860: makensis -Dfiles_dir=$TMPDIR \ andre@860: -Dcompany="Bundesamt für Sicherheit in der Informationstechnik" \ andre@1010: -Dplugin_dir="@CMAKE_CURRENT_BINARY_DIR@" \ andre@860: -Dversion_number=@PROJECT_VERSION@ \ andre@860: -Dsetupname="$TMPINST" \ andre@860: -Dproductname="TrustBridge" \ andre@860: -Dpath_sep="/" \ andre@860: -Dinfo_url="http://wald.intevation.org/projects/trustbridge/" \ andre@860: -Dsize=$EST_SIZE \ andre@860: -DWRITE_UNINSTALLER \ andre@860: -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi andre@860: wine $TMPINST /S || true andre@860: mv ~/.wine/drive_c/tmp-uninstaller/Uninstall.exe $TMPDIR andre@860: rmdir ~/.wine/drive_c/tmp-uninstaller andre@860: rm $TMPINST andre@860: aheinecke@340: makensis -Dfiles_dir=$TMPDIR \ aheinecke@588: -Dcompany="Bundesamt für Sicherheit in der Informationstechnik" \ andre@1010: -Dplugin_dir="@CMAKE_CURRENT_BINARY_DIR@" \ aheinecke@495: -Dversion_number=@PROJECT_VERSION@ \ aheinecke@500: -Dsetupname="@CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe" \ aheinecke@410: -Dproductname="TrustBridge" \ aheinecke@552: -Dpath_sep="/" \ andre@852: -Dinfo_url="http://wald.intevation.org/projects/trustbridge/" \ andre@832: -Dsize=$EST_SIZE \ aheinecke@552: -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi andre@860: andre@922: osslsigncode sign -certs @CMAKE_SOURCE_DIR@/ui/tests/data/codesign/codesigning.pem \ andre@922: -key @CMAKE_SOURCE_DIR@/ui/tests/data/codesign/codesigning.key \ andre@922: -h sha256 -in @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe \ andre@922: -out @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@-signed.exe andre@922: mv @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@-signed.exe CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe andre@922: aheinecke@340: rm -r $TMPDIR