From: Chad Fowler Date: 2004-08-28T07:53:42+09:00 Subject: Re: Install to bin dir? On Sat, 28 Aug 2004 07:42:30 +0900, T. Onoma wrote: > On Friday 27 August 2004 05:38 pm, Chad Fowler wrote: > > Quite easy with RubyGems: > > http://rubygems.rubyforge.org/wiki/wiki.pl?CreateAGemInTenMinutes > > (specifically look at bindir and executables in the gem spec). > > No doubt! And I have a setup for that. While it's tempting to take a Gem only > route, I'm thinking it a good idea to hang on to a manual install too. Is > that a good idea? I would like to here the pros and cons of that! > Doing both is definitely a good plan for now. But, of course, make sure your users know which one you prefer (hint hint) :) > > Alternatively, look in RubyGems' install.rb for the part that creates > > binary stubs to see how we determine the bin directory. > > Thanks, Chad. I've taken a look at the gems install.rb. I grok most of it but > what's this about? > > if is_windows_platform > File.open(target+".cmd", "w") do |file| > file.puts "@ruby #{target} %1 %2 %3 %4 %5 %6 %7 %8 %9" > end > end > This is a hack to create 'shell scripts' for Windows users. It's what makes, for example, "rake blah" work from the command line in Windows. It's obviously a little brittle as is. Any ideas for improvement from Windows experts would be welcome. Thanks, Chad