diff --git a/macos/Info.plist b/macos/Info.plist new file mode 100644 index 00000000..1cece1df --- /dev/null +++ b/macos/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleGetInfoString + mkxp-z + CFBundleExecutable + mkxp-z + CFBundleIdentifier + com.inori.mkxpz + CFBundleName + mkxp-z + CFBundleIconFile + icon.icns + CFBundleShortVersionString + 1.0 + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + IFMajorVersion + 0 + IFMinorVersion + 1 + + diff --git a/macos/icon.icns b/macos/icon.icns new file mode 100644 index 00000000..4003e7df Binary files /dev/null and b/macos/icon.icns differ diff --git a/macos/macpack.sh b/macos/macpack.sh new file mode 100755 index 00000000..f271281c --- /dev/null +++ b/macos/macpack.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +macpack ${MESON_INSTALL_PREFIX}/Contents/MacOS/mkxp-z diff --git a/macos/meson.build b/macos/meson.build new file mode 100644 index 00000000..626154cc --- /dev/null +++ b/macos/meson.build @@ -0,0 +1,3 @@ +install_data('icon.icns', install_dir: 'Contents/Resources') +install_data('Info.plist', install_dir: 'Contents') +meson.add_install_script('macpack.sh') diff --git a/meson.build b/meson.build index d215679d..e7032af9 100644 --- a/meson.build +++ b/meson.build @@ -38,6 +38,7 @@ if host_system == 'windows' all_sources += windows_resources include_dirs += include_directories('windows') elif host_system == 'darwin' + subdir('macos') if compiler.get_id() == 'clang' add_project_arguments('-stdlib=libc++', language: 'cpp') endif @@ -47,5 +48,6 @@ executable(meson.project_name(), sources: all_sources, dependencies: [main_dependencies, binding_dependencies], include_directories: include_dirs, - gui_app: (get_option('console') == false) + gui_app: (get_option('console') == false), + install: (host_system == 'darwin') ) diff --git a/meson_options.txt b/meson_options.txt index 147bff86..c7d86364 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,6 +1,6 @@ option('shared_fluid', type: 'boolean', value: false, description: 'Dynamically link fluidsynth at build time') option('mri_version', type: 'string', value: '1.8', description: 'Version of MRI to link with') -option('workdir_current', type: 'boolean', value: true, description: 'Keep current directory on startup') +option('workdir_current', type: 'boolean', value: false, description: 'Keep current directory on startup') option('ruby_lib', type: 'string', value: 'ruby', description: 'Name of the Ruby library') option('console', type: 'boolean', value: true, description: 'Whether to debug information in the console') diff --git a/src/meson.build b/src/meson.build index a90e2284..ace7f48b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -146,4 +146,4 @@ main = [main_source, main_headers] if get_option('use_fakeapi') == true main += files('fake-api.cpp', 'fake-api.h') -endif \ No newline at end of file +endif