Installation script's target directory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Installation script's target directory

Doug Kearns
Currently it appears that we're attempting to install the vim-ruby
runtime files into $VIMRUNTIME which should really only contained the
default distributed files.

It would be better to default to, $HOME/.vim (or $HOME/vimfiles for
Windows) and $VIM/vimfiles.

Any objections?

Regards,
Doug

PS. Is HOME set on Windows in Win2k and later?
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Installation script's target directory

Hugh Sasse
On Thu, 28 Jul 2005, Doug Kearns wrote:

> Currently it appears that we're attempting to install the vim-ruby
> runtime files into $VIMRUNTIME which should really only contained the
> default distributed files.

Well, it should really only contain the system-wide settings
determined by the admin(s) of the machines mounting this stuff....
Normally, vims defaults are the right thing, (though matchit is good
to have).
>
> It would be better to default to, $HOME/.vim (or $HOME/vimfiles for
> Windows) and $VIM/vimfiles.

I don't know how many other users than me here make use of vim and
ruby, but I like being able to give them the benefits of this
package, once and for all users.  Also, when users ask me for help it
is nice to spin up vim and have it work sensibly, even if they
prefer to use EMACS normally when I'm not doing stuff for them.
Sometimes it is easier to write a ruby program then and there to
solve the problem, in which case I want the things I'm used to
available.

If this is to change, I think we need a way to make it optional, and
it would seem strange to me if most users didn't want to utilise
this stuff, so I'd have it default to current behaviour.

Then there's the case of the admins who've installed Ruby and Vim
for some users, and get pestered to update things for them from time
to time.  Their job should be kept easy, too.

>
> Any objections?
>
> Regards, Doug
>
> PS. Is HOME set on Windows in Win2k and later?

IIRC in XP you have to set it, but it's a while since I did.

         Thank you,
         Hugh
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Installation script's target directory

Doug Kearns
On Thu, Jul 28, 2005 at 02:36:38PM +0100, Hugh Sasse wrote:
> On Thu, 28 Jul 2005, Doug Kearns wrote:
>
> >Currently it appears that we're attempting to install the vim-ruby
> >runtime files into $VIMRUNTIME which should really only contained the
> >default distributed files.
>
> Well, it should really only contain the system-wide settings
> determined by the admin(s) of the machines mounting this stuff....

My understanding is that these should really go in $VIM/vimfiles (eg.
/usr/share/vim/vimfiles). $VIM/vimfiles is designed as the system-wide
preferences directory. It precedes $VIMRUNTIME in the 'runtimepath', is
usable by all Vim installations, and survives upgrades.

:help runtimepath

My intent would be to offer $VIM/vimfiles and $HOME/.vim as the default
installation directories. I guess we'll have to parse "env vim
--version" to determine $VIM. What's the best way on Windows?
 
<snip>

> Also, when users ask me for help it
> is nice to spin up vim and have it work sensibly, even if they
> prefer to use EMACS normally when I'm not doing stuff for them.

I hope you're working your magic on them...

<snip>

> If this is to change, I think we need a way to make it optional, and
> it would seem strange to me if most users didn't want to utilise
> this stuff, so I'd have it default to current behaviour.

Of course, the user will still be able to specify any installation path
they wish.

> Then there's the case of the admins who've installed Ruby and Vim
> for some users, and get pestered to update things for them from time
> to time.  Their job should be kept easy, too.

Yes, this is intended to make it easier. ;-)

This only came up because I was considering a release and thought I
should check the installation script. I've never used it before and
noticed that it offered me /usr/share/vim/vim63 as the default
installation path and completely ignored my local installation. I
thought I'd uninstalled the system-wide version...

<snip>

Thanks,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Installation script's target directory

Doug Kearns
On Fri, Jul 29, 2005 at 01:02:06AM +1000, Doug Kearns wrote:

<snip>
 
> My intent would be to offer $VIM/vimfiles and $HOME/.vim as the default
> installation directories. I guess we'll have to parse "env vim
> --version" to determine $VIM. What's the best way on Windows?
 
Because I'm 'flying blind', without access to a Windows box anytime
soon, could someone please do me a favour and see if something like this
returns $VIM?

require 'win32/registry'
dirs = []
path = ''
Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Vim\Gvim') do |reg|
  path = reg['path', Win32::Registry::REG_SZ]
end
unless path.empty?
  system_dir = path.sub(/\\vim\d\d\\gvim.exe/, '')
  dirs << system_dir + '/vimfiles'
end

<snip>
 
Thanks,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Installation script's target directory

Hugh Sasse
On Tue, 9 Aug 2005, Doug Kearns wrote:

> On Fri, Jul 29, 2005 at 01:02:06AM +1000, Doug Kearns wrote:
>
> <snip>
>
>> My intent would be to offer $VIM/vimfiles and $HOME/.vim as the default
>> installation directories. I guess we'll have to parse "env vim
>> --version" to determine $VIM. What's the best way on Windows?
>
> Because I'm 'flying blind', without access to a Windows box anytime
> soon, could someone please do me a favour and see if something like this
> returns $VIM?
>
> require 'win32/registry'
> dirs = []
> path = ''
> Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Vim\Gvim') do |reg|
>  path = reg['path', Win32::Registry::REG_SZ]
> end
> unless path.empty?
>  system_dir = path.sub(/\\vim\d\d\\gvim.exe/, '')
>  dirs << system_dir + '/vimfiles'
> end
>
> <snip>

Windows98 I get
rb(main):001:0> require 'win32/registry'
=> true
irb(main):002:0> dirs = []
=> []
irb(main):003:0> path = ''
=> ""
irb(main):004:0> Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Vim\Gvim') d
o |reg|
irb(main):005:1*   path = reg['path', Win32::Registry::REG_SZ]
irb(main):006:1> end
=> "C:\\VIM\\VIM63\\gvim.exe"
irb(main):007:0> unless path.empty?
irb(main):008:1>   system_dir = path.sub(/\\vim\d\d\\gvim.exe/, '')
irb(main):009:1>   dirs << system_dir + '/vimfiles'
irb(main):010:1> end
=> ["C:\\VIM\\VIM63\\gvim.exe/vimfiles"]
irb(main):011:0> dirs
=> ["C:\\VIM\\VIM63\\gvim.exe/vimfiles"]
irb(main):012:0>

but in my vim I get
C:\vim
from echo $VIM

And that's with

irb(main):012:0> puts RUBY_VERSION
1.8.2
=> nil
irb(main):013:0>

or

C:\WINDOWS>ruby --version
ruby 1.8.2 (2004-12-25) [i386-mswin32]

C:\WINDOWS>


>
> Thanks,
> Doug
>
         HTH
         Hugh

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Installation script's target directory

Doug Kearns
Thanks Hugh,

On Tue, Aug 09, 2005 at 12:34:41PM +0100, Hugh Sasse wrote:

<snip>

> Windows98 I get
> rb(main):001:0> require 'win32/registry'
> => true
> irb(main):002:0> dirs = []
> => []
> irb(main):003:0> path = ''
> => ""
> irb(main):004:0>
> Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Vim\Gvim') d
> o |reg|
> irb(main):005:1*   path = reg['path', Win32::Registry::REG_SZ]
> irb(main):006:1> end
> => "C:\\VIM\\VIM63\\gvim.exe"
> irb(main):007:0> unless path.empty?
> irb(main):008:1>   system_dir = path.sub(/\\vim\d\d\\gvim.exe/, '')

  irb(main):008:1>   system_dir = path.sub(/\\vim\d\d\\gvim.exe/i, '')

> irb(main):009:1>   dirs << system_dir + '/vimfiles'
> irb(main):010:1> end
> => ["C:\\VIM\\VIM63\\gvim.exe/vimfiles"]
> irb(main):011:0> dirs
> => ["C:\\VIM\\VIM63\\gvim.exe/vimfiles"]
> irb(main):012:0>

I always forget that it's case insensitive...

<snip>

Thanks again,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Installation script's target directory

Hugh Sasse
On Tue, 9 Aug 2005, Doug Kearns wrote:

> Thanks Hugh,
>
         [...]
>
>  irb(main):008:1>   system_dir = path.sub(/\\vim\d\d\\gvim.exe/i, '')
>
         [...]
irb(main):013:0> dirs = []
=> []
irb(main):014:0> path = ''
=> ""
irb(main):015:0> Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Vim\Gvim') d
o |reg|
irb(main):016:1* path = reg['path', Win32::Registry::REG_SZ]
irb(main):017:1> end
=> "C:\\VIM\\VIM63\\gvim.exe"
irb(main):018:0> unless path.empty?
irb(main):019:1> system_dir = path.sub(/\\vim\d\d\\gvim.exe/i, '')
irb(main):020:1> dirs << system_dir + '/vimfiles'
irb(main):021:1> end
=> ["C:\\VIM/vimfiles"]
irb(main):022:0>

>
> I always forget that it's case insensitive...

Yes, same here..
>
> <snip>
>
> Thanks again,
> Doug

         Hugh
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel