Allow specifying ruby install manually

This commit is contained in:
Struma 2020-02-25 05:35:30 -05:00 committed by Roza
parent 24d6199a79
commit dd0f3ade91
8 changed files with 23 additions and 14 deletions

View file

@ -22,7 +22,7 @@
#include "audio.h" #include "audio.h"
#include "binding-util.h" #include "binding-util.h"
#include "binding.h" #include "binding.h"
#include "config.h" #include "src/config.h"
#include "debugwriter.h" #include "debugwriter.h"
#include "eventthread.h" #include "eventthread.h"
#include "filesystem.h" #include "filesystem.h"
@ -30,7 +30,7 @@
#include "lang-fun.h" #include "lang-fun.h"
#include "sdl-util.h" #include "sdl-util.h"
#include "sharedstate.h" #include "sharedstate.h"
#include "util.h" #include "src/util.h"
#include "boost-hash.h" #include "boost-hash.h"
#include <vector> #include <vector>

View file

@ -23,7 +23,7 @@
#include "sharedstate.h" #include "sharedstate.h"
#include "exception.h" #include "exception.h"
#include "util.h" #include "src/util.h"
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>

View file

@ -23,8 +23,8 @@
#include "sharedstate.h" #include "sharedstate.h"
#include "filesystem.h" #include "filesystem.h"
#include "config.h" #include "src/config.h"
#include "util.h" #include "src/util.h"
#ifndef OLD_RUBY #ifndef OLD_RUBY
#include "ruby/encoding.h" #include "ruby/encoding.h"
@ -185,7 +185,7 @@ RB_METHOD(kernelLoadData)
rb_raise(rb_eTypeError, "load_data: second argument must be Boolean"); rb_raise(rb_eTypeError, "load_data: second argument must be Boolean");
} }
if (!shState->config().compressedGraphics) if (!shState->config().encryptedGraphics)
{ {
VALUE isGraphicsFile = rb_funcall(filename, VALUE isGraphicsFile = rb_funcall(filename,
rb_intern("start_with?"), rb_intern("start_with?"),

View file

@ -23,7 +23,7 @@
#include "sharedstate.h" #include "sharedstate.h"
#include "exception.h" #include "exception.h"
#include "binding-util.h" #include "binding-util.h"
#include "util.h" #include "src/util.h"
#include <string> #include <string>
#include <SDL_joystick.h> #include <SDL_joystick.h>

View file

@ -1,9 +1,14 @@
ver = get_option('mri_version') if get_option('mri_includes') == ''
if ver.version_compare('>1.8') == false ver = get_option('mri_version')
add_project_arguments('-DOLD_RUBY', language: ['cpp','objc','objcpp']) 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 endif
global_dependencies += dependency('ruby-' + ver)
if get_option('no_preload_scripts') == true if get_option('no_preload_scripts') == true
add_project_arguments('-DNO_PRELOAD_SCRIPTS', language: ['cpp','objc','objcpp']) add_project_arguments('-DNO_PRELOAD_SCRIPTS', language: ['cpp','objc','objcpp'])

View file

@ -1,4 +1,8 @@
option('mri_version', type: 'string', value: '1.8', description: 'Version of MRI to link with') 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('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('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') option('macos_min_version', type: 'string', value: '10.12', description: 'Minimum macOS system version to support')

View file

@ -66,7 +66,7 @@ struct Config {
bool enableReset; bool enableReset;
bool allowSymlinks; bool allowSymlinks;
bool pathCache; bool pathCache;
bool compressedGraphics; bool encryptedGraphics;
std::string dataPathOrg; std::string dataPathOrg;
std::string dataPathApp; std::string dataPathApp;

View file

@ -82,7 +82,7 @@ void Config::read(int argc, char *argv[]) {
@"SESourceCount" : @6, @"SESourceCount" : @6,
@"customScript" : @"", @"customScript" : @"",
@"pathCache" : @true, @"pathCache" : @true,
@"compressedGraphics" : @false, @"encryptedGraphics" : @false,
#ifdef HAVE_DISCORDSDK #ifdef HAVE_DISCORDSDK
@"discordClientId" : @DEFAULT_CLIENT_ID, @"discordClientId" : @DEFAULT_CLIENT_ID,
#endif #endif
@ -169,7 +169,7 @@ void Config::read(int argc, char *argv[]) {
SET_OPT_CUSTOMKEY(SE.sourceCount, SESourceCount, intValue); SET_OPT_CUSTOMKEY(SE.sourceCount, SESourceCount, intValue);
SET_STRINGOPT(customScript, customScript); SET_STRINGOPT(customScript, customScript);
SET_OPT(pathCache, boolValue); SET_OPT(pathCache, boolValue);
SET_OPT(compressedGraphics, boolValue); SET_OPT(encryptedGraphics, boolValue);
SET_OPT(useScriptNames, boolValue); SET_OPT(useScriptNames, boolValue);
fillStringVec(opts[@"preloadScript"], preloadScripts); fillStringVec(opts[@"preloadScript"], preloadScripts);