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

Patch for nsi fileset when creating windows installer from unix distribution

Expand Messages
  • Michael Geddes
    When using the full gzip source + runtime + extras, the file structure is different to the normal windows zip file! The main difference is the runtime
    Message 1 of 5 , Sep 3, 2002
    • 0 Attachment
      When using the full gzip source + runtime + extras, the file structure
      is different to the normal windows zip file! The main difference is the
      runtime directory. This patch allows the installer to work properly
      under these conditions.

      The other patch (optionally) allows the installer to be run from
      vim/system directory. The batch files are all very well and good, but
      they don't do everything, and reduce the length of the command line
      allowable, amongst other things. I prefer to have the vim exes in my
      path. The problem is that this means that the installer is also in the
      path, and this is definitely a bad thing!

      The first patch also changes the destination for install.exe and
      unistal.exe to be in a 'system' directory under the vim directory.

      //.ichael G.
    • Michael Geddes
      With paches this time. ... From: Michael Geddes Sent: Wednesday, 4 September 2002 10:36 AM To: Vim Dev (E-mail) Subject: Patch for nsi fileset when creating
      Message 2 of 5 , Sep 3, 2002
      • 0 Attachment
        With paches this time.

        -----Original Message-----
        From: Michael Geddes
        Sent: Wednesday, 4 September 2002 10:36 AM
        To: Vim Dev (E-mail)
        Subject: Patch for nsi fileset when creating windows installer from unix
        distribution


        When using the full gzip source + runtime + extras, the file structure
        is different to the normal windows zip file! The main difference is the
        runtime directory. This patch allows the installer to work properly
        under these conditions.

        The other patch (optionally) allows the installer to be run from
        vim/system directory. The batch files are all very well and good, but
        they don't do everything, and reduce the length of the command line
        allowable, amongst other things. I prefer to have the vim exes in my
        path. The problem is that this means that the installer is also in the
        path, and this is definitely a bad thing!

        The first patch also changes the destination for install.exe and
        unistal.exe to be in a 'system' directory under the vim directory.

        //.ichael G.


        -----------8<----------nsi_patch__
        *** gvim.nsi.orig Fri Feb 22 12:37:28 2002
        --- gvim.nsi Fri Feb 22 12:38:36 2002
        ***************
        *** 27,34 ****
        UninstallIcon icons\vim_uninst_16c.ico
        BGGradient 004000 008200 ffffff
        LicenseText "You should read the following before installing:"
        ! LicenseData ..\doc\uganda.nsis.txt

        !ifdef HAVE_UPX
        !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
        !endif
        --- 27,34 ----
        UninstallIcon icons\vim_uninst_16c.ico
        BGGradient 004000 008200 ffffff
        LicenseText "You should read the following before installing:"
        ! LicenseData ..\runtime\doc\uganda.nsis.txt

        !ifdef HAVE_UPX
        !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
        !endif
        ***************
        *** 148,156 ****

        SetOutPath $0
        File ..\src\gvim.exe
        ! File ..\src\install.exe
        ! File ..\src\uninstal.exe
        File ..\src\vimrun.exe
        File ..\src\xxd\xxd.exe
        File ..\..\diff.exe
        File ..\vimtutor.bat
        --- 148,155 ----

        SetOutPath $0
        File ..\src\gvim.exe
        ! File ..\src\vim.exe
        File ..\src\vimrun.exe
        File ..\src\xxd\xxd.exe
        File ..\..\diff.exe
        File ..\vimtutor.bat
        ***************
        *** 157,195 ****
        File ..\README.txt
        File ..\uninstal.txt
        ! File ..\*.vim
        ! File ..\rgb.txt

        SetOutPath $0\colors
        ! File ..\colors\*.*

        SetOutPath $0\compiler
        ! File ..\compiler\*.*

        SetOutPath $0\doc
        ! File ..\doc\*.txt
        ! File ..\doc\tags

        SetOutPath $0\ftplugin
        ! File ..\ftplugin\*.*

        SetOutPath $0\indent
        ! File ..\indent\*.*

        SetOutPath $0\macros
        ! File ..\macros\*.*

        SetOutPath $0\plugin
        ! File ..\plugin\*.*

        SetOutPath $0\syntax
        ! File ..\syntax\*.*

        SetOutPath $0\tools
        ! File ..\tools\*.*

        SetOutPath $0\tutor
        ! File ..\tutor\*.*

        SectionEnd
        ##########################################################
        SectionDivider
        --- 156,198 ----
        File ..\README.txt
        File ..\uninstal.txt
        ! File ..\runtime\*.vim
        ! File ..\runtime\rgb.txt

        + SetOutPath $0\system
        + File ..\src\install.exe
        + File ..\src\uninstal.exe
        +
        SetOutPath $0\colors
        ! File ..\runtime\colors\*.*

        SetOutPath $0\compiler
        ! File ..\runtime\compiler\*.*

        SetOutPath $0\doc
        ! File ..\runtime\doc\*.txt
        ! File ..\runtime\doc\tags

        SetOutPath $0\ftplugin
        ! File ..\runtime\ftplugin\*.*

        SetOutPath $0\indent
        ! File ..\runtime\indent\*.*

        SetOutPath $0\macros
        ! File ..\runtime\macros\*.*

        SetOutPath $0\plugin
        ! File ..\runtime\plugin\*.*

        SetOutPath $0\syntax
        ! File ..\runtime\syntax\*.*

        SetOutPath $0\tools
        ! File ..\runtime\tools\*.*

        SetOutPath $0\tutor
        ! File ..\runtime\tutor\*.*

        SectionEnd
        ##########################################################
        SectionDivider
        ***************
        *** 266,276 ****
        SectionIn 1,3

        SetOutPath $0\lang
        ! File /r ..\lang\*.*
        SetOutPath $0\keymap
        ! File ..\keymap\README.txt
        ! File ..\keymap\*.vim
        SetOutPath $0
        File ..\libintl.dll

        SectionEnd
        --- 269,279 ----
        SectionIn 1,3

        SetOutPath $0\lang
        ! File /r ..\runtime\lang\*.*
        SetOutPath $0\keymap
        ! File ..\runtime\keymap\README.txt
        ! File ..\runtime\keymap\*.vim
        SetOutPath $0
        File ..\libintl.dll

        SectionEnd
        ***************
        *** 279,286 ****
        Section -call_install_exe

        SetOutPath $0
        ! ExecWait "$0\install.exe $1"

        SectionEnd
        ##########################################################
        Section -post
        --- 282,289 ----
        Section -call_install_exe

        SetOutPath $0
        ! ExecWait "$0\system\install.exe $1"

        SectionEnd
        ##########################################################
        Section -post
        ***************
        *** 304,311 ****
        No_VisVim:

        ; delete the context menu entry and batch files
        ! ExecWait "$0\uninstal.exe -nsis"

        # We may have been put to the background when uninstall did something.
        BringToFront

        --- 307,314 ----
        No_VisVim:

        ; delete the context menu entry and batch files
        ! ExecWait "$0\system\uninstal.exe -nsis"

        # We may have been put to the background when uninstall did something.
        BringToFront
        --


        ----------------8<--------------------------inst_patch
        *** dosinst.h.copy Fri Feb 22 12:50:54 2002
        --- dosinst.h Fri Feb 22 12:51:06 2002
        ***************
        *** 562,568 ****
        }
        /* remove the tail, the executable name "install.exe" */
        remove_tail(installdir);

        /* change to the installdir */
        mch_chdir(installdir);

        --- 562,570 ----
        }
        /* remove the tail, the executable name "install.exe" */
        remove_tail(installdir);
        + if(stricmp( installdir+(strlen(installdir)-6),"system")==0)
        + remove_tail(installdir);

        /* change to the installdir */
        mch_chdir(installdir);
      • Bram Moolenaar
        ... But this breaks it for when using the PC source archive. A better solution would be to detect the runtime directory and move its contents to the right
        Message 3 of 5 , Sep 4, 2002
        • 0 Attachment
          Michael Geddes wrote:

          > When using the full gzip source + runtime + extras, the file structure
          > is different to the normal windows zip file! The main difference is the
          > runtime directory. This patch allows the installer to work properly
          > under these conditions.

          But this breaks it for when using the PC source archive. A better
          solution would be to detect the runtime directory and move its contents
          to the right place.

          > The other patch (optionally) allows the installer to be run from
          > vim/system directory. The batch files are all very well and good, but
          > they don't do everything, and reduce the length of the command line
          > allowable, amongst other things. I prefer to have the vim exes in my
          > path. The problem is that this means that the installer is also in the
          > path, and this is definitely a bad thing!

          The automatic way uses the batch scripts. If you are going to set the
          path manually, you might as well move the [un]install.exe out of the
          way after installing.

          --
          No letters of the alphabet were harmed in the creation of this message.

          /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
          \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
          \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
        • Michael Geddes
          Or make the windows zip file consistent with the other archive by moving the docs &c into the runtime directory? Is there a reason they aren t already? Still,
          Message 4 of 5 , Sep 4, 2002
          • 0 Attachment
            Or make the windows zip file consistent with the other archive by moving
            the docs &c into the runtime
            directory? Is there a reason they aren't already?
            Still, if somebody more familiar with the installer than I am could do
            the detecting, that would be great.

            Also, is there any reason why the installer doesn't distribute the
            command-line version of vim? It is very useful for batch processing
            (some of my scripts assume its presence too).

            Could we at least have the patches to dos_inst.c as this allows me to
            more easily make my own distribution for work where this behaviour is
            normal.
            Another option could be to choose a different name for the .exe - for
            example viminst.exe & vimunins.exe - would this be more palatable?

            //.




            -----Original Message-----
            From: Bram Moolenaar [mailto:Bram@...]
            Sent: Thursday, 5 September 2002 4:32 AM
            To: Michael Geddes
            Cc: Vim Dev (E-mail)
            Subject: RE: Patch for nsi fileset when creating windows installer from
            unix distribution



            Michael Geddes wrote:

            > When using the full gzip source + runtime + extras, the file structure
            > is different to the normal windows zip file! The main difference is
            the
            > runtime directory. This patch allows the installer to work properly
            > under these conditions.

            But this breaks it for when using the PC source archive. A better
            solution would be to detect the runtime directory and move its contents
            to the right place.


            > The other patch (optionally) allows the installer to be run from
            > vim/system directory. The batch files are all very well and good,
            but
            > they don't do everything, and reduce the length of the command line
            > allowable, amongst other things. I prefer to have the vim exes in my
            > path. The problem is that this means that the installer is also in
            the
            > path, and this is definitely a bad thing!

            The automatic way uses the batch scripts. If you are going to set the
            path manually, you might as well move the [un]install.exe out of the
            way after installing.

            --
            No letters of the alphabet were harmed in the creation of this message.

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net
            \\\
            /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim
            \\\
            \\\ Project leader for A-A-P -- http://www.a-a-p.org
            ///
            \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html
            ///
          • Michael Geddes
            Bram, in the end I am happy to go with your decision, however your arguments haven t convinced me yet... so one last go. I ve had a look at lots of directories
            Message 5 of 5 , Sep 5, 2002
            • 0 Attachment
              Bram, in the end I am happy to go with your decision, however your
              arguments
              haven't convinced me yet... so one last go.

              I've had a look at lots of directories under Program Files on my
              computer.

              Nearly all have their uninstall.exe / unwise.exe in a sub-directory
              named Uninstall, System or Setup.
              Those that don't have a postfix.. something like setup_wm.exe (Windows
              Media Player) or unins000.exe.
              I said nearly all - there is one exception I've found so far that had an
              uninstall.exe in with the other
              executables.

              So maybe a beter name would be inst_vim.exe and un_vim.exe (or
              something like that). It is still very
              obvious... IHMHO

              I believe you are under-estimating the problems the batch files might
              cause - though I've only one reportable
              incident - which is that the .cmd file was truncating the command-line
              when I was passing a few dozen files to the command line. (So not hugely
              a problem for the most part).

              If only winnt handled symbolic links properly (like if shortcuts could
              be executed).

              I personally don't care about cr/lf conversions. Everything works event
              if it doesn't happen.

              //.

              -----Original Message-----
              From: Bram Moolenaar [mailto:Bram@...]
              Sent: Friday, 6 September 2002 7:14 AM
              To: Michael Geddes
              Subject: RE: Patch for nsi fileset when creating windows installer from
              unix distribution



              Michael Geddes wrote:

              > Or make the windows zip file consistent with the other archive by
              moving
              > the docs &c into the runtime directory? Is there a reason they aren't
              > already?

              The Unix archives are setup to be able to run "make install". The
              MS-Windows archives are setup to use the files right after unpacking.

              > Still, if somebody more familiar with the installer than I am could do
              > the detecting, that would be great.

              There are more issues to be taken care of, such as LF to CR-LF
              translation. That would be enough to say "just use the PC archives", if
              it weren't for patches. And the files obtained from CVS also use the
              Unix layout and line separators. Sounds like a script is needed to make
              a copy of the tree to be able to run NSIS.

              > Also, is there any reason why the installer doesn't distribute the
              > command-line version of vim? It is very useful for batch processing
              > (some of my scripts assume its presence too).

              Several reasons:
              - It adds to the size of the package.
              - Not many people are expected to use the console version.
              - There are actually several console versions for different systems (Win
              9x and NT/2000/XP). Would have to include at least two.

              > Could we at least have the patches to dos_inst.c as this allows me to
              > more easily make my own distribution for work where this behaviour is
              > normal.
              > Another option could be to choose a different name for the .exe - for
              > example viminst.exe & vimunins.exe - would this be more palatable?

              I don't like either solution, because it is so common to type "install"
              or click on "install.exe". I think you will just have to move these
              executables elsewhere if you insist on adding this directory to your
              $PATH.

              --
              FATHER: You killed eight wedding guests in all!
              LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
              FATHER: I can understand that.
              "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
              ///
              \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html
              ///
            Your message has been successfully submitted and would be delivered to recipients shortly.