mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-07-01 22:25:17 +02:00
Don't build MiniFFI on 64-bit Windows
MiniFFI/Win32API is now optional, and requires sizeof(void*) == sizeof(long)
This commit is contained in:
parent
7ff906c507
commit
796ceabe9c
5 changed files with 530 additions and 573 deletions
File diff suppressed because it is too large
Load diff
|
@ -29,12 +29,15 @@ binding_source = [files(
|
|||
'module_rpg.cpp',
|
||||
'filesystem-binding.cpp',
|
||||
'windowvx-binding.cpp',
|
||||
'tilemapvx-binding.cpp',
|
||||
'miniffi-binding.cpp'
|
||||
'tilemapvx-binding.cpp'
|
||||
)]
|
||||
|
||||
if discord == true
|
||||
binding_source += files('discord-binding.cpp')
|
||||
endif
|
||||
|
||||
if miniffi == true
|
||||
binding_source += files('miniffi-binding.cpp')
|
||||
endif
|
||||
|
||||
global_sources += binding_source
|
||||
|
|
17
meson.build
17
meson.build
|
@ -53,6 +53,20 @@ if compilers['objc'].get_id() == 'clang'
|
|||
global_args += ['-Wno-undefined-var-template', '-Wno-delete-non-abstract-non-virtual-dtor']
|
||||
endif
|
||||
|
||||
# Decide whether or not to use MiniFFI
|
||||
miniffi = get_option('use_miniffi')
|
||||
if miniffi == true
|
||||
if compilers['cpp'].sizeof('void*') == compilers['cpp'].sizeof('long')
|
||||
miniffi = true
|
||||
global_args += '-DUSE_MINIFFI'
|
||||
else
|
||||
warning('64-bit MiniFFI is only supported on Linux and macOS.')
|
||||
warning('To use MiniFFI/Win32API on Windows, target 32-bit.')
|
||||
miniffi = false
|
||||
endif
|
||||
endif
|
||||
|
||||
# Defines
|
||||
if get_option('workdir_current')
|
||||
global_args += '-DWORKDIR_CURRENT'
|
||||
endif
|
||||
|
@ -61,7 +75,7 @@ if get_option('independent_appimage')
|
|||
global_args += '-DINDEPENDENT_APPIMAGE'
|
||||
endif
|
||||
|
||||
if get_option('use_fakeapi')
|
||||
if get_option('use_fakeapi') == true and miniffi == true
|
||||
global_args += '-DUSE_FAKEAPI'
|
||||
endif
|
||||
|
||||
|
@ -73,6 +87,7 @@ if get_option('mk')
|
|||
global_args += '-DMARIN'
|
||||
endif
|
||||
|
||||
|
||||
# Objectify our C
|
||||
global_args += run_command(objfw,'--cppflags').stdout().split()
|
||||
add_project_arguments(run_command(objfw,'--objcflags').stdout().split(), language:['objc','objcpp'])
|
||||
|
|
|
@ -6,7 +6,8 @@ option('macos_min_version', type: 'string', value: '10.10', description: 'Minimu
|
|||
|
||||
option('shared_fluid', type: 'boolean', value: false, description: 'Dynamically link fluidsynth at build time')
|
||||
option('cjk_fallback_font', type: 'boolean', value: false, description: 'Use WenQuanYi Micro Hei as the fallback font')
|
||||
option('use_fakeapi', type: 'boolean', value: false, description: 'Attempt to repair Win32API calls that do not work with MKXP')
|
||||
option('use_miniffi', type: 'boolean', value: true, description: 'Enable MiniFFI Ruby module (Win32API)')
|
||||
option('use_fakeapi', type: 'boolean', value: false, description: 'Attempt to repair Win32API calls that do not work with MKXP. Requires MiniFFI')
|
||||
option('default_framerate', type: 'boolean', value: false, description: 'Disable syncToRefreshrate and fixedFramerate configuration options')
|
||||
option('no_preload_scripts', type: 'boolean', value: false, description: 'Disable the preloadScript configuration option')
|
||||
option('workdir_current', type: 'boolean', value: false, description: 'Keep current directory on startup')
|
||||
|
|
|
@ -83,7 +83,7 @@ main_source = files(
|
|||
'lang-fun.mm'
|
||||
)
|
||||
|
||||
if get_option('use_fakeapi') == true
|
||||
if get_option('use_fakeapi') == true and miniffi == true
|
||||
main_source += files('fake-api.mm')
|
||||
endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue