[PATCH 2 of 2] (issue137) Generate and include install / uninstall file lists
Wald Commits
scm-commit at wald.intevation.org
Mon Sep 22 15:37:37 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1411393052 -7200
# Node ID eb77ddd7e1abd6f3a8cd1aa2cc3f5d09ce852f8a
# Parent 913867a8bf4069920e874100a6273b837a87b4c1
(issue137) Generate and include install / uninstall file lists
diff -r 913867a8bf40 -r eb77ddd7e1ab packaging/create-dist-package.sh.in
--- a/packaging/create-dist-package.sh.in Mon Sep 22 15:36:57 2014 +0200
+++ b/packaging/create-dist-package.sh.in Mon Sep 22 15:37:32 2014 +0200
@@ -53,6 +53,39 @@
cp @CMAKE_SOURCE_DIR@/build-windows/packaging/DesktopShellRun.dll $TMPDIR/resources
cp -r @CMAKE_BINARY_DIR@/doc/help/client/html $TMPDIR/windows/doc
+echo "; This file is autogenerated." > $TMPDIR/resources/filelist_in.nsh
+echo "; This file is autogenerated." > $TMPDIR/resources/filelist_un.nsh
+OLDDIR=$(pwd)
+cd $TMPDIR/windows
+for file in `find * -name \*.exe`; do
+ echo File \"\${files_dir}\${path_sep}$file\" >> $TMPDIR/resources/filelist_in.nsh
+ echo Delete \"\$INSTDIR\\$file\" >> $TMPDIR/resources/filelist_un.nsh
+done
+cd $TMPDIR/windows/doc
+
+for curdir in `find * -maxdepth 0 -type d -not -path .`; do
+ cd $curdir
+ curpath=\"\$INSTDIR\\doc\\$curdir\"
+ echo SetOutPath $curpath >> $TMPDIR/resources/filelist_in.nsh
+ for file in `find * -maxdepth 0 -type f`; do
+ echo File \"\${files_dir}\${path_sep}doc\${path_sep}$curdir\${path_sep}$file\" >> $TMPDIR/resources/filelist_in.nsh
+ echo Delete \"\$INSTDIR\\doc\\$curdir\\$file\" >> $TMPDIR/resources/filelist_un.nsh
+ done
+ echo RMDir $curpath >> $TMPDIR/resources/filelist_un.nsh
+ cd -
+done
+
+echo SetOutPath \"\$INSTDIR\\doc\" >> $TMPDIR/resources/filelist_in.nsh
+for file in `find * -maxdepth 0 -type f -not -path .buildinfo`; do
+ echo File \"\${files_dir}\${path_sep}doc\${path_sep}$file\" >> $TMPDIR/resources/filelist_in.nsh
+ echo Delete \"\$INSTDIR\\doc\\$file\" >> $TMPDIR/resources/filelist_un.nsh
+done
+echo RMDir \"\$INSTDIR\\doc\" >> $TMPDIR/resources/filelist_un.nsh
+
+cd $OLDDIR
+
+
+
cp @CMAKE_SOURCE_DIR@/packaging/filelist.nsh $TMPDIR
cp @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi $TMPDIR
LC_ALL="de_DE.latin-1" echo "company=Bundesamt für Sicherheit in der Informationstechnik" > $TMPDIR/meta.ini
diff -r 913867a8bf40 -r eb77ddd7e1ab packaging/trustbridge.nsi
--- a/packaging/trustbridge.nsi Mon Sep 22 15:36:57 2014 +0200
+++ b/packaging/trustbridge.nsi Mon Sep 22 15:37:32 2014 +0200
@@ -28,6 +28,7 @@
!define MULTIUSER_INSTALLMODE_INSTDIR "${productname_short}"
!addplugindir "${plugin_dir}"
+!addincludedir "${plugin_dir}"
!include "MultiUser.nsh"
!include "MUI2.nsh"
@@ -207,7 +208,8 @@
continue:
; The actual installation
SetOutPath "$INSTDIR"
- !include "filelist.nsh"
+ !include "filelist_in.nsh"
+ SetOutPath "$INSTDIR"
;Create uninstaller
!ifndef WRITE_UNINSTALLER
@@ -273,10 +275,9 @@
ExpandEnvStrings $0 %LOCALAPPDATA%
nsExec::ExecToLog '"$INSTDIR\trustbridge-certificate-installer.exe" "list=$0\BSI\TrustBridge\list-installed.txt" "choices=uninstall"'
skip_certs:
- RMDir /r "$INSTDIR" ; TODO (issue137) include uninstall files
-; !include "filelist-un.nsh"
-; Delete "$INSTDIR\Uninstall.exe"
-; RMDir "$INSTDIR"
+ !include "filelist_un.nsh"
+ Delete "$INSTDIR\Uninstall.exe"
+ RMDir "$INSTDIR"
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
diff -r 913867a8bf40 -r eb77ddd7e1ab packaging/win-createpackage.sh.in
--- a/packaging/win-createpackage.sh.in Mon Sep 22 15:36:57 2014 +0200
+++ b/packaging/win-createpackage.sh.in Mon Sep 22 15:37:32 2014 +0200
@@ -1,3 +1,4 @@
+#!/bin/bash
# Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
# Software engineering by Intevation GmbH
#
@@ -5,11 +6,8 @@
# 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)
@@ -19,6 +17,36 @@
cp $EXEFILES $TMPDIR
cp -r $HELPDIR $TMPDIR/doc
+echo "; This file is autogenerated." > @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
+echo "; This file is autogenerated." > @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
+OLDDIR=$(pwd)
+cd $TMPDIR
+for file in `find * -name \*.exe`; do
+ echo File \"\${files_dir}\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
+ echo Delete \"\$INSTDIR\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
+done
+cd $TMPDIR/doc
+
+for curdir in `find * -maxdepth 0 -type d -not -path .`; do
+ cd $curdir
+ curpath=\"\$INSTDIR\\doc\\$curdir\"
+ echo SetOutPath $curpath >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
+ for file in `find * -maxdepth 0 -type f`; do
+ echo File \"\${files_dir}\${path_sep}doc\${path_sep}$curdir\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
+ echo Delete \"\$INSTDIR\\doc\\$curdir\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
+ done
+ echo RMDir $curpath >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
+ cd -
+done
+
+echo SetOutPath \"\$INSTDIR\\doc\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
+for file in `find * -maxdepth 0 -type f -not -path .buildinfo`; do
+ echo File \"\${files_dir}\${path_sep}doc\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
+ echo Delete \"\$INSTDIR\\doc\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
+done
+echo RMDir \"\$INSTDIR\\doc\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
+
+cd $OLDDIR
EST_SIZE=$(du -s $TMPDIR | cut -f 1)
echo $TMPDIR
More information about the Trustbridge-commits
mailing list