Rev 7842 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7842 | Rev 8418 | ||
---|---|---|---|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2017. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2017. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; netsurf-installer - Set up Netsurf Browser on KolibriOS ;; |
6 | ;; netsurf-installer - Set up Netsurf Browser on KolibriOS ;; |
7 | ;; Author: ashmew2. ;; |
7 | ;; Author: ashmew2. ;; |
8 | ;; ;; |
8 | ;; ;; |
9 | ;; Inspired from downloader.asm by hidnplayr@kolibrios.org ;; |
9 | ;; Inspired from downloader.asm by hidnplayr@kolibrios.org ;; |
10 | ;; GENERAL PUBLIC LICENSE ;; |
10 | ;; GENERAL PUBLIC LICENSE ;; |
11 | ;; Version 2, June 1991 ;; |
11 | ;; Version 2, June 1991 ;; |
12 | ;; ;; |
12 | ;; ;; |
13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
14 | 14 | ||
15 | URLMAXLEN = 65535 |
15 | URLMAXLEN = 65535 |
16 | FILENAMEMAXLEN = 1024 |
16 | FILENAMEMAXLEN = 1024 |
17 | __DEBUG_LEVEL__ = 2 |
17 | __DEBUG_LEVEL__ = 2 |
18 | __DEBUG__ = 1 |
18 | __DEBUG__ = 1 |
19 | 19 | ||
20 | format binary as "" |
20 | format binary as "" |
21 | use32 |
21 | use32 |
22 | org 0x0 |
22 | org 0x0 |
23 | db 'MENUET01' ; header |
23 | db 'MENUET01' ; header |
24 | dd 0x01 ; header version |
24 | dd 0x01 ; header version |
25 | dd START ; entry point |
25 | dd START ; entry point |
26 | dd I_END ; image size |
26 | dd I_END ; image size |
27 | dd I_END+0x1000 ; required memory |
27 | dd I_END+0x1000 ; required memory |
28 | dd I_END+0x1000 ; esp |
28 | dd I_END+0x1000 ; esp |
29 | dd 0x0 ; I_Path |
29 | dd 0x0 ; I_Path |
30 | dd 0x0 ; I_Path |
30 | dd 0x0 ; I_Path |
31 | 31 | ||
32 | include '../../macros.inc' |
32 | include '../../macros.inc' |
33 | include '../../proc32.inc' |
33 | include '../../proc32.inc' |
34 | include '../../dll.inc' |
34 | include '../../dll.inc' |
35 | include '../../debug-fdo.inc' |
35 | include '../../debug-fdo.inc' |
36 | include '../../develop/libraries/http/http.inc' |
36 | include '../../develop/libraries/http/http.inc' |
37 | include '../../string.inc' |
37 | include '../../string.inc' |
38 | 38 | ||
39 | include '../../system/notify3/notify.inc' |
39 | include '../../system/notify3/notify.inc' |
40 | 40 | ||
41 | include 'notify.asm' |
41 | include 'notify.asm' |
42 | 42 | ||
43 | virtual at 0 |
43 | virtual at 0 |
44 | http_msg http_msg |
44 | http_msg http_msg |
45 | end virtual |
45 | end virtual |
46 | 46 | ||
47 | ;; Parameters |
47 | ;; Parameters |
48 | ;; HTTP URL to download |
48 | ;; HTTP URL to download |
49 | ;; Target filename |
49 | ;; Target filename |
50 | proc get_file_over_http targeturl, targetfilename |
50 | proc get_file_over_http targeturl, targetfilename |
51 | pusha |
51 | pusha |
52 | xor eax, eax |
52 | xor eax, eax |
53 | mov [write_to_file.current_offset], eax |
53 | mov [write_to_file.current_offset], eax |
54 | mov [write_to_file.bufsize], eax |
54 | mov [write_to_file.bufsize], eax |
55 | mov [write_to_file.bufptr], eax |
55 | mov [write_to_file.bufptr], eax |
56 | 56 | ||
57 | DEBUGF 1, "---- HTTP : Getting %s\n", [targeturl] |
57 | DEBUGF 1, "---- HTTP : Getting %s\n", [targeturl] |
58 | invoke HTTP_get, [targeturl], 0, FLAG_KEEPALIVE or FLAG_BLOCK, 0 |
58 | invoke HTTP_get, [targeturl], 0, FLAG_KEEPALIVE or FLAG_BLOCK, 0 |
59 | cmp eax, 0 |
59 | cmp eax, 0 |
60 | je .http_error |
60 | je .http_error |
61 | mov [httpstruct], eax |
61 | mov [httpstruct], eax |
62 | 62 | ||
63 | ;; No HTTP errors, create a new file for the download. |
63 | ;; No HTTP errors, create a new file for the download. |
64 | DEBUGF 1, "---- Creating new file : %s\n", [targetfilename] |
64 | DEBUGF 1, "---- Creating new file : %s\n", [targetfilename] |
65 | mcall 70, create_new_file |
65 | mcall 70, create_new_file |
66 | cmp eax, 0 |
66 | cmp eax, 0 |
67 | jne .file_error |
67 | jne .file_error |
68 | 68 | ||
69 | .http_receive_loop: |
69 | .http_receive_loop: |
70 | DEBUGF 1, "---- Receiving over http.\n" |
70 | DEBUGF 1, "---- Receiving over http.\n" |
71 | invoke HTTP_receive, [httpstruct] |
71 | invoke HTTP_receive, [httpstruct] |
72 | 72 | ||
73 | cmp eax, 0 |
73 | cmp eax, 0 |
74 | je .http_transfer_done |
74 | je .http_transfer_done |
75 | 75 | ||
76 | 76 | ||
77 | mov ebp, [httpstruct] |
77 | mov ebp, [httpstruct] |
78 | DEBUGF 1, "---- http flags = 0x%x.\n", [ebp + http_msg.flags] |
78 | DEBUGF 1, "---- http flags = 0x%x.\n", [ebp + http_msg.flags] |
79 | test [ebp + http_msg.flags], 0xffff0000 |
79 | test [ebp + http_msg.flags], 0xffff0000 |
80 | jnz .http_error |
80 | jnz .http_error |
81 | 81 | ||
82 | mov ebp, [ebp + http_msg.content_received] |
82 | mov ebp, [ebp + http_msg.content_received] |
83 | cmp ebp, [write_to_file.current_offset] |
83 | cmp ebp, [write_to_file.current_offset] |
84 | jle .http_receive_loop |
84 | jle .http_receive_loop |
85 | ;; Only proceed if we have more data in HTTP buffer than we have written to file. |
85 | ;; Only proceed if we have more data in HTTP buffer than we have written to file. |
86 | 86 | ||
87 | ;; Process data we got (write it to the file) |
87 | ;; Process data we got (write it to the file) |
88 | mov ebp, [httpstruct] |
88 | mov ebp, [httpstruct] |
89 | mov ecx, [ebp + http_msg.content_length] |
89 | mov ecx, [ebp + http_msg.content_length] |
90 | mov edx, [ebp + http_msg.content_received] |
90 | mov edx, [ebp + http_msg.content_received] |
91 | 91 | ||
92 | DEBUGF 1, "---- Current file write offset : %u (http got : %u / %u)\n", [write_to_file.current_offset], edx, ecx |
92 | DEBUGF 1, "---- Current file write offset : %u (http got : %u / %u)\n", [write_to_file.current_offset], edx, ecx |
93 | sub edx, [write_to_file.current_offset] |
93 | sub edx, [write_to_file.current_offset] |
94 | mov [write_to_file.bufsize], edx |
94 | mov [write_to_file.bufsize], edx |
95 | 95 | ||
96 | mov ecx, [ebp + http_msg.content_ptr] |
96 | mov ecx, [ebp + http_msg.content_ptr] |
97 | add ecx, [write_to_file.current_offset] |
97 | add ecx, [write_to_file.current_offset] |
98 | mov [write_to_file.bufptr], ecx |
98 | mov [write_to_file.bufptr], ecx |
99 | 99 | ||
100 | DEBUGF 1, "---- ecx + offset = 0x%x\n", ecx |
100 | DEBUGF 1, "---- ecx + offset = 0x%x\n", ecx |
101 | DEBUGF 1, "---- Writing to file %u bytes at 0x%x to %s\n", [write_to_file.bufsize], [write_to_file.bufptr], current_filename |
101 | DEBUGF 1, "---- Writing to file %u bytes at 0x%x to %s\n", [write_to_file.bufsize], [write_to_file.bufptr], current_filename |
102 | mcall 70, write_to_file |
102 | mcall 70, write_to_file |
103 | cmp eax, 0 |
103 | cmp eax, 0 |
104 | jne .file_error |
104 | jne .file_error |
105 | 105 | ||
106 | DEBUGF 1, "---- Wrote to file %u bytes.\n", ebx |
106 | DEBUGF 1, "---- Wrote to file %u bytes.\n", ebx |
107 | add [write_to_file.current_offset], ebx |
107 | add [write_to_file.current_offset], ebx |
108 | DEBUGF 1, "---- File offset updated to : %u\n", [write_to_file.current_offset] |
108 | DEBUGF 1, "---- File offset updated to : %u\n", [write_to_file.current_offset] |
109 | 109 | ||
110 | jmp .http_receive_loop |
110 | jmp .http_receive_loop |
111 | 111 | ||
112 | .file_error: |
112 | .file_error: |
113 | DEBUGF 1, "file_erroR with eax = %u!", eax |
113 | DEBUGF 1, "file_erroR with eax = %u!", eax |
114 | call EXIT |
114 | call EXIT |
115 | 115 | ||
116 | .http_error: |
116 | .http_error: |
117 | DEBUGF 1, "http_erroR!" |
117 | DEBUGF 1, "http_erroR!" |
118 | call EXIT |
118 | call EXIT |
119 | 119 | ||
120 | .http_transfer_done: |
120 | .http_transfer_done: |
121 | ;; Write any remaining bytes from the http buffer into the file |
121 | ;; Write any remaining bytes from the http buffer into the file |
122 | DEBUGF 1, "---- http flags = 0x%x.\n", [httpstruct + http_msg.flags] |
122 | DEBUGF 1, "---- http flags = 0x%x.\n", [httpstruct + http_msg.flags] |
123 | DEBUGF 1, "Got %u bytes in total\n", [httpstruct + http_msg.content_length] |
123 | DEBUGF 1, "Got %u bytes in total\n", [httpstruct + http_msg.content_length] |
124 | 124 | ||
125 | mov ebp, [httpstruct] |
125 | mov ebp, [httpstruct] |
126 | mov edx, [ebp + http_msg.content_length] |
126 | mov edx, [ebp + http_msg.content_length] |
127 | 127 | ||
128 | sub edx, [write_to_file.current_offset] |
128 | sub edx, [write_to_file.current_offset] |
129 | mov [write_to_file.bufsize], edx |
129 | mov [write_to_file.bufsize], edx |
130 | 130 | ||
131 | mov ecx, [ebp + http_msg.content_ptr] |
131 | mov ecx, [ebp + http_msg.content_ptr] |
132 | add ecx, [write_to_file.current_offset] |
132 | add ecx, [write_to_file.current_offset] |
133 | mov [write_to_file.bufptr], ecx |
133 | mov [write_to_file.bufptr], ecx |
134 | 134 | ||
135 | DEBUGF 1, "---- Final ecx + offset = 0x%x\n", ecx |
135 | DEBUGF 1, "---- Final ecx + offset = 0x%x\n", ecx |
136 | DEBUGF 1, "-- Writing to file %u bytes at 0x%x to %s\n", [write_to_file.bufsize], [write_to_file.bufptr], current_filename |
136 | DEBUGF 1, "-- Writing to file %u bytes at 0x%x to %s\n", [write_to_file.bufsize], [write_to_file.bufptr], current_filename |
137 | 137 | ||
138 | mcall 70, write_to_file |
138 | mcall 70, write_to_file |
139 | cmp eax, 0 |
139 | cmp eax, 0 |
140 | jne .file_error |
140 | jne .file_error |
141 | 141 | ||
142 | DEBUGF 1, "-- Wrote to file %u bytes.\n", ebx |
142 | DEBUGF 1, "-- Wrote to file %u bytes.\n", ebx |
143 | add [write_to_file.current_offset], ebx |
143 | add [write_to_file.current_offset], ebx |
144 | DEBUGF 1, "-- File offset updated to : %u\n", [write_to_file.current_offset] |
144 | DEBUGF 1, "-- File offset updated to : %u\n", [write_to_file.current_offset] |
145 | mov ebp, [httpstruct] |
145 | mov ebp, [httpstruct] |
146 | mov edx, [ebp + http_msg.content_length] |
146 | mov edx, [ebp + http_msg.content_length] |
147 | cmp [write_to_file.current_offset], edx |
147 | cmp [write_to_file.current_offset], edx |
148 | jne .http_transfer_done |
148 | jne .http_transfer_done |
149 | 149 | ||
150 | invoke HTTP_free, [httpstruct] |
150 | invoke HTTP_free, [httpstruct] |
151 | 151 | ||
152 | popa |
152 | popa |
153 | ret |
153 | ret |
154 | endp |
154 | endp |
155 | 155 | ||
156 | proc make_new_folder newfolder |
156 | proc make_new_folder newfolder |
157 | pusha |
157 | pusha |
158 | 158 | ||
159 | mov eax, [newfolder] |
159 | mov eax, [newfolder] |
160 | mov [create_new_folder.foldername], eax |
160 | mov [create_new_folder.foldername], eax |
161 | mcall 70, create_new_folder |
161 | mcall 70, create_new_folder |
162 | test eax, eax |
162 | test eax, eax |
163 | jz .success |
163 | jz .success |
164 | 164 | ||
165 | DEBUGF 1, "Failed to create folder: %s\n", [newfolder] |
165 | DEBUGF 1, "Failed to create folder: %s\n", [newfolder] |
166 | call EXIT |
166 | call EXIT |
167 | 167 | ||
168 | .success: |
168 | .success: |
169 | popa |
169 | popa |
170 | ret |
170 | ret |
171 | endp |
171 | endp |
- | 172 | ||
- | 173 | proc run_if_exists file_path |
|
- | 174 | m2m [fileinfo.path], [file_path] |
|
- | 175 | mcall 70, fileinfo |
|
- | 176 | test eax, eax |
|
- | 177 | jnz @f |
|
- | 178 | m2m [fileopen.path], [file_path] |
|
- | 179 | mcall 70, fileopen |
|
- | 180 | mcall -1 |
|
- | 181 | @@: |
|
- | 182 | ret |
|
- | 183 | endp |
|
- | 184 | ||
172 | 185 | ||
- | 186 | START: |
|
- | 187 | stdcall run_if_exists, TMP_netsurf |
|
- | 188 | stdcall run_if_exists, ISO_netsurf |
|
173 | START: |
189 | |
174 | mcall 68, 11 ; init heap |
190 | mcall 68, 11 ; init heap |
175 | call NOTIFY_RUN |
191 | call NOTIFY_RUN |
176 | 192 | ||
177 | ; load libraries |
193 | ; load libraries |
178 | stdcall dll.Load, @IMPORT |
194 | stdcall dll.Load, @IMPORT |
179 | test eax, eax |
195 | test eax, eax |
180 | jnz .all_files_done_error |
196 | jnz .all_files_done_error |
181 | 197 | ||
182 | DEBUGF 2, "-------------------------\n" |
198 | DEBUGF 2, "-------------------------\n" |
183 | DEBUGF 2, "NETSURF INSTALLER.\n" |
199 | DEBUGF 2, "NETSURF INSTALLER.\n" |
184 | 200 | ||
185 | stdcall make_new_folder, dirname_res |
201 | stdcall make_new_folder, dirname_res |
186 | stdcall make_new_folder, dirname_res_pointers |
202 | ; stdcall make_new_folder, dirname_res_pointers |
187 | stdcall make_new_folder, dirname_res_throbber |
203 | ; stdcall make_new_folder, dirname_res_throbber |
188 | stdcall make_new_folder, dirname_res_icons |
204 | ; stdcall make_new_folder, dirname_res_icons |
189 | 205 | ||
190 | 206 | ||
191 | .get_next_file: |
207 | .get_next_file: |
192 | mov edi, current_url |
208 | mov edi, current_url |
193 | mov esi, url |
209 | mov esi, url |
194 | 210 | ||
195 | @@: |
211 | @@: |
196 | movsb |
212 | movsb |
197 | cmp byte[esi], 0 |
213 | cmp byte[esi], 0 |
198 | jne @b |
214 | jne @b |
199 | ;; Loaded the base URL into current URL |
215 | ;; Loaded the base URL into current URL |
200 | 216 | ||
201 | ;; Move onto the subsequent file. |
217 | ;; Move onto the subsequent file. |
202 | mov esi, [filelistoffset] |
218 | mov esi, [filelistoffset] |
203 | cmp byte[esi], 0 |
219 | cmp byte[esi], 0 |
204 | je .all_files_done |
220 | je .all_files_done |
205 | 221 | ||
206 | @@: |
222 | @@: |
207 | movsb |
223 | movsb |
208 | cmp byte[esi], 0 |
224 | cmp byte[esi], 0 |
209 | jne @b |
225 | jne @b |
210 | movsb |
226 | movsb |
211 | 227 | ||
212 | ;; DEBUGF 1, "-- Current URL with filename is : %s\n", current_url |
228 | ;; DEBUGF 1, "-- Current URL with filename is : %s\n", current_url |
213 | 229 | ||
214 | ; Create name of file we will download to |
230 | ; Create name of file we will download to |
215 | mov esi, download_file_path |
231 | mov esi, download_file_path |
216 | mov edi, current_filename |
232 | mov edi, current_filename |
217 | 233 | ||
218 | @@: |
234 | @@: |
219 | movsb |
235 | movsb |
220 | cmp byte[esi], 0 |
236 | cmp byte[esi], 0 |
221 | jne @b |
237 | jne @b |
222 | 238 | ||
223 | mov esi, [filelistoffset] |
239 | mov esi, [filelistoffset] |
224 | @@: |
240 | @@: |
225 | movsb |
241 | movsb |
226 | cmp byte[esi], 0 |
242 | cmp byte[esi], 0 |
227 | jne @b |
243 | jne @b |
228 | movsb |
244 | movsb |
229 | mov [filelistoffset], esi |
245 | mov [filelistoffset], esi |
230 | 246 | ||
231 | ;; current_filename is now set to the name of the file |
247 | ;; current_filename is now set to the name of the file |
232 | ;; current_url is now set to the name of the file we will get after download |
248 | ;; current_url is now set to the name of the file we will get after download |
233 | DEBUGF 2, "Fetching : %s", current_filename |
249 | DEBUGF 2, "Fetching : %s", current_filename |
234 | pusha |
250 | pusha |
235 | call NOTIFY_CHANGE |
251 | call NOTIFY_CHANGE |
236 | popa |
252 | popa |
237 | stdcall get_file_over_http, current_url, current_filename |
253 | stdcall get_file_over_http, current_url, current_filename |
238 | DEBUGF 2, "...DONE!\n" |
254 | DEBUGF 2, "...DONE!\n" |
239 | jmp .get_next_file |
255 | jmp .get_next_file |
240 | 256 | ||
241 | .all_files_done: |
257 | .all_files_done: |
242 | DEBUGF 2, "-------------------------\n" |
258 | DEBUGF 2, "-------------------------\n" |
243 | DEBUGF 2, "NETSURF INSTALLED. Enjoy!\n" |
259 | DEBUGF 2, "NETSURF INSTALLED. Enjoy!\n" |
244 | DEBUGF 2, "-------------------------\n" |
260 | DEBUGF 2, "-------------------------\n" |
245 | call EXIT |
261 | call EXIT |
246 | ;; Inform user that all files are done |
262 | ;; Inform user that all files are done |
247 | 263 | ||
248 | .all_files_done_error: |
264 | .all_files_done_error: |
249 | DEBUGF 1, "FATAL ERROR: FAILED.\n", eax |
265 | DEBUGF 1, "FATAL ERROR: FAILED.\n", eax |
250 | call EXIT |
266 | call EXIT |
251 | 267 | ||
252 | ;--------------------------------------------------------------------- |
268 | ;--------------------------------------------------------------------- |
253 | ; Data area |
269 | ; Data area |
254 | ;----------------------------------------------------------------------------- |
270 | ;----------------------------------------------------------------------------- |
255 | align 4 |
271 | align 4 |
256 | @IMPORT: |
272 | @IMPORT: |
257 | 273 | ||
258 | library lib_http, 'http.obj' |
274 | library lib_http, 'http.obj' |
259 | import lib_http, \ |
275 | import lib_http, \ |
260 | HTTP_get, 'get', \ |
276 | HTTP_get, 'get', \ |
261 | HTTP_receive, 'receive', \ |
277 | HTTP_receive, 'receive', \ |
262 | HTTP_free, 'free' |
278 | HTTP_free, 'free' |
263 | 279 | ||
264 | include_debug_strings |
280 | include_debug_strings |
265 | 281 | ||
266 | download_file_path db '/tmp0/1/', 0 |
282 | download_file_path db '/tmp0/1/', 0 |
267 | dirname_res db '/tmp0/1/res', 0 |
283 | dirname_res db '/tmp0/1/res', 0 |
268 | dirname_res_pointers db '/tmp0/1/res/pointers', 0 |
284 | dirname_res_pointers db '/tmp0/1/res/pointers', 0 |
269 | dirname_res_throbber db '/tmp0/1/res/throbber', 0 |
285 | dirname_res_throbber db '/tmp0/1/res/throbber', 0 |
270 | dirname_res_icons db '/tmp0/1/res/icons', 0 |
286 | dirname_res_icons db '/tmp0/1/res/icons', 0 |
271 | 287 | ||
272 | url db 'www.kolibri-n.org/files/netsurf/',0 |
288 | url db 'www.kolibri-n.org/files/netsurf/',0 |
273 | 289 | ||
274 | ; I don't know why NOTIFY_CHANGE doesn't work for the first file |
290 | ; I don't know why NOTIFY_CHANGE doesn't work for the first file |
275 | ; so I use this small shit to fix it at NOTIFY_RUN phase |
291 | ; so I use this small shit to fix it at NOTIFY_RUN phase |
276 | filelist_first db '/tmp0/1/netsurf', 0 |
292 | filelist_first db '/tmp0/1/netsurf', 0 |
- | 293 | ||
- | 294 | MAX_FILES = 6 |
|
277 | 295 | ||
278 | filelist db 'netsurf', 0 |
296 | filelist db 'netsurf', 0 |
279 | ;db 'netsurf-kolibrios.map', 0 ;what this??? |
297 | ;db 'netsurf-kolibrios.map', 0 ;what this??? |
280 | db 'res/adblock.css', 0 |
298 | db 'res/adblock.css', 0 |
281 | db 'res/quirks.css', 0 |
299 | db 'res/quirks.css', 0 |
282 | db 'res/Messages', 0 |
300 | db 'res/Messages', 0 |
283 | db 'res/licence.html', 0 |
- | |
284 | db 'res/default.css', 0 |
301 | db 'res/default.css', 0 |
285 | db 'res/netsurf.png', 0 |
- | |
286 | db 'res/sans.ttf', 0 |
302 | db 'res/sans.ttf', 0 |
287 | db 'res/welcome.html', 0 |
- | |
288 | db 'res/internal.css', 0 |
303 | db 'res/internal.css', 0 |
- | 304 | ; db 'res/welcome.html', 0 |
|
- | 305 | ; db 'res/licence.html', 0 |
|
289 | db 'res/maps.html', 0 |
306 | ; db 'res/maps.html', 0 |
- | 307 | ; db 'res/credits.html', 0 |
|
290 | db 'res/favicon.png', 0 |
308 | ; db 'res/favicon.png', 0 |
291 | db 'res/credits.html', 0 |
309 | ; db 'res/netsurf.png', 0 |
292 | db 'res/throbber/throbber8.png', 0 |
310 | ; db 'res/throbber/throbber8.png', 0 |
293 | db 'res/throbber/throbber3.png', 0 |
311 | ; db 'res/throbber/throbber3.png', 0 |
294 | db 'res/throbber/throbber4.png', 0 |
312 | ; db 'res/throbber/throbber4.png', 0 |
295 | db 'res/throbber/throbber0.png', 0 |
313 | ; db 'res/throbber/throbber0.png', 0 |
296 | db 'res/throbber/throbber6.png', 0 |
314 | ; db 'res/throbber/throbber6.png', 0 |
297 | db 'res/throbber/throbber2.png', 0 |
315 | ; db 'res/throbber/throbber2.png', 0 |
298 | db 'res/throbber/throbber1.png', 0 |
316 | ; db 'res/throbber/throbber1.png', 0 |
299 | db 'res/throbber/throbber7.png', 0 |
317 | ; db 'res/throbber/throbber7.png', 0 |
300 | db 'res/throbber/throbber5.png', 0 |
318 | ; db 'res/throbber/throbber5.png', 0 |
301 | ; db 'res/pointers/point.png', 0 |
319 | ; db 'res/pointers/point.png', 0 |
302 | ; db 'res/pointers/no_drop.png', 0 |
320 | ; db 'res/pointers/no_drop.png', 0 |
303 | ; db 'res/pointers/wait.png', 0 |
321 | ; db 'res/pointers/wait.png', 0 |
304 | ; db 'res/pointers/up-down.png', 0 |
322 | ; db 'res/pointers/up-down.png', 0 |
305 | ; db 'res/pointers/help.png', 0 |
323 | ; db 'res/pointers/help.png', 0 |
306 | ; db 'res/pointers/ru-ld.png', 0 |
324 | ; db 'res/pointers/ru-ld.png', 0 |
307 | ; db 'res/pointers/menu.png', 0 |
325 | ; db 'res/pointers/menu.png', 0 |
308 | ; db 'res/pointers/not_allowed.png', 0 |
326 | ; db 'res/pointers/not_allowed.png', 0 |
309 | ; db 'res/pointers/cross.png', 0 |
327 | ; db 'res/pointers/cross.png', 0 |
310 | ; db 'res/pointers/default.png', 0 |
328 | ; db 'res/pointers/default.png', 0 |
311 | ; db 'res/pointers/caret.png', 0 |
329 | ; db 'res/pointers/caret.png', 0 |
312 | ; db 'res/pointers/left-right.png', 0 |
330 | ; db 'res/pointers/left-right.png', 0 |
313 | ; db 'res/pointers/lu-rd.png', 0 |
331 | ; db 'res/pointers/lu-rd.png', 0 |
314 | ; db 'res/pointers/progress.png', 0 |
332 | ; db 'res/pointers/progress.png', 0 |
315 | ; db 'res/pointers/move.png', 0 |
333 | ; db 'res/pointers/move.png', 0 |
316 | db 'res/icons/back.png', 0 |
334 | ; db 'res/icons/back.png', 0 |
317 | db 'res/icons/back_g.png', 0 |
335 | ; db 'res/icons/back_g.png', 0 |
318 | db 'res/icons/scrollr.png', 0 |
336 | ; db 'res/icons/scrollr.png', 0 |
319 | db 'res/icons/osk.png', 0 |
337 | ; db 'res/icons/osk.png', 0 |
320 | db 'res/icons/forward_g.png', 0 |
338 | ; db 'res/icons/forward_g.png', 0 |
321 | db 'res/icons/scrolll.png', 0 |
339 | ; db 'res/icons/scrolll.png', 0 |
322 | db 'res/icons/history.png', 0 |
340 | ; db 'res/icons/history.png', 0 |
323 | db 'res/icons/forward.png', 0 |
341 | ; db 'res/icons/forward.png', 0 |
324 | db 'res/icons/home_g.png', 0 |
342 | ; db 'res/icons/home_g.png', 0 |
325 | db 'res/icons/history_g.png', 0 |
343 | ; db 'res/icons/history_g.png', 0 |
326 | db 'res/icons/reload_g.png', 0 |
344 | ; db 'res/icons/reload_g.png', 0 |
327 | db 'res/icons/scrollu.png', 0 |
345 | ; db 'res/icons/scrollu.png', 0 |
328 | db 'res/icons/stop.png', 0 |
346 | ; db 'res/icons/stop.png', 0 |
329 | db 'res/icons/scrolld.png', 0 |
347 | ; db 'res/icons/scrolld.png', 0 |
330 | db 'res/icons/stop_g.png', 0 |
348 | ; db 'res/icons/stop_g.png', 0 |
331 | db 'res/icons/home.png', 0 |
349 | ; db 'res/icons/home.png', 0 |
332 | db 'res/icons/reload.png', 0 |
350 | ; db 'res/icons/reload.png', 0 |
333 | db 0 |
351 | db 0 |
334 | 352 | ||
335 | filelistoffset dd filelist |
353 | filelistoffset dd filelist |
336 | httpstruct dd 0 |
354 | httpstruct dd 0 |
337 | 355 | ||
338 | create_new_file dd 2, 0, 0, 0, 0 |
356 | create_new_file dd 2, 0, 0, 0, 0 |
339 | db 0 |
357 | db 0 |
340 | dd current_filename |
358 | dd current_filename |
341 | 359 | ||
342 | create_new_folder dd 9, 0, 0, 0, 0 |
360 | create_new_folder dd 9, 0, 0, 0, 0 |
343 | db 0 |
361 | db 0 |
344 | .foldername dd 0 |
362 | .foldername dd 0 |
345 | 363 | ||
346 | write_to_file dd 3 |
364 | write_to_file dd 3 |
347 | .current_offset dd 0, 0 |
365 | .current_offset dd 0, 0 |
348 | .bufsize dd 0 |
366 | .bufsize dd 0 |
349 | .bufptr dd 0 |
367 | .bufptr dd 0 |
350 | db 0 |
368 | db 0 |
351 | dd current_filename |
369 | dd current_filename |
352 | 370 | ||
353 | socketdata rb 4096 |
371 | socketdata rb 4096 |
354 | current_url rb URLMAXLEN |
372 | current_url rb URLMAXLEN |
355 | current_filename rb FILENAMEMAXLEN |
373 | current_filename rb FILENAMEMAXLEN |
- | 374 | ||
- | 375 | ISO_netsurf db "/kolibrios/netsurf/netsurf", 0 |
|
- | 376 | TMP_netsurf db "/tmp0/1/netsurf", 0 |
|
- | 377 | ||
- | 378 | bdvk_buf rb 560 |
|
- | 379 | ||
- | 380 | fileinfo dd 5 |
|
- | 381 | dd 0,0,0 |
|
- | 382 | dd bdvk_buf |
|
- | 383 | db 0 |
|
- | 384 | .path dd ? ; path |
|
356 | 385 | ||
357 | ;===================================================================== |
386 | ;===================================================================== |
358 | ; NOTIFY DATA |
387 | ; NOTIFY DATA |
359 | timer dd 0 |
388 | timer dd 0 |
360 | params rb 256 |
389 | params rb 256 |
361 | ctrl: |
390 | ctrl: |
362 | .name rb 32 |
391 | .name rb 32 |
363 | .addr rd 1 |
392 | .addr rd 1 |
364 | rb 2048 |
393 | rb 2048 |
365 | 394 | ||
366 | sz_text: |
395 | sz_text: |
367 | db "Downloading Netsurf ",10, 0 |
396 | db "Downloading Netsurf ",10, 0 |
368 | sz_quote: |
397 | sz_quote: |
369 | db "'", 0 |
398 | db "'", 0 |
370 | sz_flags: |
399 | sz_flags: |
371 | db "Ddcpt", 0 |
400 | db "Ddcpt", 0 |
372 | 401 | ||
373 | sz_final_text: |
402 | sz_final_text: |
374 | db "Netsurf download complete.",10,"Enjoy!",0 |
403 | db "Netsurf download complete.",10,"Enjoy!",0 |
375 | 404 | ||
376 | fi_launch: |
405 | fi_launch: |
377 | dd 7, 0, params, 0, 0 |
406 | dd 7, 0, params, 0, 0 |
378 | db "/sys/@notify", 0 |
407 | db "/sys/@notify", 0 |
379 | 408 | ||
380 | fileopen dd 7 |
409 | fileopen dd 7 |
381 | dd 0 ; flags |
410 | dd 0,0,0,0 |
382 | dd 0 ; parameters |
- | |
383 | dd 0 ; reserved |
411 | db 0 |
384 | dd 0 ; reserved |
412 | .path dd ? ; path |
385 | db "/tmp0/1/netsurf", 0 ; path |
- | |
386 | ;===================================================================== |
413 | ;===================================================================== |
387 | 414 | ||
388 | I_END: |
415 | I_END: |