diff options
| author | realtradam <[email protected]> | 2022-02-10 08:07:32 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-02-10 08:07:32 -0500 |
| commit | 5d0111bd7d51dab205b83d4c9dbad483f3efa1da (patch) | |
| tree | da504299b120c39db6b4d5ab0a5d2a740af38a2c | |
| parent | 4ca460d33a0aa9c4c826f87873f89c4c43d9e07c (diff) | |
| download | FelFlameEngine-5d0111bd7d51dab205b83d4c9dbad483f3efa1da.tar.gz FelFlameEngine-5d0111bd7d51dab205b83d4c9dbad483f3efa1da.zip | |
fixed asset linking
| -rw-r--r-- | Rakefile | 19 | ||||
| -rw-r--r-- | vendor/lib/tux/mruby/libmruby.a | bin | 9046584 -> 9079204 bytes | |||
| -rw-r--r-- | vendor/lib/web/mruby/libmruby.a | bin | 1496090 -> 1499140 bytes |
3 files changed, 11 insertions, 8 deletions
@@ -1,9 +1,9 @@ require 'fileutils' namespace :build do - @vendor_dir = '../../vendor' + @vendor_dir = '../vendor' @include_dir = "#{@vendor_dir}/include" @library_dir = "#{@vendor_dir}/lib" - @bytecode_header_path = "../temp" + @bytecode_header_path = "../build/temp" desc "Build the engine" task :mruby do Dir.chdir("mruby") do @@ -50,15 +50,18 @@ namespace :build do desc 'Build the game for web' task :web => :bytecode do Dir.mkdir("build/web") unless File.exists?("build/web") - Dir.chdir("build/web") do - system("emcc -Os -Wall -I#{@include_dir}/raylib -I#{@include_dir}/mruby -I#{@bytecode_header_path} #{@vendor_dir}/boilerplate.c #{@library_dir}/web/mruby/libmruby.a #{@library_dir}/web/raylib/libraylib.a -o index.html -s USE_GLFW=3 -DPLATFORM_WEB --preload-file ./assets --shell-file #{@vendor_dir}/html/minshell.html -s TOTAL_MEMORY=268435456") # -s ASYNCIFY + #Dir.chdir("build/web") do + Dir.chdir("game") do + system("emcc -Os -Wall -I#{@include_dir}/raylib -I#{@include_dir}/mruby -I#{@bytecode_header_path} #{@vendor_dir}/boilerplate.c #{@library_dir}/web/mruby/libmruby.a #{@library_dir}/web/raylib/libraylib.a -o ../build/web/index.html -s USE_GLFW=3 -DPLATFORM_WEB --preload-file ./assets --shell-file #{@vendor_dir}/html/minshell.html -s TOTAL_MEMORY=268435456") # -s ASYNCIFY end end desc 'Build the game for Linux' task :tux => :bytecode do Dir.mkdir("build/tux") unless File.exists?("build/tux") - Dir.chdir("build/tux") do - system("zig cc -target native #{@vendor_dir}/boilerplate.c -o game -lGL -lm -lpthread -ldl -lrt -lX11 -I#{@bytecode_header_path} -I#{@include_dir}/raylib -I#{@include_dir}/mruby #{@library_dir}/tux/mruby/libmruby.a #{@library_dir}/tux/raylib/libraylib.a") + #Dir.chdir("build/tux") do + Dir.chdir("game") do + system("zig cc -target native #{@vendor_dir}/boilerplate.c -o ../build/tux/game -lGL -lm -lpthread -ldl -lrt -lX11 -I#{@bytecode_header_path} -I#{@include_dir}/raylib -I#{@include_dir}/mruby #{@library_dir}/tux/mruby/libmruby.a #{@library_dir}/tux/raylib/libraylib.a") + system("rsync -r ./assets ../build/tux") end end #desc 'Build the game for Window' @@ -72,8 +75,8 @@ end desc 'Launch the game' task :playtest => "build:single_file" do - Dir.chdir("build/temp") do - system("../../mruby/build/host/bin/mruby main.rb") + Dir.chdir("game") do + system("../mruby/build/host/bin/mruby ../build/temp/main.rb") end end task :p => :playtest diff --git a/vendor/lib/tux/mruby/libmruby.a b/vendor/lib/tux/mruby/libmruby.a Binary files differindex 7fc9ed5..a9e9e68 100644 --- a/vendor/lib/tux/mruby/libmruby.a +++ b/vendor/lib/tux/mruby/libmruby.a diff --git a/vendor/lib/web/mruby/libmruby.a b/vendor/lib/web/mruby/libmruby.a Binary files differindex 8fc4b23..20ce536 100644 --- a/vendor/lib/web/mruby/libmruby.a +++ b/vendor/lib/web/mruby/libmruby.a |
