mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-04 14:05:32 +02:00
Satisfy hardened runtime dyld path reqs in Win32API
This commit is contained in:
parent
7f35003e3f
commit
f583683609
2 changed files with 239 additions and 232 deletions
|
@ -5,6 +5,7 @@
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include "filesystem/filesystem.h"
|
||||||
#include "miniffi.h"
|
#include "miniffi.h"
|
||||||
#include "binding-util.h"
|
#include "binding-util.h"
|
||||||
|
|
||||||
|
@ -81,7 +82,11 @@ RB_METHOD(MiniFFI_initialize) {
|
||||||
rb_scan_args(argc, argv, "22", &libname, &func, &imports, &exports);
|
rb_scan_args(argc, argv, "22", &libname, &func, &imports, &exports);
|
||||||
SafeStringValue(libname);
|
SafeStringValue(libname);
|
||||||
SafeStringValue(func);
|
SafeStringValue(func);
|
||||||
|
#ifdef __MACOSX__
|
||||||
|
void *hlib = SDL_LoadObject(mkxp_fs::normalizePath(RSTRING_PTR(libname), 1, 1).c_str());
|
||||||
|
#else
|
||||||
void *hlib = SDL_LoadObject(RSTRING_PTR(libname));
|
void *hlib = SDL_LoadObject(RSTRING_PTR(libname));
|
||||||
|
#endif
|
||||||
setPrivateData(self, hlib);
|
setPrivateData(self, hlib);
|
||||||
void *hfunc = MiniFFI_GetFunctionHandle(hlib, RSTRING_PTR(func));
|
void *hfunc = MiniFFI_GetFunctionHandle(hlib, RSTRING_PTR(func));
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||||
|
<true/>
|
||||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.cs.disable-library-validation</key>
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
|
Loading…
Add table
Reference in a new issue