From 5247c3caa0091a77cce772de30cd44aaff484e16 Mon Sep 17 00:00:00 2001 From: Tom Black Date: Sun, 2 Apr 2017 13:37:30 -0400 Subject: Fixes for Windows / MinGW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Rakefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Rakefile') 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 -- cgit v1.2.3