diff --git a/binding-sandbox/sandbox.cpp b/binding-sandbox/sandbox.cpp index d8063bd0..e1044bee 100644 --- a/binding-sandbox/sandbox.cpp +++ b/binding-sandbox/sandbox.cpp @@ -70,8 +70,7 @@ sandbox::sandbox(const char *game_path) : ruby(new struct w2c_ruby), wasi(new wa // Determine Ruby command-line arguments std::vector args{"mkxp-z"}; - args.push_back("-v"); - args.push_back("-e "); + args.push_back("/mkxp-retro-dist/bin/mkxp-z"); if (MJIT_ENABLED) { std::string verboseLevel("--mjit-verbose="); std::string maxCache("--mjit-max-cache="); diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index b7bbdbad..5c888bac 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -1184,7 +1184,6 @@ static void mriBindingExecute() { ruby_init(); std::vector rubyArgsC{"mkxp-z"}; - rubyArgsC.push_back("-v"); rubyArgsC.push_back("-e "); void *node; if (conf.jit.enabled) { diff --git a/retro/Makefile b/retro/Makefile index c7117fbe..15331fbb 100644 --- a/retro/Makefile +++ b/retro/Makefile @@ -58,7 +58,7 @@ clean: clean-ruby-dist clean-ruby-bindings clean-deps clean-ruby-dist: rm -f $(OUTDIR)/mkxp-retro-dist.zip.c - rm -rf $(OUTDIR)/mkxp-retro-ruby + rm -rf $(LIBDIR)/mkxp-retro-ruby clean-ruby-bindings: rm -f $(OUTDIR)/mkxp-sandbox-bindgen.cpp @@ -97,6 +97,7 @@ $(LIBDIR)/mkxp-retro-dist.zip: $(LIBDIR)/mkxp-retro-dist/bin/ruby $(P7ZIP) rm -r $(LIBDIR)/_mkxp-retro-dist/include rm -r $(LIBDIR)/_mkxp-retro-dist/share rm -r $(LIBDIR)/_mkxp-retro-dist/lib/ruby/gems/$(RUBY_VERSION).0/cache/* + echo '# This is a Ruby script that does nothing. We make Ruby load this file on startup just because Ruby needs to load a script on startup for some reason. No, we cannot just use `-e`: for some reason that sometimes causes the Ruby VM to crash on startup.' > $(LIBDIR)/_mkxp-retro-dist/bin/mkxp-z rm -f $(LIBDIR)/mkxp-retro-dist.zip cd $(LIBDIR)/_mkxp-retro-dist && $(P7ZIP) a -bb3 -mm=zstd -mx=19 $(LIBDIR)/mkxp-retro-dist.zip * rm -r $(LIBDIR)/_mkxp-retro-dist