From 83869cb8d2f623ecd1e2ac06e5366e63ddafccb3 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 2 May 2014 11:44:25 +0200 Subject: [PATCH] Installation of runtimes libraries for Installer is incorporated in automatical build --- GNUmakefile | 2 + .../Templates/arango-packer-template.nsi | 52 +++++++++++++++++++ installer-generator.sh | 10 ++++ 3 files changed, 64 insertions(+) create mode 100644 Installation/Windows/Templates/arango-packer-template.nsi create mode 100755 installer-generator.sh diff --git a/GNUmakefile b/GNUmakefile index bb0f8367a7..b6a5599e01 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -246,6 +246,8 @@ pack-winXX-cmake: cd Build$(BITS) && cmake --build . --config Release cd Build$(BITS) && cpack -G NSIS + + ./installer-generator.sh $(BITS) ################################################################################ ### @brief Windows Vista 64-bit bundle diff --git a/Installation/Windows/Templates/arango-packer-template.nsi b/Installation/Windows/Templates/arango-packer-template.nsi new file mode 100644 index 0000000000..e71a600cab --- /dev/null +++ b/Installation/Windows/Templates/arango-packer-template.nsi @@ -0,0 +1,52 @@ +; arango-packer-template.nsi +; +; this script copies the installation program +; for arango and the corresponding window runtime +; libraries which the arango installation program needs +; +; The installation program and the runtimes are +; copied to the TEMP directory and then the arango +; installer is started +;-------------------------------- + +; !include "Library.nsh" + +; The name of the installer +Name "arango-unpacker" + +; The file to write +OutFile "arango-unpacker-@BITS@.exe" + +; The default installation directory +!define APPNAME "Unpacker" +!define COMPANYNAME "Triagens" +InstallDir $TEMP\${COMPANYNAME}\${APPNAME} + + + +; Request application privileges for Windows Vista +RequestExecutionLevel user + +;-------------------------------- + +; Pages +Page instfiles + +;-------------------------------- + +; The stuff to install +Section "" ;No components page, name is not important + + + ; Set output path to the installation directory. + SetOutPath $INSTDIR + ; Put file there +; !insertmacro InstallLib DLL SHARED NOREBOOT_PROTECTED "exdll.dll" $INSTDIR $TEMP + file "..\Installation\Windows\Plugins\SharedMemory\Plugins\@BITS@\msvcr120.dll" + file "@INSTALLERNAME@.exe" + Rename "$INSTDIR\Installation\Windows\Plugins\SharedMemory\Plugins\@BITS@\msvcr120.dll" "$INSTDIR\msvcr120.dll" +; Rename "$INSTDIR\Build@BITS@\@INSTALLERNAME@.exe" "$INSTDIR\@INSTALLERNAME@.exe" + Exec "$INSTDIR\@INSTALLERNAME@.exe" + Quit + +SectionEnd ; end the section diff --git a/installer-generator.sh b/installer-generator.sh new file mode 100755 index 0000000000..3efed3d9b0 --- /dev/null +++ b/installer-generator.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +NSIS_PATH="/cygdrive/c/Program Files (x86)/NSIS" + +bits=$1 +INSTALLERNAME=`grep CPACK_PACKAGE_FILE_NAME Build$bits/CPackConfig.cmake | grep -o '".*"' | awk -F\" '{print $2}'` +cat Installation/Windows/Templates/arango-packer-template.nsi | sed -e "s/@BITS@/$bits/g" | sed -e "s/@INSTALLERNAME@/${INSTALLERNAME}/g" > Build$bits/arango-packer-$bits.nsi + +"$NSIS_PATH"/bin/makensis.exe Build$bits/arango-packer-$bits.nsi +