-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathupdate.nsi
82 lines (71 loc) · 2.27 KB
/
update.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
# Auto-generated by EclipseNSIS Script Wizard
# 11 nov. 2011 22:34:19
Name Flashtool
SetCompressor /SOLID lzma
RequestExecutionLevel highest
# General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
!define VERSION 0.5.3.0
!define COMPANY Androxyde
!define URL http://androxyde.github.com/Flashtool/
# MUI Symbol Definitions
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-colorful.ico"
!define MUI_FINISHPAGE_NOAUTOCLOSE
#!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
#!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
#!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
#!define MUI_STARTMENUPAGE_DEFAULTFOLDER Flashtool
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-colorful.ico"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
# Included files
!include Sections.nsh
!include MUI2.nsh
# Installer pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
#!insertmacro MUI_UNPAGE_CONFIRM
#!insertmacro MUI_UNPAGE_INSTFILES
# Installer languages
!insertmacro MUI_LANGUAGE English
# Installer attributes
OutFile update.exe
CRCCheck on
XPStyle on
ShowInstDetails show
VIProductVersion 0.5.3.0
VIAddVersionKey ProductName Flashtool
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}"
VIAddVersionKey CompanyWebsite "${URL}"
VIAddVersionKey FileVersion "${VERSION}"
VIAddVersionKey FileDescription ""
VIAddVersionKey LegalCopyright ""
InstallDirRegKey HKLM "${REGKEY}" Path
ShowUninstDetails show
# Installer sections
Section -Flashtool SEC0000
ReadRegStr $INSTDIR HKLM "${REGKEY}" Path
StrCmp $INSTDIR "" canceled continue
canceled:
MessageBox MB_OK|MB_ICONEXCLAMATION \
"$(^Name) is not installed. $\n$\nThe installation \
will be aborted" \
IDOK aborted
aborted:
Abort
continue:
SetOutPath $INSTDIR
SetOverwrite on
Delete $INSTDIR\x10flasher_lib\driverid.properties
RmDir /r $INSTDIR\custom\features\UnlockBL
RmDir /r $INSTDIR\custom\root
RmDir /r $INSTDIR\custom\shells
RmDir /r $INSTDIR\devices
File /r ..\Deploy\FlashTool\*
WriteRegStr HKLM "${REGKEY}\Components" Flashtool 1
SectionEnd
# Installer functions
Function .onInit
InitPluginsDir
FunctionEnd