Sha256: eb31721b788d275023e385129e89af12f2d1d0abd9e8950d4b2ba2b489a0457b

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

module Rubygb
  def self.build filename, options={}
    unless File.exists? filename
      raise "Fatal: can't find #{filename}"
    end

    base = File.basename(filename, ".*")
    exe_path = File.expand_path(File.join(File.dirname(__FILE__),"..","rgbds"))

    raise "Assembly failed!" unless system("#{exe_path}/rgbasm -v -o#{base}.obj #{filename}")
    raise "Link failed!" unless system("#{exe_path}/rgblink -m#{base}.map -n#{base}.sym -o#{base}.gb #{base}.obj")

    unless options[:no_fix]
      raise "Header fix failed!" unless system("#{exe_path}/rgbfix -p0 -v #{base}.gb")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubygb-0.2.1 lib/rubygb/rubygb.rb