Rev 7058 | Rev 7785 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7058 | Rev 7106 | ||
---|---|---|---|
Line 32... | Line 32... | ||
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 '../../notify.inc' |
|
- | 38 | include '../../string.inc' |
|
- | 39 | ||
- | 40 | include 'notify.asm' |
|
Line 37... | Line 41... | ||
37 | 41 | ||
38 | virtual at 0 |
42 | virtual at 0 |
39 | http_msg http_msg |
43 | http_msg http_msg |
Line 104... | Line 108... | ||
104 | 108 | ||
Line 105... | Line 109... | ||
105 | jmp .http_receive_loop |
109 | jmp .http_receive_loop |
106 | 110 | ||
107 | .file_error: |
111 | .file_error: |
Line 108... | Line 112... | ||
108 | DEBUGF 1, "file_erroR with eax = %u!", eax |
112 | DEBUGF 1, "file_erroR with eax = %u!", eax |
109 | mcall -1 |
113 | call EXIT |
110 | 114 | ||
Line 111... | Line 115... | ||
111 | .http_error: |
115 | .http_error: |
112 | DEBUGF 1, "http_erroR!" |
116 | DEBUGF 1, "http_erroR!" |
113 | mcall -1 |
117 | call EXIT |
114 | 118 | ||
Line 156... | Line 160... | ||
156 | mcall 70, create_new_folder |
160 | mcall 70, create_new_folder |
157 | test eax, eax |
161 | test eax, eax |
158 | jz .success |
162 | jz .success |
Line 159... | Line 163... | ||
159 | 163 | ||
160 | DEBUGF 1, "Failed to create folder: %s\n", [newfolder] |
164 | DEBUGF 1, "Failed to create folder: %s\n", [newfolder] |
Line 161... | Line 165... | ||
161 | mcall -1 |
165 | call EXIT |
162 | 166 | ||
163 | .success: |
167 | .success: |
164 | popa |
168 | popa |
Line 165... | Line 169... | ||
165 | ret |
169 | ret |
166 | endp |
170 | endp |
- | 171 | ||
Line 167... | Line 172... | ||
167 | 172 | START: |
|
168 | START: |
173 | mcall 68, 11 ; init heap |
169 | mcall 68, 11 ; init heap |
174 | call NOTIFY_RUN |
170 | 175 | ||
Line 223... | Line 228... | ||
223 | mov [filelistoffset], esi |
228 | mov [filelistoffset], esi |
Line 224... | Line 229... | ||
224 | 229 | ||
225 | ;; current_filename is now set to the name of the file |
230 | ;; current_filename is now set to the name of the file |
226 | ;; current_url is now set to the name of the file we will get after download |
231 | ;; current_url is now set to the name of the file we will get after download |
- | 232 | DEBUGF 2, "Fetching : %s", current_filename |
|
- | 233 | pusha |
|
- | 234 | call NOTIFY_CHANGE |
|
227 | DEBUGF 2, "Fetching : %s", current_filename |
235 | popa |
228 | stdcall get_file_over_http, current_url, current_filename |
236 | stdcall get_file_over_http, current_url, current_filename |
229 | DEBUGF 2, "...DONE!\n" |
237 | DEBUGF 2, "...DONE!\n" |
Line 230... | Line 238... | ||
230 | jmp .get_next_file |
238 | jmp .get_next_file |
231 | 239 | ||
232 | .all_files_done: |
240 | .all_files_done: |
233 | DEBUGF 2, "-------------------------\n" |
241 | DEBUGF 2, "-------------------------\n" |
234 | DEBUGF 2, "NETSURF INSTALLED. Enjoy!\n" |
242 | DEBUGF 2, "NETSURF INSTALLED. Enjoy!\n" |
235 | DEBUGF 2, "-------------------------\n" |
243 | DEBUGF 2, "-------------------------\n" |
Line 236... | Line 244... | ||
236 | mcall -1 |
244 | call EXIT |
237 | ;; Inform user that all files are done |
245 | ;; Inform user that all files are done |
238 | 246 | ||
Line 239... | Line 247... | ||
239 | .all_files_done_error: |
247 | .all_files_done_error: |
240 | DEBUGF 1, "FATAL ERROR: FAILED.\n", eax |
248 | DEBUGF 1, "FATAL ERROR: FAILED.\n", eax |
241 | mcall -1 |
249 | call EXIT |
242 | 250 | ||
Line 260... | Line 268... | ||
260 | dirname_res_throbber db '/tmp0/1/res/throbber', 0 |
268 | dirname_res_throbber db '/tmp0/1/res/throbber', 0 |
261 | dirname_res_icons db '/tmp0/1/res/icons', 0 |
269 | dirname_res_icons db '/tmp0/1/res/icons', 0 |
Line 262... | Line 270... | ||
262 | 270 | ||
Line -... | Line 271... | ||
- | 271 | url db 'www.ashmew2.me/',0 |
|
- | 272 | ||
- | 273 | ; I don't know why NOTIFY_CHANGE doesn't work for the first file |
|
- | 274 | ; so I use this small shit to fix it at NOTIFY_RUN phase |
|
263 | url db 'www.ashmew2.me/',0 |
275 | filelist_first db '/tmp0/1/netsurf-kolibrios', 0 |
264 | 276 | ||
265 | filelist db 'netsurf-kolibrios', 0 |
277 | filelist db 'netsurf-kolibrios', 0 |
266 | db 'netsurf-kolibrios.map', 0 |
278 | db 'netsurf-kolibrios.map', 0 |
267 | db 'res/adblock.css', 0 |
279 | db 'res/adblock.css', 0 |
Line 338... | Line 350... | ||
338 | dd current_filename |
350 | dd current_filename |
Line 339... | Line 351... | ||
339 | 351 | ||
340 | socketdata rb 4096 |
352 | socketdata rb 4096 |
341 | current_url rb URLMAXLEN |
353 | current_url rb URLMAXLEN |
- | 354 | current_filename rb FILENAMEMAXLEN |
|
- | 355 | ||
- | 356 | ;===================================================================== |
|
- | 357 | ; NOTIFY DATA |
|
- | 358 | timer dd 0 |
|
- | 359 | params rb 256 |
|
- | 360 | ctrl: |
|
- | 361 | .name rb 32 |
|
- | 362 | .addr rd 1 |
|
- | 363 | rb 2048 |
|
- | 364 | ||
- | 365 | sz_text: |
|
- | 366 | db "Netsurf installer ", 0 |
|
- | 367 | sz_quote: |
|
- | 368 | db "'", 0 |
|
- | 369 | sz_sec_line_start: |
|
- | 370 | db 10, "Fetching:",10, 0 |
|
- | 371 | sz_flags: |
|
- | 372 | db "Ddcpt", 0 |
|
- | 373 | ||
- | 374 | sz_final_text: |
|
- | 375 | db "Netsurf installer",10,"Download complete.",10,"Enjoy!",0 |
|
- | 376 | ||
- | 377 | fi_launch: |
|
- | 378 | dd 7, 0, params, 0, 0 |
|
- | 379 | db "@notify", 0 |
|
- | 380 | ||
- | 381 | fileopen dd 7 |
|
- | 382 | dd 0 ; flags |
|
- | 383 | dd 0 ; parameters |
|
- | 384 | dd 0 ; reserved |
|
- | 385 | dd 0 ; reserved |
|
- | 386 | db "/tmp0/1/netsurf-kolibrios", 0 ; path |
|
- | 387 | ;===================================================================== |
|
342 | current_filename rb FILENAMEMAXLEN |
388 |