summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
blob: f69f0f1ac02afd4ca4b59e42ec00485e761997e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
task :build do
  desc "Build game"
  Dir.chdir("mruby") do
    `env MRUBY_CONFIG=build_config/felflame_linux.rb rake`
  end
end

task :serve do
  link = "http://localhost:8000/game.html"
  if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
    system "start #{link}"
  elsif RbConfig::CONFIG['host_os'] =~ /darwin/
    system "open #{link}"
  elsif RbConfig::CONFIG['host_os'] =~ /linux|bsd/
    system "xdg-open #{link}"
  end
  `ruby -run -ehttpd build/temp/ -p8000`
end
task :s => :serve