Loading ...
Sorry, an error occurred while loading the content.

Re: Windows default installation location

Expand Messages
  • Walter Briscoe
    In message of Mon, 3 Mar 2003 21:31:33 in , Bram Moolenaar writes ... The following was prompted
    Message 1 of 9 , Mar 4, 2003
    • 0 Attachment
      In message <200303032031.h23KVXv07011@...> of Mon, 3 Mar 2003
      21:31:33 in , Bram Moolenaar <Bram@...> writes
      >
      >Steve Hall wrote:
      >
      >> I'm curious how much resistance there would be to revising the default
      >> Vim installation location on Windows. The default for 6.1 is C:\vim,
      >> but it has always irritated me when other programs try to install in
      >> root rather than C:\Program Files\[app]. I'd be interested to know if
      >> there are any concerns in addition to:
      >>
      >> 1. "But that's not how we've always done it"
      >> 2. "Windows is evil, try to avoid its structures"
      >> 3. "Oh, dear, what about spaces in the path?"
      >> 4. "Never! This will hose those who've installed here since vX.X."
      >>
      >> As I learn more about the Nullsoft installer, there's a number of
      >> other defaults my preference would be to revise, but I'll start with
      >> an easy one. ;)
      >
      >Using "c:\Program Files" literally is a bad idea. The name of the
      >directory should be obtained from the registry, it depends on the
      >language used. It could be "c:\Programme" for German.
      >
      >Using "c:\Vim" was just an easy way to avoid the complications.
      >
      The following was prompted by work in progress on dosinst.[ch] and
      uninstal.c. The literal 0x0026 was needed as I do not have
      CSIDL_PROGRAM_FILES defined.
      This was quick and dirty using VC++6.0 on Windows 2000.

      C:\wfb\vim\bld\vim61\src> cat pfget.c
      #include <stdio.h>
      #include <shlobj.h>

      int main(void) {
      char shell_folder_path[MAX_PATH];
      int csidl = 0x0026; /* CSIDL_PROGRAM_FILES */

      if (!SHGetSpecialFolderPath(0, shell_folder_path, csidl, 0))
      exit(0);

      printf("%s\n", shell_folder_path);
      return 0;
      }

      C:\wfb\vim\bld\vim61\src> pfget
      C:\Program Files

      C:\wfb\vim\bld\vim61\src>

      Doubtless, the data IS in the registry. I just can't find it!
      --
      Walter Briscoe
    • Bram Moolenaar
      ... I don t understand this remark. We can t remove stuff from install.exe, since it is required for installing the console version and the non-NSIS
      Message 2 of 9 , Mar 4, 2003
      • 0 Attachment
        Steve Hall wrote:

        > on 3/4/2003 7:19 AM Alejandro Lopez-Valencia said the following:
        > >
        > > Yet, I perceive there is a good reason to use install.exe for the
        > > creation of menu entries, desktop shortcuts and bat files.
        > > Portability and practicality. You may not want to use gVim but
        > > rather the console version, and that one is not wrapped in an NSIS
        > > installer! But, if you place all the files needed in a proper place
        > > and run install.exe, you can have bat files and all that without
        > > trouble.
        >
        > install.exe definitely makes sense for Windows terminal versions. But
        > for GUI Vim it would be nice to avoid all the popping consoles while
        > saving the 100k. Another benefit is that all the installation code
        > would be at one place, in one language.

        I don't understand this remark. We can't remove stuff from install.exe,
        since it is required for installing the console version and the non-NSIS
        distribution, thus adding code to the NSIS installer will actually
        duplicate installation code.

        --
        SOLDIER: What? Ridden on a horse?
        ARTHUR: Yes!
        SOLDIER: You're using coconuts!
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
      • digitect@mindspring.com
        ... I m proposing that (for only the Windows GUI installer) install.exe be removed and the installer (silently) manage these items. Its a a bit wordy. (Ok,
        Message 3 of 9 , Mar 4, 2003
        • 0 Attachment
          on 3/4/2003 2:14 PM Bram Moolenaar said the following:
          > Steve Hall wrote:
          > >
          > > install.exe definitely makes sense for Windows terminal versions.
          > > But for GUI Vim it would be nice to avoid all the popping consoles
          > > while saving the 100k. Another benefit is that all the
          > > installation code would be at one place, in one language.
          >
          > I don't understand this remark. We can't remove stuff from
          > install.exe, since it is required for installing the console version
          > and the non-NSIS distribution, thus adding code to the NSIS
          > installer will actually duplicate installation code.

          I'm proposing that (for only the Windows GUI installer) install.exe be
          removed and the installer (silently) manage these items. Its a a bit
          wordy. (Ok, usability nightmare.) Below, I've listed the 17 different
          screens requiring user intervention just to upgrade an existing gVim
          install. Notice how it bounces between console window to dialog,
          sometimes even requiring the user to find a hidden one of multiple to
          continue.

          I'm thinking with a few nights work, I could get the installer like:

          o Welcome/splash/Confirm install
          o License
          o Component selection
          o Path
          o Finished!

          All this is just my untested opinion of course, but I'd like to see if
          I could make such an installer and get some feedback. It would be nice
          if Windows users could enjoy "rpm -Uvh vim*.rpm" simplicity, too.

          --
          Steve Hall [ digitect@... ]


          _____________________________________________________________________
          gvim61.exe -- Installer interface during an upgrade

          ---------------------------------------------------------------------
          Console:

          *********************************************************
          Vim Install found what looks like an existing Vim version.
          The name of the entry is:

          "Vim 6.1 (self-installing)"

          Installing the new version will disable part of the existing version.
          (The batch files used in a console and the "Edit with Vim" entry in
          the popup menu will use the new version)

          Do you want to uninstall "Vim 6.1 (self-installing)" now?
          (y)es/(n)o)

          ---------------------------------------------------------------------
          Dialog: Uninstall

          ---------------------------------------------------------------------
          Console:

          This program will remove the following items:
          - the "Edit with Vim" entry in the popup menu
          which uses "C:\seh\ProgramFiles\Vim\vim61\gvim.exe"

          Remove it (y/n)?

          ---------------------------------------------------------------------
          Console:

          The Vim registry entries have been removed

          - the "gVim 6.1" icon on the desktop
          - the "gVim Easy 6.1" icon on the desktop
          - the "gVim Read only 6.1" icon on the desktop
          removing C:\Documents and Settings\SHall\Desktop\gVim 6.1.lnk
          removing C:\Documents and Settings\SHall\Desktop\gVim Easy 6.1.lnk
          removing C:\Documents and Settings\SHall\Desktop\gVim Read only 6.1.lnk

          - the "Programs\Vim 6.1" entry in the Start Menu
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1\gVim.lnk
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1\gVim Easy.lnk
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1\gVim Read-only.lnk
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1\gVim Diff.lnk
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1\uninstall.lnk
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1\Help.lnk
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1\Vim tutor.lnk
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1\Vim online.url
          removing C:\Documents and Settings\SHall\Start Menu\Programs\Vim 6.1

          gvim.exe detected. Attempting to unregister gvim with OLE

          Press Enter to exit...

          ---------------------------------------------------------------------
          Dialog: "Delete [path]\vim\vim61?"

          ---------------------------------------------------------------------
          Dialog: "Remove [path]\vimfiles?"

          ---------------------------------------------------------------------
          Dialog: "Remove [path]\vim?"

          ---------------------------------------------------------------------
          Dialog: Confirm "Vim6.1 has been (partly) removed"

          ---------------------------------------------------------------------
          Dialog: (already open) Uninstall Completed "Close"

          ---------------------------------------------------------------------
          Dialog: Confirm "Vim6.1 has been (partly) removed"

          ---------------------------------------------------------------------
          Console:

          *********************************************************
          Vim Install found what looks like an existing Vim version.
          The name of the entry is:

          "Vim 6.1 (self-installing)"

          Installing the new version will disable part of the existing version.
          (The batch files used in a console and the "Edit with Vim" entry in
          the popup menu will use the new version)

          Do you want to uninstall "Vim 6.1 (self-installing)" now?
          (y)es/(n)o) y
          Press Enter to continue

          ---------------------------------------------------------------------
          Dialog: License

          ---------------------------------------------------------------------
          Dialog: Component selection

          ---------------------------------------------------------------------
          Dialog: Path selection

          ---------------------------------------------------------------------
          Console:

          This program sets up the installation of Vim 6.1

          Inspecting system...
          Creating start menu
          C:\seh\ProgramFiles\Vim\_vimrc has been written
          Creating the following directories in "C:\seh\ProgramFiles\Vim\vimfiles":
          colors compiler doc ftplugin indent keymap plugin

          --- Attempting to register Vim with OLE ---
          (There is no message whether this works or not.)
          Press Enter to continue

          ---------------------------------------------------------------------
          Dialog: Completed

          ---------------------------------------------------------------------
          Dialog: Finished! Readme?
        • Bram Moolenaar
          ... This sounds good. ... They could be copied to the NSIS installer script. Do check that none of the functionality present in install.exe is lost. ... It
          Message 4 of 9 , Mar 4, 2003
          • 0 Attachment
            Steve Hall wrote:

            > Nullsoft has a variable $PROGRAMFILES which is determined at runtime,
            > I'd think this should be safe. I'll make some test packages available
            > that try this.

            This sounds good.

            > Another item is the Start Menu shortcuts. Am I correct in
            > understanding that this is currently handled by the install.exe
            > program? Nullsoft (now) has a $STARTMENU, could the installer use
            > that? I'm finding these here:
            >
            > http://nsis.sourceforge.net/Docs/Chapter3.html#3.2
            >
            > It might be nice to option some other install items like the various
            > icon shortcuts. Could these be moved out of the install.exe to the
            > installer?

            They could be copied to the NSIS installer script. Do check that none
            of the functionality present in install.exe is lost.

            > Some more ideas:
            >
            > o Elminate the color gradient background shell when installing. A
            > lean, mean installer doesn't need a lot of glory.

            It looks nice and I don't think it makes the script bigger.

            > o Registry modifications via NSIS.

            This probably means duplicating code from install.exe. We should avoid
            duplicating things that NSIS does the same way as install.exe. Future
            changes will also have to be done twice.

            > o Standard checked/unchecked/greyed box icons for which options are
            > selected to improve the installer interface. I can never tell
            > what's on and off with the current icons. Again, just give me
            > simple. (Like Vim.)
            >
            > o Prohibition of installations into the root of C:\.

            Installing in c:\Vim should be OK, right?

            > o Use standard Windows colors for install details
            >
            > o Add a self check to ensure the installer binary isn't corrupted.
            >
            > All these are just simple settings in NSIS.

            Sounds OK.

            --
            FIRST SOLDIER: So they wouldn't be able to bring a coconut back anyway.
            SECOND SOLDIER: Wait a minute! Suppose two swallows carried it together?
            FIRST SOLDIER: No, they'd have to have it on a line.
            "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
            \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
            \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
          Your message has been successfully submitted and would be delivered to recipients shortly.