* Checkin installer script citadel.nsi for NSIS Windows installer
[citadel.git] / citadel / citadel.nsi
1 ; $Id$
2 ; NOTE: this .NSI script is designed for NSIS v2.0b0+
3 ; Get NSIS at http://www.nullsoft.com/
4
5 !include "${NSISDIR}\Contrib\Modern UI\System.nsh"
6 !define MUI_PRODUCT "Citadel/UX"
7 !define MUI_VERSION "6.06"
8 !define MUI_WELCOMEPAGE
9 !define MUI_LICENSEPAGE
10 !define MUI_COMPONENTSPAGE
11 !define MUI_COMPONENTSPAGE_SMALLDESC
12 !define MUI_DIRECTORYPAGE
13 !define MUI_FINISHPAGE
14 !define MUI_UNINSTALLER
15 !define MUI_UNCONFIRMPAGE
16 !insertmacro MUI_LANGUAGE "English"
17 ;!define MUI_UI "${NSISDIR}\Contrib\UIs\modern3.exe"
18 ;!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
19 ;!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
20
21 OutFile "citadel-6.06.exe"
22 BGGradient off
23
24 LangString $DESC_Citadel ${LANG_ENGLISH} "Citadel/UX client and core libraries (required)"
25 LangString $DESC_CitadelServer ${LANG_ENGLISH} "Citadel/UX server"
26 LangString $DESC_CitadelUtils ${LANG_ENGLISH} "Citadel/UX utilities"
27
28 SetCompress auto
29 SetDatablockOptimize on
30 BrandingText "Citadel/UX "
31 CRCCheck force
32 AutoCloseWindow true
33 ShowInstDetails hide
34 ShowUninstDetails hide
35 SetDateSave on
36
37 LicenseData "C:\cygwin\home\error\copying.txt"
38
39 InstallDir "$PROGRAMFILES\Citadel"
40 InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel\CurrentVersion" "InstallDir"
41 DirShow show
42
43 Section "Citadel/UX client and core libraries (required)" Citadel ; (default section)
44 SetShellVarContext all
45 SetOutPath "$INSTDIR"
46 File C:\cygwin\home\error\cvs\citadel\citadel.exe
47 File C:\cygwin\home\error\citadel.rc
48 File C:\cygwin\bin\libW11.dll
49 File C:\cygwin\bin\cygwin1.dll
50 File C:\cygwin\bin\cygcrypto-0.9.7.dll
51 File C:\cygwin\bin\cygncurses7.dll
52 File C:\cygwin\bin\cygssl-0.9.7.dll
53 File C:\cygwin\bin\rxvt.exe
54 Delete "$DESKTOP\Citadel.lnk"
55 WriteUninstaller "$INSTDIR\uninst.exe"
56 CreateShortCut "$DESKTOP\Citadel.lnk" \
57         "$INSTDIR\rxvt.exe" "-fg white -bg black -sl 1000 -sr -fn 8x16 -e ./citadel.exe" \
58         "telnet.exe" "0"
59 CreateDirectory "$SMPROGRAMS\Citadel"
60 CreateShortcut "$SMPROGRAMS\Citadel\Citadel.lnk" \
61         "$INSTDIR\rxvt.exe" "-fg white -bg black -sl 1000 -sr -fn 8x16 -e ./citadel.exe" \
62         "telnet.exe" "0"
63 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citadel" "DisplayName" "Citadel (remove only)"
64 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citadel" "UninstallString" '"$INSTDIR\uninst.exe"'
65 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel\CurrentVersion" "InstallDir" "$INSTDIR"
66 SectionEnd ; end of default section
67
68 Section "Citadel/UX Server" CitadelServer
69 SetOutPath "$INSTDIR"
70 File C:\cygwin\home\error\cvs\citadel\citserver.exe
71 File C:\cygwin\home\error\cvs\citadel\base64.exe
72 File C:\cygwin\home\error\cvs\citadel\weekly
73 File C:\cygwin\home\error\cvs\citadel\setup.exe
74 File /r C:\cygwin\home\error\cvs\citadel\bitbucket
75 File /r C:\cygwin\home\error\cvs\citadel\help
76 File /r C:\cygwin\home\error\cvs\citadel\messages
77 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices" "Citadel" '"$INSTDIR\citserver.exe" -x9 -t"$INSTDIR\citadel-debug.txt" -h"$INSTDIR"'
78 SectionEnd
79
80 Section "Citadel/UX Utilities" CitadelUtils
81 SetOutPath $INSTDIR
82 File C:\cygwin\home\error\cvs\citadel\aidepost.exe
83 File C:\cygwin\home\error\cvs\citadel\citmail.exe
84 File C:\cygwin\home\error\cvs\citadel\migratenet.exe
85 File C:\cygwin\home\error\cvs\citadel\msgform.exe
86 File C:\cygwin\home\error\cvs\citadel\sendcommand.exe
87 File C:\cygwin\home\error\cvs\citadel\userlist.exe
88 File C:\cygwin\home\error\cvs\citadel\whobbs.exe
89 SectionEnd
90 !insertmacro MUI_SECTIONS_FINISHHEADER
91
92 !insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
93   !insertmacro MUI_DESCRIPTION_TEXT ${Citadel} ${DESC_Citadel}
94   !insertmacro MUI_DESCRIPTION_TEXT ${CitadelServer} ${DESC_CitadelServer}
95   !insertmacro MUI_DESCRIPTION_TEXT ${CitadelFiles} $(DESC_CitadelFiles}
96   !insertmacro MUI_DESCRIPTION_TEXT ${CitadelUtils} $(DESC_CitadelUtils}
97 !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
98
99 ; begin uninstall settings/section
100
101 Section Uninstall
102 SetShellVarContext all
103 SetDetailsView hide
104 SetAutoClose false
105 Delete "$INSTDIR\uninst.exe"
106 Delete /rebootok "$INSTDIR\citadel.exe"
107 Delete /rebootok "$INSTDIR\libW11.dll"
108 Delete /rebootok "$INSTDIR\cygwin1.dll"
109 Delete /rebootok "$INSTDIR\cygcrypto-0.9.7.dll"
110 Delete /rebootok "$INSTDIR\cygncurses7.dll"
111 Delete /rebootok "$INSTDIR\cygssl-0.9.7.dll"
112 Delete /rebootok "$INSTDIR\rxvt.exe"
113 Delete /rebootok "$INSTDIR\citserver.exe"
114 Delete /rebootok "$INSTDIR\base64.exe"
115 Delete /rebootok "$INSTDIR\weekly"
116 Delete /rebootok "$INSTDIR\setup.exe"
117 Delete /rebootok "$INSTDIR\aidepost.exe"
118 Delete /rebootok "$INSTDIR\citmail.exe"
119 Delete /rebootok "$INSTDIR\migratenet.exe"
120 Delete /rebootok "$INSTDIR\msgform.exe"
121 Delete /rebootok "$INSTDIR\sendcommand.exe"
122 Delete /rebootok "$INSTDIR\userlist.exe"
123 Delete /rebootok "$INSTDIR\whobbs.exe"
124
125 RMDir /r "$INSTDIR\help"
126 RMDir /r "$INSTDIR\messages"
127 RMDir /r "$INSTDIR\bitbucket"
128 RMDir "$INSTDIR"
129
130 Delete "$SMPROGRAMS\Citadel\Citadel.lnk"
131 RMDir "$SMPROGRAMS\Citadel"
132 Delete "$DESKTOP\Citadel.lnk"
133 DeleteRegValue HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices" "Citadel"
134 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel"
135 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citadel"
136 DeleteRegValue HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel\CurrentVersion" "InstallDir"
137 DeleteRegKey /ifempty HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel\CurrentVersion"
138 DeleteRegKey /ifempty HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel"
139 DeleteRegKey /ifempty HKEY_LOCAL_MACHINE "SOFTWARE\Citadel"
140 !insertmacro MUI_UNFINISHHEADER
141 SectionEnd ; end of uninstall section
142
143 ; eof