summaryrefslogtreecommitdiff
path: root/yacy.nsi
blob: afa635d960ab5596e4ba74952075df95d797becc (plain)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
;yacy.nsi
;--------
;part of YaCy (C) by Michael Peter Christen
;this file is contributed by Alexander Schier
;Cologne, 2005
;last major change: 22.07.2005
Name "YaCy"

OutFile "yacy_v0.42_20051216_1219.exe"
InstallDir $PROGRAMFILES\YaCy

SetCompress auto
SetCompressor bzip2

InstType /CUSTOMSTRING=Custom

InstType "Minimal"
InstType "Normal"
InstType "Full"

; The text to prompt the user to enter a directory
ComponentText "This will install YaCy v0.42(Build 20051216) on your computer. Select which optional things you want to be installed."
; The text to prompt the user to enter a directory
#DirText "If an old Version was installed into another locAtion(eg. AnomicHTTPProxy), you have to move the DATA Directory to the new location."
DirText "Choose a directory to install in to:"

LicenseText "You must agree the License to install YaCy"
LicenseData "gpl.txt"

Section "Binaries (required)"
	SectionIn 1 2 3 RO
	SetOutPath $INSTDIR
	#main files
	File "httpd.mime"
	File "startYACY.bat"
	File "startYACY_Win9x.bat"
	File "startYACY_noconsole_Win9x.bat"
	File "startYACY_noconsole.bat"
	File "stopYACY.bat"
	File "stopYACY_Win9x.bat"
	#File "httpProxy.command" ##Apple
	File "yacy.init"
	#File "httpProxy.sh"      ##UNIX
	File "yacy.yellow"
	File "yacy.stopwords"
	
	#texts
	File "readme.txt"
	File "gpl.txt"
	File "superseed.txt"
	File "yacy.stopwords"
	File "yacy.logging"
	
	#lib
	SetOutPath "$INSTDIR\lib"
	File /r "lib\*"

	#classes
	SetOutPath "$INSTDIR\classes"
	File /r "classes\*"

	#locales
	SetOutPath "$INSTDIR\locales"
	File /r "locales\*"

	#htroot non devel
	SetOutPath "$INSTDIR\htroot"
	File "htroot\*.html"
	File "htroot\*.inc"
	File "htroot\*.soap"
	File "htroot\*.xml"
	File "htroot\*.xsl"
	File "htroot\*.rss"
	File "htroot\*.csv"
	File "htroot\*.class"
	File "htroot\*.ico"
    File "htroot\*.bmp"
	#File "htroot\*.gif"
	File "htroot\*.pac" #proxy autoconfig

	#yacy non-devel
	SetOutPath "$INSTDIR\htroot\yacy"
	File "htroot\yacy\*.html"
	File "htroot\yacy\*.class"

	#yacy javascript
	SetOutPath "$INSTDIR\htroot\js"
	File "htroot\js\*.js"

	#yacy xml
    #TODO: Split in source/binary
	SetOutPath "$INSTDIR\htroot\xml"
	File /r "htroot\xml\*"

	#yacy/seedUpload
	SetOutPath "$INSTDIR\htroot\yacy\seedUpload"
	File "htroot\yacy\seedUpload\*.html"

	#proxymsg non-devel
	SetOutPath "$INSTDIR\htroot\proxymsg"
	File "htroot\proxymsg\*.html"
	File "htroot\proxymsg\*.inc"

	#templates
	SetOutPath "$INSTDIR\htroot\env"
	File /r "htroot\env\*"

	#htdocs default
	SetOutPath "$INSTDIR\htroot\htdocsdefault"
	File "htroot\htdocsdefault\*.html"
	File "htroot\htdocsdefault\*.class"

    SetOutPath "$INSTDIR\ranking"
    File /r "ranking\*"

	SetOutPath $INSTDIR



	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YACY" "DisplayName" "YACY"
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YACY" "UninstallString" '"$INSTDIR\uninstall.exe"'
	WriteUninstaller "uninstall.exe"

SectionEnd

Section "Addons"
	SectionIn 1 2 3
	SetOutPath $INSTDIR\addon
	File /r "addon\*"

	SetOutPath $INSTDIR
SectionEnd

Section "Docs"
	SectionIn 2 3
	SetOutPath $INSTDIR\doc
	File /r "doc\*"

	SetOutPath $INSTDIR
SectionEnd

Section "Development"
	SectionIn 3
	SetOutPath $INSTDIR\source

	File /r "source\*"

	SetOutPath $INSTDIR
	File "build.xml"
	File "build.properties"
	
	SetOutPath "$INSTDIR\htroot"
	File "HTROOT\*.java"
	SetOutPath "$INSTDIR\htroot\yacy"
	File "HTROOT\yacy\*.java"
	SetOutPath "$INSTDIR\htroot\htdocsdefault"
	File "htroot\htdocsdefault\*.java"
SectionEnd

Section "Shortcuts in the Start Menu"
	SectionIn 1 2 3
	SetOutPath "$INSTDIR"
	CreateDirectory "$SMPROGRAMS\YACY"
	CreateShortCut "$SMPROGRAMS\YACY\start YACY.pif" "$INSTDIR\startYACY.bat"
	CreateShortCut "$SMPROGRAMS\YACY\start YACY(no console).pif" "$INSTDIR\startYACY_noconsole.bat"
	CreateShortCut "$SMPROGRAMS\YACY\stop YACY.pif" "$INSTDIR\stopYACY.bat"
	CreateShortCut "$SMPROGRAMS\YACY\Readme.lnk" "$INSTDIR\readme.txt"
	CreateShortCut "$SMPROGRAMS\YACY\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
	SetOutPath "$SMPROGRAMS\YACY"
	File "addon\YACY-Search.url"
	SetOutPath "$INSTDIR"
SectionEnd

#Section "YACY on the Desktop"
#	SectionIn 1 2 3
#	SetOutPath "$INSTDIR"
#	CreateShortCut "$DESKTOP\start YACY.lnk" ""
#SectionEnd

Section "YACY-Console on the Desktop"
	SectionIn 1 2 3
	SetOutPath "$INSTDIR"
	CreateShortCut "$DESKTOP\YACY-Console.pif" "$INSTDIR\startYACY.bat"
SectionEnd

Section "Searchpage in the Quicklaunch"
	SectionIn 1 2 3
	SetOutPath $QUICKLAUNCH
	File "addon\YACY-Search.url"
	SetOutPath $INSTDIR
SectionEnd

Section "Searchpage on the Desktop"
	SetOutPath $DESKTOP
	File "addon\YACY-Search.url"
	SetOutPath $INSTDIR
SectionEnd

Section "Proxy-Console in Startup"
	SetOutPath "$INSTDIR"
	CreateShortCut "$SMSTARTUP\YACY-Console.pif" "$INSTDIR\startYACY.bat"
SectionEnd

Section "Uninstall"
	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YACY"

	RMDir /r "$INSTDIR\classes"
	RMDir /r "$INSTDIR\lib"
	RMDir /r "$INSTDIR\doc"
	RMDir /r "$INSTDIR\htroot"
	RMDir /r "$INSTDIR\locales"
	RMDir /r "$INSTDIR\source"
	RMDir /r "$INSTDIR\addon"
	Delete "$INSTDIR\*.*"

	MessageBox MB_YESNO|MB_ICONQUESTION "Do you want to keep the Data?" IDYES keepdata
	
	#delete all
	RMDir /r "$INSTDIR"
	
	#or jump to this
	keepdata:
	RMDir /r "$SMPROGRAMS\YACY"
	Delete "$QUICKLAUNCH\YACY-Search.url"
	Delete "$DESKTOP\YACY-Search.url"
	Delete "$DESKTOP\YACY-Console.pif"
	Delete "$SMSTARTUP\YACY-Console.pif"
SectionEnd