summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorTom Black <[email protected]>2017-04-02 13:37:30 -0400
committerTom Black <[email protected]>2017-04-02 13:37:30 -0400
commit5247c3caa0091a77cce772de30cd44aaff484e16 (patch)
treeee3b9d29b2d21306d00d0855e31bebeb7a9c3995 /Rakefile
parent5cb0c0581b2ba9b9c436edb7b6699c2b44243e2f (diff)
downloadruby2d-5247c3caa0091a77cce772de30cd44aaff484e16.tar.gz
ruby2d-5247c3caa0091a77cce772de30cd44aaff484e16.zip
Fixes for Windows / MinGW
In Rakefile, can’t use semicolons to separate commands, using “&&” instead; for the web, use `start` command to open browser. In `extconf.rb`, use `bash` explicitly when calling `simple2d` with flags; make experience consistent with Linux.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index 58e48c8..e7fbd2a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -32,20 +32,25 @@ end
def run_mri_test(file)
print_task "Running MRI test: #{file}.rb"
- system "( cd test/ ; ruby #{file}.rb )"
+ system "( cd test/ && ruby #{file}.rb )"
end
def run_native_test(file)
print_task "Running native test: #{file}.rb"
run_cmd "ruby2d build --native test/#{file}.rb --debug"
- system "( cd test/ ; ../build/app )"
+ system "( cd test/ && ../build/app )"
end
def run_web_test(file)
print_task "Running web test: #{file}.rb"
run_cmd "ruby2d build --web test/#{file}.rb --debug"
open_cmd = 'open'
- if RUBY_PLATFORM =~ /linux/ then open_cmd = "xdg-#{open_cmd}" end
+ case RUBY_PLATFORM
+ when /linux/
+ open_cmd = "xdg-#{open_cmd}"
+ when /mingw/
+ open_cmd = "start"
+ end
system "#{open_cmd} build/app.html"
end