Add macOS resources

This commit is contained in:
Inori 2019-08-26 01:57:12 -04:00 committed by Inori
parent 9c0842d6f8
commit 888ee08b27
7 changed files with 37 additions and 3 deletions

26
macos/Info.plist Normal file
View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
<string>mkxp-z</string>
<key>CFBundleExecutable</key>
<string>mkxp-z</string>
<key>CFBundleIdentifier</key>
<string>com.inori.mkxpz</string>
<key>CFBundleName</key>
<string>mkxp-z</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>IFMajorVersion</key>
<integer>0</integer>
<key>IFMinorVersion</key>
<integer>1</integer>
</dict>
</plist>

BIN
macos/icon.icns Normal file

Binary file not shown.

3
macos/macpack.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
macpack ${MESON_INSTALL_PREFIX}/Contents/MacOS/mkxp-z

3
macos/meson.build Normal file
View file

@ -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')

View file

@ -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')
)

View file

@ -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')

View file

@ -146,4 +146,4 @@ main = [main_source, main_headers]
if get_option('use_fakeapi') == true
main += files('fake-api.cpp', 'fake-api.h')
endif
endif