Mercurial > hg > xemacs-beta
comparison netinstall/install.cc @ 819:6504113e7c2d
[xemacs-hg @ 2002-04-25 18:03:23 by andyp]
sync up windows branch from 21.4
author | andyp |
---|---|
date | Thu, 25 Apr 2002 18:04:24 +0000 |
parents | a307f9a2021d |
children |
comparison
equal
deleted
inserted
replaced
818:accc481aef34 | 819:6504113e7c2d |
---|---|
280 | 280 |
281 base = local; | 281 base = local; |
282 for (cp=local; *cp; cp++) | 282 for (cp=local; *cp; cp++) |
283 if (*cp == '/' || *cp == '\\' || *cp == ':') | 283 if (*cp == '/' || *cp == '\\' || *cp == ':') |
284 base = cp+1; | 284 base = cp+1; |
285 | |
285 SetWindowText (ins_pkgname, base); | 286 SetWindowText (ins_pkgname, base); |
286 | 287 |
287 if (!exists (local) && exists (base)) | 288 if (!exists (local) && exists (base)) |
288 local = base; | 289 local = base; |
289 if (!exists (local)) | 290 if (!exists (local)) |
313 | 314 |
314 log (0, "Installing %s", local); | 315 log (0, "Installing %s", local); |
315 tar_open (local); | 316 tar_open (local); |
316 while ((fn = tar_next_file ())) | 317 while ((fn = tar_next_file ())) |
317 { | 318 { |
318 char *dest_file; | 319 char *dest_file, *disp_file; |
320 int len; | |
319 | 321 |
320 if (lst) | 322 if (lst) |
321 fprintf (lst, "%s\n", fn); | 323 fprintf (lst, "%s\n", fn); |
322 | 324 |
323 dest_file = map_filename (fn, type); | 325 dest_file = map_filename (fn, type); |
324 | 326 |
325 SetWindowText (ins_filename, dest_file); | 327 // The installer uses a variable width font. Assume roughly 32 chars |
328 // will fit and munge the file accordingly. | |
329 #define MAX_DISP_SIZE 50 | |
330 disp_file = strdup(dest_file); | |
331 if ((len = strlen(dest_file)) > MAX_DISP_SIZE) { | |
332 disp_file += (len - MAX_DISP_SIZE); | |
333 disp_file[0] = '.'; | |
334 disp_file[1] = '.'; | |
335 disp_file[2] = '.'; | |
336 } | |
337 #undef MAX_DISP_SIZE | |
338 SetWindowText (ins_filename, disp_file); | |
339 | |
326 log (LOG_BABBLE, "Installing file %s", dest_file); | 340 log (LOG_BABBLE, "Installing file %s", dest_file); |
327 if (tar_read_file (dest_file) != 0) | 341 if (tar_read_file (dest_file) != 0) |
328 { | 342 { |
329 log (0, "Unable to install file %s", dest_file); | 343 log (0, "Unable to install file %s", dest_file); |
330 errors ++; | 344 errors ++; |