X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=netinstall%2Finstall.cc;fp=netinstall%2Finstall.cc;h=c9bd2d63814769e2414c4543a7fa41db5098ee98;hp=5d640550971066f058efa39bb1b58eb8d7da0569;hb=a5812bf2ff9a9cf40f4ff78dcb83f5b4c295bd18;hpb=ccce6217f84987dff10ed3d2b60b9f0f65d8f25a diff --git a/netinstall/install.cc b/netinstall/install.cc index 5d64055..c9bd2d6 100644 --- a/netinstall/install.cc +++ b/netinstall/install.cc @@ -47,7 +47,7 @@ #include "reginfo.h" #include "log.h" #include "hash.h" - +#include "desktop.h" #include "port.h" static HWND ins_dialog = 0; @@ -231,6 +231,10 @@ uninstall_one (char *name, int action, int type) { SetWindowText (ins_pkgname, name); SetWindowText (ins_action, "Uninstalling..."); + // remove shortcuts and registry entries + if (type != TY_GENERIC) + remove_xemacs_setup(); + if (action == ACTION_UPGRADE) log (0, "Uninstalling old %s", name); else @@ -278,6 +282,7 @@ install_one (char *name, char *file, int file_size, int action, int type) for (cp=local; *cp; cp++) if (*cp == '/' || *cp == '\\' || *cp == ':') base = cp+1; + SetWindowText (ins_pkgname, base); if (!exists (local) && exists (base)) @@ -311,14 +316,27 @@ install_one (char *name, char *file, int file_size, int action, int type) tar_open (local); while ((fn = tar_next_file ())) { - char *dest_file; + char *dest_file, *disp_file; + int len; if (lst) fprintf (lst, "%s\n", fn); dest_file = map_filename (fn, type); + + // The installer uses a variable width font. Assume roughly 32 chars + // will fit and munge the file accordingly. +#define MAX_DISP_SIZE 50 + disp_file = strdup(dest_file); + if ((len = strlen(dest_file)) > MAX_DISP_SIZE) { + disp_file += (len - MAX_DISP_SIZE); + disp_file[0] = '.'; + disp_file[1] = '.'; + disp_file[2] = '.'; + } +#undef MAX_DISP_SIZE + SetWindowText (ins_filename, disp_file); - SetWindowText (ins_filename, dest_file); log (LOG_BABBLE, "Installing file %s", dest_file); if (tar_read_file (dest_file) != 0) {