mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2024-10-28 11:19:36 +01:00
Bump version, update Meson build
This commit is contained in:
parent
51c7f8410e
commit
5d4758edaa
9 changed files with 15 additions and 108 deletions
17
Brewfile
17
Brewfile
|
@ -1,17 +0,0 @@
|
|||
# https://github.com/Homebrew/homebrew-bundle
|
||||
|
||||
brew "meson"
|
||||
brew "cmake"
|
||||
brew "automake"
|
||||
brew "autoconf"
|
||||
brew "sdl2"
|
||||
brew "sdl2_image"
|
||||
brew "sdl2_ttf"
|
||||
brew "pixman"
|
||||
brew "physfs"
|
||||
brew "libsigc++@2"
|
||||
brew "libvorbis"
|
||||
brew "fluidsynth"
|
||||
brew "pkgconfig"
|
||||
brew "libtool"
|
||||
brew "openal-soft"
|
|
@ -1,9 +1,5 @@
|
|||
global_include_dirs += include_directories('.')
|
||||
|
||||
if host_system == 'darwin'
|
||||
global_dependencies += dependency('AudioToolbox')
|
||||
endif
|
||||
|
||||
global_sources += files(
|
||||
'dr_flac.h',
|
||||
'dr_mp3.h',
|
||||
|
|
|
@ -3,7 +3,7 @@ if get_option('mri_includes') == ''
|
|||
ver = get_option('mri_version')
|
||||
if ver.version_compare('<=1.8')
|
||||
global_args += '-DLEGACY_RUBY'
|
||||
else if ver.version_compare('>=3.0')
|
||||
elif ver.version_compare('>=3.0')
|
||||
global_args += '-fdeclspec'
|
||||
endif
|
||||
global_dependencies += dependency('ruby-' + ver)
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
IDENTITY="$1"
|
||||
TIMESTAMP=--timestamp
|
||||
if [[ $IDENTITY == "" ]]; then
|
||||
IDENTITY=-
|
||||
TIMESTAMP=""
|
||||
fi
|
||||
|
||||
codesign -vfs $IDENTITY --entitlements "${MESON_SOURCE_ROOT}/macos/entitlements.plist" --deep --ignore-resources -o runtime $TIMESTAMP "${MESON_INSTALL_PREFIX}"
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
EXE=${MESON_INSTALL_PREFIX}/Contents/MacOS/$2
|
||||
|
||||
FRAMEWORKS="${MESON_INSTALL_PREFIX}/Contents/Frameworks"
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
echo "Setting up steam_api manually..."
|
||||
if [ ! -d $FRAMEWORKS ]; then
|
||||
mkdir -p $FRAMEWORKS
|
||||
fi
|
||||
cp "$1/libsteam_api.dylib" $FRAMEWORKS
|
||||
install_name_tool -change "@loader_path/libsteam_api.dylib" "@executable_path/../Frameworks/libsteam_api.dylib" $EXE
|
||||
install_name_tool -add_rpath "@executable_path/../Frameworks" ${EXE}_rt
|
||||
macpack -d "../Frameworks" ${EXE}_rt
|
||||
else
|
||||
install_name_tool -add_rpath "@executable_path/../Frameworks" ${EXE}
|
||||
macpack -d "../Frameworks" ${EXE}
|
||||
fi
|
|
@ -1,13 +0,0 @@
|
|||
install_data('icon.icns', install_dir: 'Contents/Resources')
|
||||
install_data('Info.plist', install_dir: 'Contents')
|
||||
|
||||
swarg = ''
|
||||
if steamworks == true
|
||||
swarg = steam_libpath
|
||||
endif
|
||||
|
||||
meson.add_install_script('macpack.sh', swarg, meson.project_name())
|
||||
|
||||
if get_option('codesign') == true
|
||||
meson.add_install_script('codesign.sh', get_option('codesign_identity'))
|
||||
endif
|
41
meson.build
41
meson.build
|
@ -1,7 +1,12 @@
|
|||
project('mkxp-z', 'c', 'cpp', version: '1.3.0', meson_version: '>=0.47.0', default_options: ['cpp_std=c++17', 'buildtype=release'])
|
||||
project('mkxp-z', 'c', 'cpp', version: '2.0.0', meson_version: '>=0.47.0', default_options: ['cpp_std=c++11', 'buildtype=release'])
|
||||
|
||||
host_system = host_machine.system()
|
||||
|
||||
if host_system == 'darwin'
|
||||
error('\nThis Meson project no longer supports macOS. Please use the Xcode project instead.')
|
||||
endif
|
||||
|
||||
xxd = find_program('xxd', native: true)
|
||||
host_system = host_machine.system()
|
||||
|
||||
compilers = {'cpp': meson.get_compiler('cpp')}
|
||||
|
||||
|
@ -16,19 +21,6 @@ sizeof = {'void*': compilers['cpp'].sizeof('void*'),
|
|||
}
|
||||
win64 = (sizeof['void*'] != sizeof['long'])
|
||||
|
||||
# Fill macOS version info
|
||||
minimum_macos_version = ''
|
||||
current_macos_version = ''
|
||||
if host_system == 'darwin'
|
||||
current_macos_version = run_command('sw_vers', '-productVersion').stdout().strip()
|
||||
macosx_version_min = get_option('macos_min_version')
|
||||
if macosx_version_min != ''
|
||||
minimum_macos_version = macosx_version_min
|
||||
else
|
||||
minimum_macos_version = current_macos_version
|
||||
endif
|
||||
endif
|
||||
|
||||
global_args += '-DMKXPZ_BUILD_MESON'
|
||||
# ====================
|
||||
# Ext libs
|
||||
|
@ -46,15 +38,13 @@ if steamworks_path != ''
|
|||
else
|
||||
bindir = 'linux64'
|
||||
endif
|
||||
elif host_system == 'windows'
|
||||
else
|
||||
if win64 == true
|
||||
bindir = 'win64'
|
||||
libname += '64'
|
||||
else
|
||||
bindir = ''
|
||||
endif
|
||||
else
|
||||
bindir = 'osx'
|
||||
endif
|
||||
|
||||
steam_libpath = steamworks_path + '/redistributable_bin/' + bindir
|
||||
|
@ -95,8 +85,6 @@ if compilers['cpp'].get_id() == 'clang'
|
|||
endif
|
||||
if host_system == 'windows'
|
||||
global_args += '-Wno-unknown-attributes'
|
||||
elif host_system == 'darwin'
|
||||
global_args += '-Wno-deprecated-declarations'
|
||||
endif
|
||||
|
||||
# Decide whether or not to use MiniFFI
|
||||
|
@ -138,9 +126,7 @@ if get_option('static_executable') == true and host_system == 'windows'
|
|||
build_static = true
|
||||
endif
|
||||
|
||||
if host_system != 'darwin' or current_macos_version.version_compare('<10.15')
|
||||
global_args += '-DTHREADED_GLINIT'
|
||||
endif
|
||||
global_args += '-DTHREADED_GLINIT'
|
||||
|
||||
subdir('src')
|
||||
subdir('binding')
|
||||
|
@ -156,15 +142,6 @@ if host_system == 'windows'
|
|||
subdir('windows')
|
||||
global_sources += windows_resources
|
||||
global_include_dirs += include_directories('windows')
|
||||
elif host_system == 'darwin'
|
||||
subdir('macos')
|
||||
rpath = '@executable_path/../libs'
|
||||
add_project_arguments('-stdlib=libc++', language: ['cpp'])
|
||||
if minimum_macos_version != ''
|
||||
add_project_arguments('-mmacosx-version-min='+minimum_macos_version, language: ['c', 'cpp'])
|
||||
add_project_link_arguments('-mmacosx-version-min='+minimum_macos_version, language: ['c', 'cpp'])
|
||||
endif
|
||||
warning('Please consider using the Xcode project located in the `macos` directory instead.')
|
||||
else
|
||||
subdir('linux')
|
||||
rpath = '$ORIGIN/lib'
|
||||
|
|
|
@ -80,14 +80,7 @@ global_include_dirs += include_directories('.',
|
|||
)
|
||||
|
||||
global_dependencies += [sigcxx, openal, zlib, pixman, physfs, vorbisfile, sdl2_ttf, sdl2_image]
|
||||
if host_system == 'darwin'
|
||||
global_dependencies += compilers['cpp'].find_library('iconv')
|
||||
global_dependencies += dependency('Foundation')
|
||||
|
||||
if openal.type_name() != 'pkgconfig'
|
||||
add_project_arguments('-DUSE_MAC_OPENAL', language: 'cpp')
|
||||
endif
|
||||
elif host_system == 'windows'
|
||||
if host_system == 'windows'
|
||||
global_dependencies += compilers['cpp'].find_library('wsock32')
|
||||
endif
|
||||
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
IDI_APPICON ICON "icon.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,3,0,0
|
||||
PRODUCTVERSION 1,3,0,0
|
||||
FILEVERSION 2,0,0,0
|
||||
PRODUCTVERSION 2,0,0,0
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "040904b0"
|
||||
{
|
||||
VALUE "FileVersion", "1.3.0\0"
|
||||
VALUE "FileVersion", "2.0.0\0"
|
||||
VALUE "OriginalFilename", "mkxp-z.exe\0"
|
||||
VALUE "ProductName", "mkxp-z\0"
|
||||
VALUE "ProductVersion", "1.3.0\0"
|
||||
VALUE "ProductVersion", "2.0.0\0"
|
||||
}
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue