comparison 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
comparison
equal deleted inserted replaced
339:5fa58979cb3a 340:9001eaa55549
1 ; renameme.nsi
2 ; TODO Rename it!
3 ;
4 ; This script creates the installer for renameme it needs the
5 ; following definitions to be set when calling makensis:
6 ;
7 ; productname: Name of the Software as it will show up under installed
8 ; Software
9 ; company: The publisher of this software. (Windows needs this)
10 ; version_number: The version of the software
11 ; setupname: The name for the result created by this
12 ; productname_short: Used for the default folder name and such
13 ; files_dir: the path to the files
14
15 ;--------------------------------
16 ; Includes
17 !define MULTIUSER_EXECUTIONLEVEL Highest
18 !define MULTIUSER_MUI
19 !define MULTIUSER_INSTALLMODE_COMMANDLINE
20 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\${productname_short}"
21 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME ""
22 !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\${productname_short}"
23 !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME ""
24 !define MULTIUSER_INSTALLMODE_INSTDIR "${productname_short}"
25
26 !include "MultiUser.nsh"
27 !include "MUI2.nsh"
28
29 ;--------------------------------
30 ;Version Information (for installer file properties)
31
32 VIProductVersion "${version_number}" ;needs integer format: x.x.x.x
33 VIAddVersionKey "ProductName" "${productname_short}"
34 VIAddVersionKey "Comments" "${productname_short} ist Freie Software"
35 VIAddVersionKey "CompanyName" "${company}"
36 VIAddVersionKey "LegalTrademarks" ""
37 VIAddVersionKey "LegalCopyright" "${copyright}"
38 VIAddVersionKey "FileDescription" "${description}"
39 VIAddVersionKey "FileVersion" "${version_number}"
40
41 Var StartMenuFolder
42 ;--------------------------------
43 ; General
44
45 ; Define Name, File and Installdir of Installer
46 Name "${productname}"
47 OutFile "${setupname}"
48 InstallDir "$PROGRAMFILES\${productname_short}"
49 InstType "Standard"
50
51 ;--------------------------------
52 ;Interface Settings
53
54 BrandingText "${company} - ${productname}"
55 ; MUI Settings / Header
56 !define MUI_WELCOMEPAGE_TITLE "Willkommen bei der Installation von ${productname_short}."
57 !define MUI_WELCOMEPAGE_TEXT "Sie sind im Begriff ${productname} \r\n\
58 zu installieren. ${productname} ist eine Anwendung um Zertifikate TODO \r\n\
59 auf ihrem System zu installieren und aktualisieren."
60 ;!define MUI_HEADERIMAGE_BITMAP "" ;TODO
61 ;!define MUI_WELCOMEFINISHPAGE_BITMAP "ressources\welcome_left.bmp" ;TODO
62 !define MUI_ICON "renameme_installer.ico"
63
64 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
65 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}"
66 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
67
68
69 !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
70
71 !define MUI_FINISHPAGE_RUN $INSTDIR\m13ui.exe
72
73 !insertmacro MUI_PAGE_WELCOME
74 !insertmacro MUI_PAGE_DIRECTORY
75 !insertmacro MUI_PAGE_INSTFILES
76 !insertmacro MUI_PAGE_FINISH
77
78 ;--------------------------------
79 ;Install Functions
80 Function ".onInit"
81 !insertmacro MULTIUSER_INIT
82 FunctionEnd
83
84 ;--------------------------------
85 ;UnInstall Functions
86 Function "un.onInit"
87 !insertmacro MULTIUSER_UNINIT
88 FunctionEnd
89
90 Section ""
91 ; The actual installation
92 SetOutPath "$INSTDIR"
93 !include "filelist.nsh"
94
95 WriteRegStr SHCTX "Software\${productname_short}" "" $INSTDIR
96
97 ;Create uninstaller
98 WriteUninstaller "$INSTDIR\Uninstall.exe"
99
100 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
101
102 ;Create shortcuts
103 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
104 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" "$INSTDIR\m13ui.exe"
105
106 !insertmacro MUI_STARTMENU_WRITE_END
107
108 SectionEnd
109
110 Section "Uninstall"
111 RMDir /r "$INSTDIR" ; TODO include uninstall files
112 ; !include "filelist-un.nsh"
113 ; Delete "$INSTDIR\Uninstall.exe"
114 ; RMDir "$INSTDIR"
115
116 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
117
118 Delete "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk"
119 RMDir "$SMPROGRAMS\$StartMenuFolder"
120
121 DeleteRegKey /ifempty SHCTX "Software\${productname_short}"
122
123 SectionEnd

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