X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=chise%2Fconfig.rb;h=14153679a7b67b94e859db06e657d8e2198fc737;hb=85d5c7d449c81b6e0fdb3838cad47bb80cef80bd;hp=8944476c94edd2adc685844993bf972b80e9a50f;hpb=5b25cdbb3d6d0d4621f1ecf82a12b4a3a6f8edba;p=chise%2Fruby.git diff --git a/chise/config.rb b/chise/config.rb index 8944476..1415367 100755 --- a/chise/config.rb +++ b/chise/config.rb @@ -1,8 +1,17 @@ # Copyright (C) 2002-2004 Kouichirou Eto, All rights reserved. require "singleton" +require "chise/version" module CHISE + # on Winodws + #DB_DIR = "c:/chise/chise-db" # /character/feature/=ucs + #IDS_DIR = "c:/chise/ids" # /IDS-JIS-X0208-1990.txt + + # on Unix + DB_DIR = "/usr/local/lib/xemacs-21.4.14/i686-pc-linux/chise-db" + IDS_DIR = "/home/eto/work/chise/ids" + def windows?() rp = RUBY_PLATFORM rp.index("cygwin") || rp.index("mswin32") || rp.index("mingw32") @@ -13,16 +22,14 @@ module CHISE include Singleton def initialize + @version = VERSION + @release_date = RELEASE_DATE + @base_dir = File.expand_path(File.dirname(__FILE__)+"/../..") @csf_dir = @base_dir+"/csf" - if CHISE.windows?() - @db_dir = @base_dir+"/chise-db" # /sysmtem-char-id/=ucs - @ids_dir = @base_dir+"/ids" # /IDS-JIS-X0208-1990.txt - else - @db_dir = "/usr/local/lib/xemacs-21.4.14/i686-pc-linux/chise-db" - @ids_dir = "/home/eto/work/chise/ids" - end + @db_dir = DB_DIR + @ids_dir = IDS_DIR instance_variables.each {|name| self.class.class_eval { attr_reader name.delete("@") }