-
Notifications
You must be signed in to change notification settings - Fork 1
/
installer.nsi
175 lines (125 loc) · 4.49 KB
/
installer.nsi
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
;Furqan Installer
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;--------------------------------
;General
;Name and file
Name "Furqan"
OutFile "Furqan v1.0.0.exe"
;Default installation folder
InstallDir "D:\Furqan"
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\ShamSoft\Furqan" ""
;Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
;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\ShamSoft\Furqan"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "ARABIC" ;first language is the default language
!insertmacro MUI_LANGUAGE "ENGLISH"
;--------------------------------
;Reserve Files
;If you are using solid compression, files that are required before
;the actual installation should be stored first in the data block,
;because this will make your installer start faster.
!insertmacro MUI_RESERVEFILE_LANGDLL
;--------------------------------
;Installer Sections
Section Sec
SetOutPath "$INSTDIR"
;ADD YOUR OWN FILES HERE...
CreateDirectory $INSTDIR\intl
SetOutPath $INSTDIR\intl
File "intl\fbintl.conf"
File "intl\fbintl.dll"
CreateDirectory $INSTDIR\platforms
SetOutPath $INSTDIR\platforms
File "platforms\qwindows.dll"
CreateDirectory $INSTDIR\sqldrivers
SetOutPath $INSTDIR\sqldrivers
File "sqldrivers\qsqlibase.dll"
CreateDirectory $INSTDIR\printsupport
SetOutPath $INSTDIR\printsupport
File "printsupport\windowsprintersupport.dll"
SetOutPath $INSTDIR
; Put files there
File "Furqan.exe"
File "ar.qm"
File "en.qm"
File "license.txt"
File "data.fdb"
File "fbclient.dll"
File "firebird.msg"
File "ib_util.dll"
File "icudt30.dll"
File "icudt52.dll"
File "icuin30.dll"
File "icuin52.dll"
File "icuuc30.dll"
File "icuuc52.dll"
File "libgcc_s_dw2-1.dll"
File "libGLESv2.dll"
File "libstdc++-6.dll"
File "libwinpthread-1.dll"
File "Microsoft.VC80.CRT.manifest"
File "msvcp80.dll"
File "msvcr80.dll"
File "Qt5Core.dll"
File "Qt5Gui.dll"
File "Qt5PrintSupport.dll"
File "Qt5Sql.dll"
File "Qt5Widgets.dll"
;Store installation folder
WriteRegStr HKCU "Software\ShamSoft\Furqan" "" $INSTDIR
;Add an entry to Add/Remove Programs.
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Furqan" "DisplayName" "Furqan v1.0.0"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Furqan" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Furqan" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Furqan" "NoRepair" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Furqan" "VersionMajor" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Furqan" "VersionMinor" 0
;Create uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
CreateDirectory "$SMPROGRAMS\Furqan"
CreateShortCut "$SMPROGRAMS\Furqan\uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\Furqan\Furqan v1.0.0.lnk" "$INSTDIR\Furqan.exe" "" "$INSTDIR\Furqan.exe" 0
CreateShortCut "$DESKTOP\Furqan v1.0.0.lnk" "$INSTDIR\Furqan.exe" "" "$INSTDIR\Furqan.exe" 0
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
; Deleting the program's files and directories
RMDir /r "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\ShamSoft\Furqan"
; Remove shortcuts, if any
Delete "$SMPROGRAMS\Furqan\*.*"
Delete "$DESKTOP\Furqan v1.0.0.lnk"
; Remove the program's entry from add/remove programs.
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Furqan"
SectionEnd
;--------------------------------
;Uninstaller Functions
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd