1 | ;NSIS Modern User Interface version 1.70
|
---|
2 |
|
---|
3 | ;--------------------------------
|
---|
4 | ;Include Modern UI
|
---|
5 |
|
---|
6 | !include "MUI.nsh"
|
---|
7 |
|
---|
8 | ;--------------------------------
|
---|
9 | ;General
|
---|
10 |
|
---|
11 | !define VERSION "1.3"
|
---|
12 | !define TITLE "KonfiguratorZdechovNET"
|
---|
13 | !define FULL_TITLE "Konfigurátor ZdìchovNET"
|
---|
14 | !define CREATOR "Chronosoft"
|
---|
15 | !define CHANGELOG_FILE "Novinky.txt"
|
---|
16 |
|
---|
17 | ;Name and file
|
---|
18 | Name "${FULL_TITLE} ${VERSION}"
|
---|
19 | OutFile "Instalace${TITLE}-${VERSION}.exe"
|
---|
20 |
|
---|
21 | ;Default installation folder
|
---|
22 | InstallDir "$PROGRAMFILES\${FULL_TITLE}\"
|
---|
23 |
|
---|
24 | ;Get installation folder from registry if available
|
---|
25 | InstallDirRegKey HKCU "Software\${CREATOR}\${FULL_TITLE}" ""
|
---|
26 |
|
---|
27 | ;--------------------------------
|
---|
28 | ;Interface Settings
|
---|
29 |
|
---|
30 | !define MUI_ABORTWARNING
|
---|
31 |
|
---|
32 | ;--------------------------------
|
---|
33 | ;Language Selection Dialog Settings
|
---|
34 |
|
---|
35 | ;Remember the installer language
|
---|
36 | !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
|
---|
37 | !define MUI_LANGDLL_REGISTRY_KEY "Software\${CREATOR}\${FULL_TITLE}"
|
---|
38 | !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
|
---|
39 |
|
---|
40 | ;--------------------------------
|
---|
41 | ;Pages
|
---|
42 |
|
---|
43 | !define MUI_ICON "..\Resources\Icons\${TITLE}.ico"
|
---|
44 | !define MUI_UNICON "..\Resources\Icons\${TITLE}.ico"
|
---|
45 | ;!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
---|
46 |
|
---|
47 | !insertmacro MUI_PAGE_WELCOME
|
---|
48 | ;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
|
---|
49 | !insertmacro MUI_PAGE_COMPONENTS
|
---|
50 | !insertmacro MUI_PAGE_DIRECTORY
|
---|
51 | !insertmacro MUI_PAGE_INSTFILES
|
---|
52 |
|
---|
53 | !insertmacro MUI_UNPAGE_CONFIRM
|
---|
54 | !insertmacro MUI_UNPAGE_INSTFILES
|
---|
55 |
|
---|
56 | ;--------------------------------
|
---|
57 | ;Languages
|
---|
58 |
|
---|
59 | !insertmacro MUI_LANGUAGE "English"
|
---|
60 | !insertmacro MUI_LANGUAGE "Czech"
|
---|
61 |
|
---|
62 | ;--------------------------------
|
---|
63 | ;Reserve Files
|
---|
64 |
|
---|
65 | ;These files should be inserted before other files in the data block
|
---|
66 | ;Keep these lines before any File command
|
---|
67 | ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
|
---|
68 |
|
---|
69 | !insertmacro MUI_RESERVEFILE_LANGDLL
|
---|
70 |
|
---|
71 | ;--------------------------------
|
---|
72 | ;Installer Sections
|
---|
73 |
|
---|
74 | Section "Nutné souèásti" Nutne
|
---|
75 |
|
---|
76 | SectionIn RO
|
---|
77 |
|
---|
78 | ; Write the uninstall keys for Windows
|
---|
79 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "DisplayName" "${FULL_TITLE}"
|
---|
80 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
---|
81 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoModify" 1
|
---|
82 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoRepair" 1
|
---|
83 |
|
---|
84 | SetOutPath "$INSTDIR"
|
---|
85 |
|
---|
86 | ;ADD YOUR OWN FILES HERE...
|
---|
87 | File "..\_Latest\${TITLE}.exe"
|
---|
88 | File "..\_Latest\${TITLE}.map"
|
---|
89 | File "..\_Latest\netdom.exe"
|
---|
90 | File "..\_Latest\DiallingService.exe"
|
---|
91 | File "..\${CHANGELOG_FILE}"
|
---|
92 |
|
---|
93 | ;Store installation folder
|
---|
94 | WriteRegStr HKCU "Software\${CREATOR}\${TITLE}" "" $INSTDIR
|
---|
95 |
|
---|
96 | ;Create uninstaller
|
---|
97 | WriteUninstaller "$INSTDIR\Uninstall.exe"
|
---|
98 |
|
---|
99 | SectionEnd
|
---|
100 |
|
---|
101 | Section "Pøidat do nabídky Start"
|
---|
102 |
|
---|
103 | CreateDirectory "$SMPROGRAMS\${FULL_TITLE}"
|
---|
104 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
---|
105 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\${FULL_TITLE}.lnk" "$INSTDIR\${TITLE}.exe"
|
---|
106 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\${CHANGELOG_FILE}" "$INSTDIR\${CHANGELOG_FILE}"
|
---|
107 |
|
---|
108 | SectionEnd
|
---|
109 |
|
---|
110 | Section "Umístit ikonu na plochu"
|
---|
111 |
|
---|
112 | CreateShortCut "$DESKTOP\${FULL_TITLE}.lnk" "$INSTDIR\${TITLE}.exe"
|
---|
113 |
|
---|
114 | SectionEnd
|
---|
115 |
|
---|
116 | Section "Zobrazit informace"
|
---|
117 |
|
---|
118 | ExecShell "open" "${CHANGELOG_FILE}"
|
---|
119 |
|
---|
120 | SectionEnd
|
---|
121 |
|
---|
122 |
|
---|
123 | ;--------------------------------
|
---|
124 | ;Installer Functions
|
---|
125 |
|
---|
126 | Function .onInit
|
---|
127 |
|
---|
128 | !insertmacro MUI_LANGDLL_DISPLAY
|
---|
129 |
|
---|
130 | FunctionEnd
|
---|
131 |
|
---|
132 | ;--------------------------------
|
---|
133 | ;Descriptions
|
---|
134 |
|
---|
135 | ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
|
---|
136 |
|
---|
137 | ;Assign descriptions to sections
|
---|
138 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
---|
139 | !insertmacro MUI_DESCRIPTION_TEXT ${Nutne} "Vyberte potøebné souèásti."
|
---|
140 | !insertmacro MUI_FUNCTION_DESCRIPTION_END
|
---|
141 |
|
---|
142 |
|
---|
143 | ;--------------------------------
|
---|
144 | ;Uninstaller Section
|
---|
145 |
|
---|
146 | Section "Uninstall"
|
---|
147 |
|
---|
148 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}"
|
---|
149 |
|
---|
150 | Delete "$DESKTOP\${TITLE}.lnk"
|
---|
151 |
|
---|
152 | RMDir /r "$SMPROGRAMS\${FULL_TITLE}"
|
---|
153 | RMDir /r "$INSTDIR"
|
---|
154 |
|
---|
155 |
|
---|
156 | DeleteRegKey /ifempty HKCU "Software\${CREATOR}\${FULL_TITLE}"
|
---|
157 |
|
---|
158 | SectionEnd
|
---|
159 |
|
---|
160 | ;--------------------------------
|
---|
161 | ;Uninstaller Functions
|
---|
162 |
|
---|
163 | Function un.onInit
|
---|
164 |
|
---|
165 | !insertmacro MUI_UNGETLANGUAGE
|
---|
166 |
|
---|
167 | FunctionEnd
|
---|