mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-15 20:52:35 +00:00
Initial support for using cyberarm_engine as a mruby mrbgem: Remove/disable usages of defined?, update old gosu mouse and keyboard constants, and replace one usage of window.button_down? with proper Gosu.button_down?
This commit is contained in:
29
mrbgem.rake
Normal file
29
mrbgem.rake
Normal file
@@ -0,0 +1,29 @@
|
||||
MRuby::Gem::Specification.new("mruby-cyberarm_engine") do |spec|
|
||||
spec.license = "MIT"
|
||||
spec.authors = "cyberarm"
|
||||
spec.summary = " Yet another framework for building games with Gosu"
|
||||
|
||||
lib_rbfiles = []
|
||||
# Dir.glob("#{File.expand_path("..", __FILE__)}/lib/**/*.rb").reject do |f|
|
||||
# File.basename(f.downcase, ".rb") == "cyberarm_engine" ||
|
||||
# File.basename(f.downcase, ".rb") == "opengl" ||
|
||||
# f.downcase.include?("/opengl/")
|
||||
# end.reverse!
|
||||
|
||||
local_path = File.expand_path("..", __FILE__)
|
||||
File.read("#{local_path}/lib/cyberarm_engine.rb").each_line do |line|
|
||||
line = line.strip
|
||||
|
||||
next unless line.start_with?("require_relative")
|
||||
|
||||
file = line.split("require_relative").last.strip.gsub("\"", "")
|
||||
|
||||
next if file.include?(" if ")
|
||||
|
||||
lib_rbfiles << "#{local_path}/lib/#{file}.rb"
|
||||
end
|
||||
|
||||
pp lib_rbfiles
|
||||
|
||||
spec.rbfiles = lib_rbfiles
|
||||
end
|
||||
Reference in New Issue
Block a user