(Not documented)
# File rumix/config.rb, line 46 def clear @src_dir = 'package/' @dest_dir = nil @real_operating = true @force_overwriting = false @ruby_type = nil @ext_dest_type = nil @ext_dest_dir_manual = nil @man_type = nil @shell_type = nil @add_start_menu = false @add_path_env = false @installing_tool_ids = [] return self end
(Not documented)
# File rumix/config.rb, line 26 def ext_dest_dir case @ext_dest_type when :ruby File.join(@dest_dir, 'ruby/bin') when :system Rumix.system_folder_path when :manual @ext_dest_dir_manual end end
(Not documented)
# File rumix/config.rb, line 63 def load_ini_file(path) ini = INI.parse_file(path) case ini['General']['Ruby'] when '1.8' @ruby_type = RUBY_18 when '1.9.1' @ruby_type = RUBY_191 else raise "#{path} : unknown installing-ruby type : #{ini['General']['Ruby']}" end return self end
(Not documented)
# File rumix/config.rb, line 90 def operation_list re = [] case @ruby_type when RUBY_18 re << 'ruby 1.8.7 のインストール' when RUBY_191 re << 'ruby 1.9.1 のインストール' end if ext_dest_dir then re << "外部ライブラリのインストール -> #{ext_dest_dir}" end case @man_type when :chm re << "HTML Help版リファレンスのインストール" when :html re << "分割HTML版リファレンスのインストール" end case @shell_type when :nyacus re << "NYACUS 2.2a のインストール" when :nyados re << "NYADOS 2.2a のインストール" end @installing_tool_ids.each do |tool_id| found = tool_list.find{|x| x.id == tool_id} re << "#{found[1]} のインストール" end if add_path_env? then re << "環境変数PATHに ruby.exe のパスを追加" end if add_start_menu? then re << "スタートメニューにRumixを追加" end re end
(Not documented)
# File rumix/config.rb, line 135 def parse(argv) clear re = ROpt.parse(argv, 'd:ne:fi:h', 'dest:', 'no-op', 'ext:', 'force', 'ini:', 'help') if re then # help if re['help'] || re['h'] then puts("Rumix \#{Rumix::VERSION} - Ruby Starter Package with Installer\n\nUsage: rumix_cui.exe [options] [install-targets]\n\nOptions:\n -d --dest specifies path for installing. (REQUIRED)\n -n --no-op output message like operating, but does not operate.\n -e --ext specifies a directory path of external libraries. \n ('system' / 'ruby' / any path)\n -f --force without skipping, even if same or newer file already exists.\n -i --ini specifies using ini-file. (default: rumix.ini)\n -h --help show this help.\n\nInstall Targets:\n ruby, rubyman_chm, rubyman_html, nyacus, nyados,\n rubygems, rake, exerb, path_env, start_menu\n\nAddition:\n - You can omit under-bar of install targets. (pathenv == path_env)\n - On multiple specifing targets, install only one-side.\n For example, 'rumix_install_cui.exe nyados nyacus' => maybe install only nyados.\n") exit end targets = re.args if targets.empty? then $stderr.puts "No install-target." $stderr.puts $stderr.puts CUI_HELP_SENTENCE exit end targets.each do |target| case target.downcase when 'ruby' load_ini_file(re['ini'] || re['i'] || 'rumix.ini') when 'rubyman_chm', 'rubymanchm' @man_type = :chm when 'rubyman_html', 'rubymanhtml' @man_type = :html when 'nyacus' @shell_type = :nyacus when 'nyados' @shell_type = :nyados when 'path_env', 'pathenv' @add_path_env = true when 'start_menu', 'startmenu' @add_start_menu = true when 'rubygems', 'rake', 'exerb' @installing_tool_ids << target.downcase.to_sym else $stderr.puts "Target '#{target}' is unknown." exit end end if re['no-op'] || re['n'] then @real_operating = false end if re['force'] || re['f'] then @force_overwriting = true end dest = re['dest'] || re['d'] unless dest then $stderr.puts("Required specifing a path for installing.") $stderr.puts("Please add option '-dest PATH' or '-d PATH'") $stderr.puts $stderr.puts(CUI_HELP_SENTENCE) exit end @dest_dir = File.expand_path(dest) ext_path = re['ext'] || re['e'] case ext_path when /^ruby$/i @ext_dest_type = :ruby when /^system$/i @ext_dest_type = :system when nil # no act else @ext_dest_type = :manual @ext_dest_dir_manual = ext_path end return self else return nil end end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.