changeset 340:9001eaa55549

Add first draft of packaging to build upon
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 09 Apr 2014 17:39:24 +0000
parents 5fa58979cb3a
children 36c68dfb821d
files packaging/filelist.nsh packaging/renameme.nsi packaging/renameme_installer.ico packaging/tmp-createpackage.sh
diffstat 4 files changed, 165 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/filelist.nsh	Wed Apr 09 17:39:24 2014 +0000
@@ -0,0 +1,19 @@
+; This file is not autogenerated.
+; Keep it updated if you add new things.
+
+File "${files_dir}/cinst.exe"
+File "${files_dir}/m13ui.exe"
+File "${files_dir}/mozilla.exe"
+
+; NSS: This should ultimately be static
+File "${files_dir}/nssckbi.dll"
+File "${files_dir}/smime3.dll"
+File "${files_dir}/nss3.dll"
+File "${files_dir}/nssdbm3.dll"
+File "${files_dir}/softokn3.dll"
+File "${files_dir}/sqlite3.dll"
+File "${files_dir}/freebl3.dll"
+File "${files_dir}/nssutil3.dll"
+File "${files_dir}/libplc4.dll"
+File "${files_dir}/libplds4.dll"
+File "${files_dir}/libnspr4.dll"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/renameme.nsi	Wed Apr 09 17:39:24 2014 +0000
@@ -0,0 +1,123 @@
+; renameme.nsi
+; TODO Rename it!
+;
+; This script creates the installer for renameme it needs the
+; following definitions to be set when calling makensis:
+;
+; productname: Name of the Software as it will show up under installed
+;               Software
+; company: The publisher of this software. (Windows needs this)
+; version_number: The version of the software
+; setupname: The name for the result created by this
+; productname_short: Used for the default folder name and such
+; files_dir: the path to the files
+
+;--------------------------------
+; Includes
+!define MULTIUSER_EXECUTIONLEVEL Highest
+!define MULTIUSER_MUI
+!define MULTIUSER_INSTALLMODE_COMMANDLINE
+!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\${productname_short}"
+!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME ""
+!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\${productname_short}"
+!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME ""
+!define MULTIUSER_INSTALLMODE_INSTDIR "${productname_short}"
+
+!include "MultiUser.nsh"
+!include "MUI2.nsh"
+
+;--------------------------------
+;Version Information (for installer file properties)
+
+VIProductVersion "${version_number}" ;needs integer format: x.x.x.x
+VIAddVersionKey "ProductName" "${productname_short}"
+VIAddVersionKey "Comments" "${productname_short} ist Freie Software"
+VIAddVersionKey "CompanyName" "${company}"
+VIAddVersionKey "LegalTrademarks" ""
+VIAddVersionKey "LegalCopyright" "${copyright}"
+VIAddVersionKey "FileDescription" "${description}"
+VIAddVersionKey "FileVersion" "${version_number}"
+
+Var StartMenuFolder
+;--------------------------------
+; General
+
+; Define Name, File and Installdir of Installer
+Name "${productname}"
+OutFile "${setupname}"
+InstallDir "$PROGRAMFILES\${productname_short}"
+InstType "Standard"
+
+;--------------------------------
+;Interface Settings
+
+BrandingText "${company} - ${productname}"
+; MUI Settings / Header
+!define MUI_WELCOMEPAGE_TITLE  "Willkommen bei der Installation von ${productname_short}."
+!define MUI_WELCOMEPAGE_TEXT "Sie sind im Begriff ${productname} \r\n\
+zu installieren. ${productname} ist eine Anwendung um Zertifikate TODO \r\n\
+auf ihrem System zu installieren und aktualisieren."
+;!define MUI_HEADERIMAGE_BITMAP "" ;TODO
+;!define MUI_WELCOMEFINISHPAGE_BITMAP "ressources\welcome_left.bmp" ;TODO
+!define MUI_ICON "renameme_installer.ico"
+
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+
+
+!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
+
+!define MUI_FINISHPAGE_RUN $INSTDIR\m13ui.exe
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+
+;--------------------------------
+;Install Functions
+Function ".onInit"
+  !insertmacro MULTIUSER_INIT
+FunctionEnd
+
+;--------------------------------
+;UnInstall Functions
+Function "un.onInit"
+  !insertmacro MULTIUSER_UNINIT
+FunctionEnd
+
+Section ""
+; The actual installation
+  SetOutPath "$INSTDIR"
+  !include "filelist.nsh"
+
+  WriteRegStr SHCTX "Software\${productname_short}" "" $INSTDIR
+
+    ;Create uninstaller
+  WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+
+  ;Create shortcuts
+  CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
+  CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" "$INSTDIR\m13ui.exe"
+
+  !insertmacro MUI_STARTMENU_WRITE_END
+
+SectionEnd
+
+Section "Uninstall"
+  RMDir /r "$INSTDIR" ; TODO include uninstall files
+; !include "filelist-un.nsh"
+;  Delete "$INSTDIR\Uninstall.exe"
+;  RMDir "$INSTDIR"
+
+  !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
+
+  Delete "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk"
+  RMDir "$SMPROGRAMS\$StartMenuFolder"
+
+  DeleteRegKey /ifempty SHCTX "Software\${productname_short}"
+
+SectionEnd
Binary file packaging/renameme_installer.ico has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/tmp-createpackage.sh	Wed Apr 09 17:39:24 2014 +0000
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+#NSSDIR is hackish as this will be replaced by static compiling 
+# anyway
+
+NSSDIR="/home/andre/ubuntu/src/mxe/usr/i686-w64-mingw32.static/nss-3.12.7/bin/"
+MYPATH=$(dirname `readlink -f $0`)
+
+TMPDIR=$(mktemp -d)
+
+EXEFILES=$(find . -name cinst.exe -o -name m13ui.exe -o -name mozilla.exe)
+
+cp $NSSDIR/*.dll $TMPDIR
+cp $EXEFILES $TMPDIR
+
+echo $TMPDIR
+makensis -Dfiles_dir=$TMPDIR \
+    -Dcompany="Intevation GmbH" \
+    -Dversion_number=0.0.0.1 \
+    -Dsetupname="renameme.exe" \
+    -Dproductname="Really please rename me" \
+    -Dproductname_short="renameme" $MYPATH/renameme.nsi
+rm -r $TMPDIR

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