* Numerous fixups needed for Windows port:
[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\bin\cygz.dll
72 File C:\cygwin\home\error\cvs\citadel\base64.exe
73 File C:\cygwin\home\error\cvs\citadel\weekly
74 File C:\cygwin\home\error\cvs\citadel\setup.exe
75 File C:\cygwin\home\error\cvs\citadel\sendcommand.exe
76 File C:\cygwin\home\error\cvs\citadel\docs\citadel.html
77 File /oname=README.TXT C:\cygwin\home\error\cvs\citadel\docs\windows-readme.txt
78 SetOverwrite off
79 File /r C:\cygwin\home\error\cvs\citadel\help
80 File /r C:\cygwin\home\error\cvs\citadel\messages
81 SetOverwrite on
82 CreateShortcut "$SMPROGRAMS\Citadel\Server Setup Utility.lnk" \
83         "$INSTDIR\rxvt.exe" "-fg white -bg black -sl 1000 -sr -fn 8x16 -e ./setup.exe" \
84         "shell32.dll" "65"
85 CreateShortcut "$SMPROGRAMS\Citadel\README.lnk" \
86         "$INSTDIR\README.TXT"
87 CreateShortcut "$SMPROGRAMS\Citadel\Citadel Documentation.lnk" \
88         "$INSTDIR\citadel.html"
89 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices" "Citadel" "$INSTDIR\citserver.exe -x9 -tcitadel-debug.txt"
90 SectionEnd
91
92 Section "Citadel/UX Utilities" CitadelUtils
93 SetOutPath $INSTDIR
94 File C:\cygwin\home\error\cvs\citadel\aidepost.exe
95 File C:\cygwin\home\error\cvs\citadel\citmail.exe
96 File C:\cygwin\home\error\cvs\citadel\migratenet.exe
97 File C:\cygwin\home\error\cvs\citadel\msgform.exe
98 File C:\cygwin\home\error\cvs\citadel\userlist.exe
99 File C:\cygwin\home\error\cvs\citadel\whobbs.exe
100 SectionEnd
101 !insertmacro MUI_SECTIONS_FINISHHEADER
102
103 !insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
104   !insertmacro MUI_DESCRIPTION_TEXT ${Citadel} $(DESC_Citadel)
105   !insertmacro MUI_DESCRIPTION_TEXT ${CitadelServer} $(DESC_CitadelServer)
106   !insertmacro MUI_DESCRIPTION_TEXT ${CitadelUtils} $(DESC_CitadelUtils)
107 !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
108
109 ; begin uninstall settings/section
110
111 Section Uninstall
112 SetShellVarContext all
113 SetDetailsView hide
114 SetAutoClose false
115 Delete "$INSTDIR\uninst.exe"
116 Delete /rebootok "$INSTDIR\citadel.exe"
117 Delete /rebootok "$INSTDIR\libW11.dll"
118 Delete /rebootok "$INSTDIR\cygwin1.dll"
119 Delete /rebootok "$INSTDIR\cygcrypto-0.9.7.dll"
120 Delete /rebootok "$INSTDIR\cygncurses7.dll"
121 Delete /rebootok "$INSTDIR\cygssl-0.9.7.dll"
122 Delete /rebootok "$INSTDIR\rxvt.exe"
123 Delete /rebootok "$INSTDIR\citserver.exe"
124 Delete /rebootok "$INSTDIR\base64.exe"
125 Delete /rebootok "$INSTDIR\weekly"
126 Delete /rebootok "$INSTDIR\setup.exe"
127 Delete /rebootok "$INSTDIR\aidepost.exe"
128 Delete /rebootok "$INSTDIR\citmail.exe"
129 Delete /rebootok "$INSTDIR\migratenet.exe"
130 Delete /rebootok "$INSTDIR\msgform.exe"
131 Delete /rebootok "$INSTDIR\sendcommand.exe"
132 Delete /rebootok "$INSTDIR\userlist.exe"
133 Delete /rebootok "$INSTDIR\whobbs.exe"
134
135 RMDir /r "$INSTDIR\help"
136 RMDir /r "$INSTDIR\messages"
137 RMDir /r "$INSTDIR\bitbucket"
138 RMDir "$INSTDIR"
139
140 Delete "$SMPROGRAMS\Citadel\README.lnk"
141 Delete "$SMPROGRAMS\Citadel\Citadel Documentation.lnk"
142 Delete "$SMPROGRAMS\Citadel\Server Setup Utility.lnk"
143 Delete "$SMPROGRAMS\Citadel\Citadel.lnk"
144 RMDir "$SMPROGRAMS\Citadel"
145 Delete "$DESKTOP\Citadel.lnk"
146 DeleteRegValue HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices" "Citadel"
147 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel"
148 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citadel"
149 DeleteRegValue HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel\CurrentVersion" "InstallDir"
150 DeleteRegKey /ifempty HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel\CurrentVersion"
151 DeleteRegKey /ifempty HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel"
152 DeleteRegKey /ifempty HKEY_LOCAL_MACHINE "SOFTWARE\Citadel"
153 !insertmacro MUI_UNFINISHHEADER
154 SectionEnd ; end of uninstall section
155
156 ; eof