This repository has been archived by the owner on May 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
updater.nsi
executable file
·74 lines (59 loc) · 2.25 KB
/
updater.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
;NSIS Script For SmallwxApp
;Background Colors
BGGradient 0000FF 000000 FFFFFF
;Title Of Your Application
Name "WoWUpdaterApp"
;Do A CRC Check
CRCCheck On
;Output File Name
OutFile "WoWUpdaterAppSetup.exe"
;The Default Installation Directory
InstallDir "$PROGRAMFILES\WoWAddOnUpdater"
;The text to prompt the user to enter a directory
DirText "Please select the folder below"
SetCompressor /SOLID lzma
Section "Install"
;Install Files
SetOutPath $INSTDIR
SetCompress Auto
SetOverwrite IfNewer
File "dist\updater.exe"
File "dist\w9xpopen.exe"
File "dist\python24.dll"
File "dist\library.zip"
File "dist\unzip.exe"
File "dist\unrar.exe"
File "dist\updater.ico"
File "dist\MSVCR71.dll"
Delete "$INSTDIR\updates\*.*"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WoWAddOnUpdater" "DisplayName" "WoW AddOn Updater Program (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WoWAddOnUpdater" "UninstallString" "$INSTDIR\Uninst.exe"
WriteUninstaller "Uninst.exe"
SectionEnd
Section "Shortcuts"
;Add Shortcuts
; CreateDirectory "$SMPROGRAMS\SmallwxApp"
; CreateShortCut "$SMPROGRAMS\SmallwxApp\Small wxApp.lnk" "$INSTDIR\SmallwxApp.exe" "" "$INSTDIR\SmallwxApp.exe" 0
CreateShortCut "$DESKTOP\WoW AddOn Updater.lnk" "$INSTDIR\updater.exe" "" "$INSTDIR\updater.ico" 0
SectionEnd
UninstallText "This will uninstall SmallwxApp from your system"
Section Uninstall
;Delete Files
Delete "$INSTDIR\updater.exe"
Delete "$INSTDIR\w9xpopen.exe"
Delete "$INSTDIR\python24.dll"
Delete "$INSTDIR\library.zip"
Delete "$INSTDIR\unzip.exe"
Delete "$INSTDIR\updater.ico"
Delete "$INSTDIR\MSVCR71.dll"
Delete "$DESKTOP\WoW AddOn Updater.lnk"
;Delete Start Menu Shortcuts
; Delete "$SMPROGRAMS\SmallwxApp\*.*"
;RmDir "$SMPROGRAMS\SmallwxApp"
;Delete Uninstaller And Unistall Registry Entries
Delete "$INSTDIR\Uninst.exe"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\WoWAddOnUpdater"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WoWAddOnwUpdater"
RMDir "$INSTDIR"
SectionEnd