summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbin/ruby2d18
1 files changed, 11 insertions, 7 deletions
diff --git a/bin/ruby2d b/bin/ruby2d
index 244e958..1d9ef7e 100755
--- a/bin/ruby2d
+++ b/bin/ruby2d
@@ -57,18 +57,22 @@ def make_lib
lib << "
include Ruby2D::DSL
-include Ruby2D
-
-def require(str)
- if str == 'ruby2d'
- true
- end
-end\n"
+include Ruby2D\n"
File.write('build/lib.rb', lib)
end
+# Remove `require 'ruby2d'` from source file
+def strip_require(file)
+ output = ''
+ File.foreach(file) do |line|
+ output << line unless line =~ /require ('|")ruby2d('|")/
+ end
+ return output
+end
+
+
# Build a native version of the provided Ruby application
def build_native(rb_file)