Commit c53846a2 authored by Daniel Bovensiepen's avatar Daniel Bovensiepen

merge @mattn's win-compatibility

parent a182a0d3
...@@ -6,7 +6,10 @@ c_dir = File.dirname(__FILE__) ...@@ -6,7 +6,10 @@ c_dir = File.dirname(__FILE__)
MRUBY_ROOT = File.expand_path("#{c_dir}/../..") MRUBY_ROOT = File.expand_path("#{c_dir}/../..")
DOC_DIR = File.expand_path(c_dir) DOC_DIR = File.expand_path(c_dir)
cmd = "#{DOC_DIR}/mrbdoc/mrbdoc.rb #{MRUBY_ROOT} #{DOC_DIR}" cmd = "ruby #{DOC_DIR}/mrbdoc/mrbdoc.rb #{MRUBY_ROOT} #{DOC_DIR} false"
PTY.spawn(cmd) do |i,o,pid| IO.popen(cmd, "r+") do |io|
i.each { |l| print l } io.close_write
while line = io.gets
puts line
end
end end
...@@ -10,7 +10,7 @@ class MRBDoc ...@@ -10,7 +10,7 @@ class MRBDoc
private private
def write dir, cfg def write dir, cfg
File.open(File.expand_path('Core.md', dir), 'w+') do |io| File.open(File.expand_path('Core.md', dir), 'wb+') do |io|
print_core_classes(io, cfg) print_core_classes(io, cfg)
print_core_modules(io, cfg) print_core_modules(io, cfg)
end end
......
...@@ -8,6 +8,7 @@ require 'mrbdoc_docu' ...@@ -8,6 +8,7 @@ require 'mrbdoc_docu'
MRUBY_ROOT = ARGV[0] MRUBY_ROOT = ARGV[0]
DOC_ROOT = ARGV[1] DOC_ROOT = ARGV[1]
_WRITE_LINE_NO = ARGV[2] _WRITE_LINE_NO = ARGV[2]
STDOUT.sync = true
raise ArgumentError.new 'mruby root missing!' if MRUBY_ROOT.nil? raise ArgumentError.new 'mruby root missing!' if MRUBY_ROOT.nil?
raise ArgumentError.new 'doc root missing!' if DOC_ROOT.nil? raise ArgumentError.new 'doc root missing!' if DOC_ROOT.nil?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment