Menu

[r549]: / release / softProjectorUpdate.nsi  Maximize  Restore  History

Download this file

228 lines (164 with data), 6.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
;NSIS Modern User Interface
;SoftProjector Installer
;Written by Vladislav Kobzar
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;--------------------------------
;General
;Name and file
Name "SoftProjector 1.07"
OutFile "SoftProjector-1.07-upgrade.exe"
XPStyle on
;Default installation folder
InstallDir "$PROGRAMFILES\SoftProjector"
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\SoftProjector" ""
;Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
;Variables
Var StartMenuFolder
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Language Selection Dialog Settings
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\SoftProjector"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_LICENSE "License.txt"
!insertmacro MUI_PAGE_DIRECTORY
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\SoftProjector"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN softProjector.exe
!define MUI_FINISHPAGE_SHOWREADME Readme.txt
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_RESERVEFILE_LANGDLL
;--------------------------------
;Installer Sections
Section "Dummy Section" SecDummy
;ADD YOUR OWN FILES HERE...
SetOutPath "$INSTDIR\imageformats"
File imageformats\qgif4.dll
File imageformats\qico4.dll
File imageformats\qjpeg4.dll
File imageformats\qmng4.dll
File imageformats\qsvg4.dll
File imageformats\qtiff4.dll
SetOutPath "$INSTDIR\sqldrivers"
File sqldrivers\qsqlite4.dll
File sqldrivers\qsqlodbc4.dll
SetOutPath "$INSTDIR\translations"
File translations\flag_cs.png
File translations\flag_de.png
File translations\flag_ru.png
File translations\flag_ua.png
File translations\softpro_cs.qm
File translations\softpro_de.qm
File translations\softpro_ru.qm
File translations\softpro_ua.qm
SetOutPath "$INSTDIR\"
File libgcc_s_dw2-1.dll
File License.txt
File Readme.txt
File mingwm10.dll
File QtCore4.dll
File QtGui4.dll
File QtSql4.dll
File sqlite3u.dll
File softProjector.exe
File spData.sqlite
;Store installation folder
WriteRegStr HKCU "Software\SoftProjector" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\softProjector.lnk" "$INSTDIR\softProjector.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\splash.bmp "install\splash.bmp"
advsplash::show 1200 300 300 0 $PLUGINSDIR\splash
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
;--------------------------------
;Descriptions
;Language strings
LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
LangString DESC_SecDummy ${LANG_GERMAN} "A test section."
LangString DESC_SecDummy ${LANG_CZECH} "A test section."
LangString DESC_SecDummy ${LANG_RUSSIAN} "A test section."
LangString DESC_SecDummy ${LANG_UKRAINIAN} "A test section."
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;ADD YOUR OWN FILES HERE...
Delete "$INSTDIR\imageformats\qgif4.dll"
Delete "$INSTDIR\imageformats\qico4.dll"
Delete "$INSTDIR\imageformats\qjpeg4.dll"
Delete "$INSTDIR\imageformats\qmng4.dll"
Delete "$INSTDIR\imageformats\qsvg4.dll"
Delete "$INSTDIR\imageformats\qtiff4.dll"
Delete "$INSTDIR\sqldrivers\qsqlite4.dll"
Delete "$INSTDIR\sqldrivers\qsqlodbc4.dll"
Delete "$INSTDIR\translations\flag_cs.png"
Delete "$INSTDIR\translations\flag_de.png"
Delete "$INSTDIR\translations\flag_ru.png"
Delete "$INSTDIR\translations\flag_ua.png"
Delete "$INSTDIR\translations\softpro_cs.qm"
Delete "$INSTDIR\translations\softpro_de.qm"
Delete "$INSTDIR\translations\softpro_ru.qm"
Delete "$INSTDIR\translations\softpro_ua.qm"
Delete "$INSTDIR\libgcc_s_dw2-1.dll"
Delete "$INSTDIR\License.txt"
Delete "$INSTDIR\mingwm10.dll"
Delete "$INSTDIR\QtCore4.dll"
Delete "$INSTDIR\QtGui4.dll"
Delete "$INSTDIR\QtSql4.dll"
Delete "$INSTDIR\sqlite3u.dll"
Delete "$INSTDIR\softProjector.exe"
Delete "$INSTDIR\spData.sqlite"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR\Backgrounds"
RMDir "$INSTDIR\imageformats"
RMDir "$INSTDIR\sqldrivers"
RMDir "$INSTDIR"
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
Delete "$SMPROGRAMS\$StartMenuFolder\softProjector.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
RMDir "$SMPROGRAMS\$StartMenuFolder"
DeleteRegKey /ifempty HKCU "Software\SoftProjector"
SectionEnd
;--------------------------------
;Uninstaller Functions
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd