annotate packaging/trustbridge.nsi @ 793:6bb769d3cdc1

Installer: Welcomepage: Further shortned to the core message.
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 15 Jul 2014 10:42:36 +0200
parents 02214ef01bfa
children fdc15f0cfdd8
rev   line source
588
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
1 ; Copyright (C) 2014 by Bundesamt f�r Sicherheit in der Informationstechnik
406
5ee694fa3da7 Add license header for NSIS scripts
Andre Heinecke <aheinecke@intevation.de>
parents: 381
diff changeset
2 ; Software engineering by Intevation GmbH
5ee694fa3da7 Add license header for NSIS scripts
Andre Heinecke <aheinecke@intevation.de>
parents: 381
diff changeset
3 ;
5ee694fa3da7 Add license header for NSIS scripts
Andre Heinecke <aheinecke@intevation.de>
parents: 381
diff changeset
4 ; This file is Free Software under the GNU GPL (v>=2)
5ee694fa3da7 Add license header for NSIS scripts
Andre Heinecke <aheinecke@intevation.de>
parents: 381
diff changeset
5 ; and comes with ABSOLUTELY NO WARRANTY!
5ee694fa3da7 Add license header for NSIS scripts
Andre Heinecke <aheinecke@intevation.de>
parents: 381
diff changeset
6 ; See LICENSE.txt for details.
5ee694fa3da7 Add license header for NSIS scripts
Andre Heinecke <aheinecke@intevation.de>
parents: 381
diff changeset
7
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8 ; This script creates the installer for renameme it needs the
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9 ; following definitions to be set when calling makensis:
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10 ;
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 ; productname: Name of the Software as it will show up under installed
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12 ; Software
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13 ; company: The publisher of this software. (Windows needs this)
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 ; version_number: The version of the software
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15 ; setupname: The name for the result created by this
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16 ; productname_short: Used for the default folder name and such
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17 ; files_dir: the path to the files
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19 ;--------------------------------
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 ; Includes
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21 !define MULTIUSER_EXECUTIONLEVEL Highest
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 !define MULTIUSER_MUI
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 !define MULTIUSER_INSTALLMODE_COMMANDLINE
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\${productname_short}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME ""
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26 !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\${productname_short}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
27 !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME ""
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
28 !define MULTIUSER_INSTALLMODE_INSTDIR "${productname_short}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
29
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30 !include "MultiUser.nsh"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
31 !include "MUI2.nsh"
588
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
32 !include "FileFunc.nsh"
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
33
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
34 ;--------------------------------
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35 ;Version Information (for installer file properties)
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36
500
4f972b1f4996 Fix packaging information generation
Andre Heinecke <aheinecke@intevation.de>
parents: 494
diff changeset
37 ;VIProductVersion "${version_number}" ;needs integer format: x.x.x.x
4f972b1f4996 Fix packaging information generation
Andre Heinecke <aheinecke@intevation.de>
parents: 494
diff changeset
38 VIProductVersion 1.0.0.0
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 VIAddVersionKey "ProductName" "${productname_short}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
40 VIAddVersionKey "Comments" "${productname_short} ist Freie Software"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
41 VIAddVersionKey "CompanyName" "${company}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
42 VIAddVersionKey "LegalTrademarks" ""
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
43 VIAddVersionKey "LegalCopyright" "${copyright}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44 VIAddVersionKey "FileDescription" "${description}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
45 VIAddVersionKey "FileVersion" "${version_number}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
46
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
47 Var StartMenuFolder
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
48 ;--------------------------------
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49 ; General
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
50
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
51 ; Define Name, File and Installdir of Installer
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
52 Name "${productname}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
53 OutFile "${setupname}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
54 InstallDir "$PROGRAMFILES\${productname_short}"
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
55 BrandingText "${company} - ${productname}"
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
56
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
57 ;--------------------------------
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
58 ; Interface Settings
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
59
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
60 ; MUI Images / Icons
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
61 !define MUI_HEADERIMAGE
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
62 !define MUI_HEADERIMAGE_BITMAP "resources\header-install.bmp"
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
63 !define MUI_HEADERIMAGE_UNBITMAP "resources\header-uninstall.bmp"
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
64 !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\wizard-install.bmp"
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
65 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "resources\wizard-uninstall.bmp"
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
66 !define MUI_ICON "resources\install.ico"
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
67 !define MUI_UNICON "resources\uninstall.ico"
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
68
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
69 ; MUI welcome page text
793
6bb769d3cdc1 Installer: Welcomepage: Further shortned to the core message.
Bernhard Reiter <bernhard@intevation.de>
parents: 792
diff changeset
70 !define MUI_WELCOMEPAGE_TITLE "${productname} ist eine Anwendung um Wurzelzertifikate auf ihrem System \
792
02214ef01bfa Installer: Welcomepage Text, shortened about a superfluous statement.
Bernhard Reiter <bernhard@intevation.de>
parents: 632
diff changeset
71 zu installieren und aktuell zu halten."
793
6bb769d3cdc1 Installer: Welcomepage: Further shortned to the core message.
Bernhard Reiter <bernhard@intevation.de>
parents: 792
diff changeset
72 ;!define MUI_WELCOMEPAGE_TEXT ""
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
73
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
74 !define MUI_FINISHPAGE_NOAUTOCLOSE
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
75 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
76
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
77 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
78 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
79 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
80
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
81
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
82 ;--------------------------------
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
83 ; Pages
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
84
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
85 !define MUI_FINISHPAGE_TITLE "Die Installation war erfolgreich"
506
bfcfbae151ab Some packaging changes. Add dummy runAsUser (not working) Update Application icon
Andre Heinecke <aheinecke@intevation.de>
parents: 500
diff changeset
86 !define MUI_FINISHPAGE_TEXT "${productname} wurde auf Ihrem \
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
87 Computer installliert. $\r$\n$\r$\n\
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
88 Klicken Sie auf 'Fertig stellen', um den Installations-Assistenten\
588
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
89 zu schlie�en."
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
90 ;!define MUI_FINISHPAGE_RUN $INSTDIR\trustbridge.exe
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
91 ;!define MUI_FINISHPAGE_RUN_TEXT "Anwendung starten"
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
92 ;!define MUI_FINISHPAGE_RUN_FUNCTION RunAsUser
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
93 !define MUI_FINISHPAGE_LINK "Mehr unter http://www.bsi.bund.de"
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
94 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.bsi.bund.de"
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
95
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
96 !insertmacro MUI_PAGE_WELCOME
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
97 !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
98 !insertmacro MUI_PAGE_DIRECTORY
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
99 !insertmacro MUI_PAGE_INSTFILES
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
100 !insertmacro MUI_PAGE_FINISH
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
101
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
102 !insertmacro MUI_UNPAGE_CONFIRM
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
103 !insertmacro MUI_UNPAGE_INSTFILES
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
104
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
105
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
106 !insertmacro MUI_LANGUAGE "German"
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
107
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
108
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
109 ;--------------------------------
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
110 ; Install Functions
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
111
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
112 Function ".onInit"
588
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
113 Var /GLOBAL is_update
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
114 Var /GLOBAL changed_dir
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
115 ${GetParameters} $R0
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
116 ClearErrors
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
117 ${GetOptions} $R0 /UPDATE= $is_update
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
118
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
119 ; Check if the install directory was modified on the command line
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
120 StrCmp "$INSTDIR" "$PROGRAMFILES\${productname_short}" unmodified 0
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
121 ; It is modified. Save that value.
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
122 StrCpy $changed_dir "$INSTDIR"
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
123
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
124 ; MULITUSER_INIT overwrites directory setting from command line
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
125 !insertmacro MULTIUSER_INIT
588
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
126 StrCpy $INSTDIR "$changed_dir"
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
127 goto initDone
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
128 unmodified:
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
129 !insertmacro MULTIUSER_INIT
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
130 initDone:
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
131 FunctionEnd
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
132
506
bfcfbae151ab Some packaging changes. Add dummy runAsUser (not working) Update Application icon
Andre Heinecke <aheinecke@intevation.de>
parents: 500
diff changeset
133 ; If we run elevated we do not want to run
bfcfbae151ab Some packaging changes. Add dummy runAsUser (not working) Update Application icon
Andre Heinecke <aheinecke@intevation.de>
parents: 500
diff changeset
134 ; the UI elevated as this could be a security
bfcfbae151ab Some packaging changes. Add dummy runAsUser (not working) Update Application icon
Andre Heinecke <aheinecke@intevation.de>
parents: 500
diff changeset
135 ; problem.
bfcfbae151ab Some packaging changes. Add dummy runAsUser (not working) Update Application icon
Andre Heinecke <aheinecke@intevation.de>
parents: 500
diff changeset
136 Function RunAsUser
bfcfbae151ab Some packaging changes. Add dummy runAsUser (not working) Update Application icon
Andre Heinecke <aheinecke@intevation.de>
parents: 500
diff changeset
137 ExecShell "" "$INSTDIR\trustbridge.exe"
bfcfbae151ab Some packaging changes. Add dummy runAsUser (not working) Update Application icon
Andre Heinecke <aheinecke@intevation.de>
parents: 500
diff changeset
138 FunctionEnd
bfcfbae151ab Some packaging changes. Add dummy runAsUser (not working) Update Application icon
Andre Heinecke <aheinecke@intevation.de>
parents: 500
diff changeset
139
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
140 ;--------------------------------
381
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
141 ; UnInstall Functions
73bfc9cc22e7 Improved NSIS installer MUI script. Added sample images and icons.
Emanuel Schuetze <emanuel@intevation.de>
parents: 340
diff changeset
142
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
143 Function "un.onInit"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
144 !insertmacro MULTIUSER_UNINIT
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
145 FunctionEnd
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
146
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
147 Section ""
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
148 ; The actual installation
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
149 SetOutPath "$INSTDIR"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
150 !include "filelist.nsh"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
151
588
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
152 ;Create uninstaller
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
153 WriteUninstaller "$INSTDIR\Uninstall.exe"
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
154
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
155 ; Code below is not run on updates
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
156 StrCmp $is_update '1' done
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
157
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
158 WriteRegStr SHCTX "Software\${productname_short}" "" $INSTDIR
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
159
632
9a18f096129d Add registry entries for logging.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 588
diff changeset
160 WriteRegStr SHCTX "Software\${productname_short}" "" $INSTDIR
9a18f096129d Add registry entries for logging.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 588
diff changeset
161
9a18f096129d Add registry entries for logging.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 588
diff changeset
162 ; Register logging
9a18f096129d Add registry entries for logging.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 588
diff changeset
163 WriteRegStr SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" "CategoryMessageFile" "$INSTDIR\trustbridge.exe"
9a18f096129d Add registry entries for logging.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 588
diff changeset
164 WriteRegStr SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" "EventMessageFile" "$INSTDIR\trustbridge.exe"
9a18f096129d Add registry entries for logging.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 588
diff changeset
165 WriteRegStr SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" "ParameterMessageFile" "$INSTDIR\trustbridge.exe"
9a18f096129d Add registry entries for logging.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 588
diff changeset
166 WriteRegDword SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" "TypesSupported" 5
9a18f096129d Add registry entries for logging.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 588
diff changeset
167 WriteRegDword SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" "CategoryCount" 3
494
613fbcb5df0c Add autostart entry and finish renaming
Andre Heinecke <aheinecke@intevation.de>
parents: 410
diff changeset
168
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
169 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
170
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
171 ;Create shortcuts
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
172 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
494
613fbcb5df0c Add autostart entry and finish renaming
Andre Heinecke <aheinecke@intevation.de>
parents: 410
diff changeset
173 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" "$INSTDIR\trustbridge.exe"
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
174
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
175 !insertmacro MUI_STARTMENU_WRITE_END
588
a4e75d90d3f6 Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents: 506
diff changeset
176 done:
340
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
177
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
178 SectionEnd
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
179
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
180 Section "Uninstall"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
181 RMDir /r "$INSTDIR" ; TODO include uninstall files
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
182 ; !include "filelist-un.nsh"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
183 ; Delete "$INSTDIR\Uninstall.exe"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
184 ; RMDir "$INSTDIR"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
185
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
186 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
187
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
188 Delete "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
189 RMDir "$SMPROGRAMS\$StartMenuFolder"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
190
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
191 DeleteRegKey /ifempty SHCTX "Software\${productname_short}"
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
192
9001eaa55549 Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
193 SectionEnd

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