diff packaging/renameme.nsi @ 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
children 73bfc9cc22e7
line wrap: on
line diff
--- /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

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