From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-07-03T04:23:14+09:00 Subject: Re: [ANN] Aeditor-0.1 is unleashed On Thu, 03 Jul 2003 03:48:50 +0900, nobu.nokad wrote: > Hi, > > At Thu, 3 Jul 2003 01:20:48 +0900, > Simon Strandgaard wrote: >> I totally forgot about $RUBYLIB.. Therefore my hardcoding >> to $:[0] is a bad idea. >> >> $:.unshift $:[0]+File::SEPARATOR+"aeditor" >> >> How do I obtain the install location, in a clean way ? > > You'll be possible by hook files. If so should I then create a 'bin/post-setup.rb' file ? Or a 'bin/post-install.rb' file ? I don't like this approach. I much better like the 'require' approach. >> > You'd better to replace require's. >> >> I don't quite follow ? > > I meant files under aeditor should be required as under > aedtior, and replaced files under lib/aeditor as: > > $ ruby -pi~ -e "sub!(/^(require ')(?=#{Dir.glob('*.rb').map{|s|s.chomp('.rb')}.join('|')})/o, '\1aeditor/)" *.rb So every file which requires another file in the project, should say: require 'aeditor/file2require' I have to figure out how make this fit into my cvs-repository. I could make symlink hack... any ideas how to do this simplest ? > But still it errs at exit. > > /usr/lib/ruby/site_ruby/1.8/aeditor/control.rb:219:in `dispatch': unhandled exception > from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:26:in `run' > from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:24:in `loop' > from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:27:in `run' > from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:36:in `launch' > from /usr/bin/aeditor:4 Yes I gotta find a more gentle way to shutdown the application :-) -- Simon Strandgaard