-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathntlmaps.nsi
118 lines (104 loc) · 4.58 KB
/
ntlmaps.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
; This file is Copyright 2005 Mario Zoppetti, and was added by
; Darryl A. Dixon <[email protected]> to
; 'NTLM Authorization Proxy Server',
; Copyright 2001 Dmitry A. Rozmanov <[email protected]>
;
; NTLM APS is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; NTLM APS is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with the sofware; see the file COPYING. If not, write to the
; Free Software Foundation, Inc.,
; 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "ntlmaps"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "MZ"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "ntlmaps-setup-${PRODUCT_VERSION}.exe"
SetCompressor lzma
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
Icon "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
DirText "Setup will install $(^Name) in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder."
LicenseText "If you accept all the terms of the agreement, choose I Agree to continue. You must accept the agreement to install $(^Name)."
LicenseData "..\COPYING"
ShowInstDetails show
ShowUnInstDetails show
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
ClearErrors
FileOpen $0 "${PRODUCT_NAME}.cmd" w
IfErrors done
FileWrite $0 "${PRODUCT_NAME}.exe -c server.cfg"
FileClose $0
done:
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.cmd"
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.cmd"
File "..\dist\bz2.pyd"
File "..\dist\library.zip"
File "..\dist\ntlmaps.exe"
File "..\dist\ntlmaps-hashes.exe"
File "..\dist\python25.dll"
File "..\dist\pywintypes25.dll"
File "..\dist\select.pyd"
File "..\dist\server.cfg"
File "..\dist\unicodedata.pyd"
File "..\dist\w9xpopen.exe"
File "..\dist\win32console.pyd"
File "..\dist\_socket.pyd"
File "..\dist\_ssl.pyd"
SectionEnd
Section -AdditionalIcons
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall ${PRODUCT_NAME}.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_VERSION}.cmd"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
Section Uninstall
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\_ssl.pyd"
Delete "$INSTDIR\_socket.pyd"
Delete "$INSTDIR\zlib.pyd"
Delete "$INSTDIR\w9xpopen.exe"
Delete "$INSTDIR\unicodedata.pyd"
Delete "$INSTDIR\server.cfg"
Delete "$INSTDIR\select.pyd"
Delete "$INSTDIR\python24.dll"
Delete "$INSTDIR\${PRODUCT_NAME}.exe"
Delete "$INSTDIR\library.zip"
Delete "$INSTDIR\bz2.pyd"
Delete "$INSTDIR\${PRODUCT_NAME}.cmd"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall ${PRODUCT_NAME}.lnk"
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk"
RMDir "$SMPROGRAMS\${PRODUCT_NAME}"
RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
SetAutoClose true
SectionEnd