diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index 18f5341d..30a79e04 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -22,7 +22,7 @@ #include "audio.h" #include "binding-util.h" #include "binding.h" -#include "config.h" +#include "src/config.h" #include "debugwriter.h" #include "eventthread.h" #include "filesystem.h" @@ -30,7 +30,7 @@ #include "lang-fun.h" #include "sdl-util.h" #include "sharedstate.h" -#include "util.h" +#include "src/util.h" #include "boost-hash.h" #include diff --git a/binding/binding-util.cpp b/binding/binding-util.cpp index 4509afb4..f5290271 100644 --- a/binding/binding-util.cpp +++ b/binding/binding-util.cpp @@ -23,7 +23,7 @@ #include "sharedstate.h" #include "exception.h" -#include "util.h" +#include "src/util.h" #include #include diff --git a/binding/filesystem-binding.cpp b/binding/filesystem-binding.cpp index 30c2ed0b..4ecbdbe0 100644 --- a/binding/filesystem-binding.cpp +++ b/binding/filesystem-binding.cpp @@ -23,8 +23,8 @@ #include "sharedstate.h" #include "filesystem.h" -#include "config.h" -#include "util.h" +#include "src/config.h" +#include "src/util.h" #ifndef OLD_RUBY #include "ruby/encoding.h" @@ -185,7 +185,7 @@ RB_METHOD(kernelLoadData) rb_raise(rb_eTypeError, "load_data: second argument must be Boolean"); } - if (!shState->config().compressedGraphics) + if (!shState->config().encryptedGraphics) { VALUE isGraphicsFile = rb_funcall(filename, rb_intern("start_with?"), diff --git a/binding/input-binding.cpp b/binding/input-binding.cpp index d2e67171..1bc8cd36 100644 --- a/binding/input-binding.cpp +++ b/binding/input-binding.cpp @@ -23,7 +23,7 @@ #include "sharedstate.h" #include "exception.h" #include "binding-util.h" -#include "util.h" +#include "src/util.h" #include #include diff --git a/binding/meson.build b/binding/meson.build index 9981166a..3fd203e9 100644 --- a/binding/meson.build +++ b/binding/meson.build @@ -1,9 +1,14 @@ -ver = get_option('mri_version') -if ver.version_compare('>1.8') == false - add_project_arguments('-DOLD_RUBY', language: ['cpp','objc','objcpp']) +if get_option('mri_includes') == '' + ver = get_option('mri_version') + if ver.version_compare('>1.8') == false + add_project_arguments('-DOLD_RUBY', language: ['cpp','objc','objcpp']) + endif + global_dependencies += dependency('ruby-' + ver) +else + global_args += ('-I' + get_option('mri_includes')) + global_dependencies += compilers['cpp'].find_library(get_option('mri_library'), dirs: get_option('mri_libpath')) endif -global_dependencies += dependency('ruby-' + ver) if get_option('no_preload_scripts') == true add_project_arguments('-DNO_PRELOAD_SCRIPTS', language: ['cpp','objc','objcpp']) diff --git a/meson_options.txt b/meson_options.txt index 435d962f..ec2ab99b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,8 @@ option('mri_version', type: 'string', value: '1.8', description: 'Version of MRI to link with') +option('mri_includes', type: 'string', value: '', description: 'Ruby manual include path') +option('mri_libpath', type: 'string', value: '', description: 'Ruby manual lib path') +option('mri_library', type: 'string', value: '', description: 'Ruby manual link name') + option('mk', type: 'boolean', value: false, description: 'Build to fit Marin\'s MK standard') option('console', type: 'boolean', value: false, description: 'Whether to debug information in the console') option('macos_min_version', type: 'string', value: '10.12', description: 'Minimum macOS system version to support') diff --git a/src/config.h b/src/config.h index 1c8aee11..10542c42 100644 --- a/src/config.h +++ b/src/config.h @@ -66,7 +66,7 @@ struct Config { bool enableReset; bool allowSymlinks; bool pathCache; - bool compressedGraphics; + bool encryptedGraphics; std::string dataPathOrg; std::string dataPathApp; diff --git a/src/config.mm b/src/config.mm index 498a70a5..124471f6 100644 --- a/src/config.mm +++ b/src/config.mm @@ -82,7 +82,7 @@ void Config::read(int argc, char *argv[]) { @"SESourceCount" : @6, @"customScript" : @"", @"pathCache" : @true, - @"compressedGraphics" : @false, + @"encryptedGraphics" : @false, #ifdef HAVE_DISCORDSDK @"discordClientId" : @DEFAULT_CLIENT_ID, #endif @@ -169,7 +169,7 @@ void Config::read(int argc, char *argv[]) { SET_OPT_CUSTOMKEY(SE.sourceCount, SESourceCount, intValue); SET_STRINGOPT(customScript, customScript); SET_OPT(pathCache, boolValue); - SET_OPT(compressedGraphics, boolValue); + SET_OPT(encryptedGraphics, boolValue); SET_OPT(useScriptNames, boolValue); fillStringVec(opts[@"preloadScript"], preloadScripts);