diff options
| author | Tom Black <[email protected]> | 2017-04-02 13:37:30 -0400 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2017-04-02 13:37:30 -0400 |
| commit | 5247c3caa0091a77cce772de30cd44aaff484e16 (patch) | |
| tree | ee3b9d29b2d21306d00d0855e31bebeb7a9c3995 /Rakefile | |
| parent | 5cb0c0581b2ba9b9c436edb7b6699c2b44243e2f (diff) | |
| download | ruby2d-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-- | Rakefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 |
